Fax empfangen mit chan_capi_cm 0.6.1

hohausal

Neuer User
Mitglied seit
25 Nov 2005
Beiträge
9
Punkte für Reaktionen
0
Punkte
0
Hallo,

ich habe ein Update auf Asterisk 1.2.0 mit chan_capi_cm 0.6.1 durchgeführt.

Nun bricht der Faxempfang mit folgender Fehlermeldung ab:

Nov 25 14:05:48 WARNING[1325]: chan_capi.c:1767 capi_receive_fax: capi receive fax in wrong state (7)

Mit der alten Version hat alles funktioniert (war noch chan_capi mit Faxergänzung)

Nachfolgend das Makro in der extensions.conf, mit dem das Fax empfangen und vermailt wird.

Code:
[macro-faxreceive]
 
exten => s,1,SetVar(FAXFILE=/tmp/${UNIQUEID})
exten => s,2,SetVar(EXTMAIL=${ARG2})
exten => s,3,SetVar(CCMAIL=${ARG3})
exten => s,4,Answer
exten => s,5,capicommand(receivefax|${FAXFILE})
exten => s,6,System(/var/lib/asterisk/scripts/mailfax "${CALLERIDNUM}" "${ARG1}" "x" "${EXTMAIL}" "${FAXFILE}" "ARMAX mindware GmbH" "${CCMAIL}")
exten => s,7,hangup()


Axel
 
Versuch mal das 'Answer' wegzulassen. Ansonsten mach bitte mal ein verbose log level 5 mit 'capi debug'

Armin
 
Ohne 'Answer' nimmt er das Gespräch gar nicht anund legt irgendwann wieder auf.

Anbei die Logs.

Log ohne Answer
Code:
    -- ISDN1: info element CALLED PARTY NUMBER

    -- ISDN1: Updated channel name: CAPI/ISDN1/12345661-2

    -- ISDN1: CAPI/ISDN1/12345661-2: 12345661 matches in context outside

    -- Executing Goto("CAPI/ISDN1/12345661-2", "faxempfang|12345661|1") in new stack

    -- Goto (faxempfang,12345661,1)

    -- Executing Macro("CAPI/ISDN1/12345661-2", "faxreceive|61|"[email protected]"") in new stack

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "FAXFILE=/tmp/asterisk-3053-1133184070.5") in new stack
Nov 28 14:21:10 WARNING[3087]: pbx.c:5965 pbx_builtin_setvar_old: SetVar is deprecated, please use Set instead.

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "EXTMAIL="[email protected]"") in new stack

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "CCMAIL=") in new stack

    -- Executing capiCommand("CAPI/ISDN1/12345661-2", "receivefax|/tmp/asterisk-3053-1133184070.5") in new stack

    -- capiCommand: 'receivefax' '/tmp/asterisk-3053-1133184070.5'

  == Started pbx on channel CAPI/ISDN1/12345661-2

INFO_IND ID=001 #0x134a LEN=0016
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x18
  InfoElement                     = <8a>


INFO_RESP ID=001 #0x134a LEN=0012
  Controller/PLCI/NCCI            = 0x201


    -- ISDN1: info element CHANNEL IDENTIFICATION 8a

    -- Setup fax b3conf fmt=0, stationid='' headline=''

  == ISDN1: Answering for 12345661

CONNECT_RESP ID=001 #0x1348 LEN=0051
  Controller/PLCI/NCCI            = 0x201
  Reject                          = 0x0
  BProtocol                      
   B1protocol                     = 0x4
   B2protocol                     = 0x4
   B3protocol                     = 0x4
   B1configuration                = default
   B2configuration                = default
   B3configuration                = <00 00 00 00 00 00>
   GlobalConfiguration            = default
  ConnectedNumber                 = <00 80>12345661
  ConnectedSubaddress             = default
  LLC                             = default
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default


INFO_IND ID=001 #0x134b LEN=0015
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x800d
  InfoElement                     = default


INFO_RESP ID=001 #0x134b LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element SETUP ACK

INFO_IND ID=001 #0x134c LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>


INFO_RESP ID=001 #0x134c LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element CHANNEL IDENTIFICATION 89

CONNECT_ACTIVE_IND ID=001 #0x134d LEN=0015
  Controller/PLCI/NCCI            = 0x201
  ConnectedNumber                 = default
  ConnectedSubaddress             = default
  LLC                             = default


    -- Channel 0/1, span 1 got hangup request

  == ISDN1: CAPI Hangingup

    -- ISDN1: activehangingup (cause=0)

DISCONNECT_REQ ID=001 #0x0004 LEN=0018
  Controller/PLCI/NCCI            = 0x101
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

Log mit Answer
Code:
  == ISDN1: Incoming call '071112345662' -> '12345661'

INFO_IND ID=001 #0x1357 LEN=0025
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x70
  InfoElement                     = <c1>12345661


INFO_RESP ID=001 #0x1357 LEN=0012
  Controller/PLCI/NCCI            = 0x201


    -- ISDN1: info element CALLED PARTY NUMBER

    -- ISDN1: Updated channel name: CAPI/ISDN1/12345661-2

    -- ISDN1: CAPI/ISDN1/12345661-2: 12345661 matches in context outside

    -- Executing Goto("CAPI/ISDN1/12345661-2", "faxempfang|12345661|1") in new stack

    -- Goto (faxempfang,12345661,1)

    -- Executing Macro("CAPI/ISDN1/12345661-2", "faxreceive|61|"[email protected]"") in new stack

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "FAXFILE=/tmp/asterisk-3132-1133184597.5") in new stack
Nov 28 14:29:57 WARNING[3160]: pbx.c:5965 pbx_builtin_setvar_old: SetVar is deprecated, please use Set instead.

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "EXTMAIL="[email protected]"") in new stack

    -- Executing SetVar("CAPI/ISDN1/12345661-2", "CCMAIL=") in new stack

    -- Executing Answer("CAPI/ISDN1/12345661-2", "") in new stack

  == Started pbx on channel CAPI/ISDN1/12345661-2

INFO_IND ID=001 #0x1358 LEN=0016
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x18
  InfoElement                     = <8a>


INFO_RESP ID=001 #0x1358 LEN=0012
  Controller/PLCI/NCCI            = 0x201


    -- ISDN1: info element CHANNEL IDENTIFICATION 8a

  == ISDN1: Answering for 12345661

CONNECT_RESP ID=001 #0x1356 LEN=0045
  Controller/PLCI/NCCI            = 0x201
  Reject                          = 0x0
  BProtocol                      
   B1protocol                     = 0x1
   B2protocol                     = 0x1
   B3protocol                     = 0x0
   B1configuration                = default
   B2configuration                = default
   B3configuration                = default
   GlobalConfiguration            = default
  ConnectedNumber                 = <00 80>12345661
  ConnectedSubaddress             = default
  LLC                             = default
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default


    -- Executing capiCommand("CAPI/ISDN1/12345661-2", "receivefax|/tmp/asterisk-3132-1133184597.5") in new stack

    -- capiCommand: 'receivefax' '/tmp/asterisk-3132-1133184597.5'

    -- Setup fax b3conf fmt=0, stationid='' headline=''
Nov 28 14:29:57 WARNING[3160]: chan_capi.c:1767 capi_receive_fax: capi receive fax in wrong state (7)

  == Spawn extension (macro-faxreceive, s, 5) exited non-zero on 'CAPI/ISDN1/12345661-2' in macro 'faxreceive'

  == Spawn extension (faxempfang, 12345661, 1) exited non-zero on 'CAPI/ISDN1/12345661-2'

  == ISDN1: CAPI Hangingup

    -- ISDN1: activehangingup (cause=0)

DISCONNECT_REQ ID=001 #0x0004 LEN=0018
  Controller/PLCI/NCCI            = 0x201
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default


DISCONNECT_CONF ID=001 #0x0004 LEN=0014
  Controller/PLCI/NCCI            = 0x201
  Info                            = 0x0


INFO_IND ID=001 #0x1359 LEN=0015
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x800d
  InfoElement                     = default


INFO_RESP ID=001 #0x1359 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element SETUP ACK

INFO_IND ID=001 #0x135a LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>


INFO_RESP ID=001 #0x135a LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element CHANNEL IDENTIFICATION 89

INFO_IND ID=001 #0x135b LEN=0020
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x29
  InfoElement                     = <05 0b 1c 0e 17>


INFO_RESP ID=001 #0x135b LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element Date/Time 05/11/28 14:23

CONNECT_ACTIVE_IND ID=001 #0x135c LEN=0015
  Controller/PLCI/NCCI            = 0x101
  ConnectedNumber                 = default
  ConnectedSubaddress             = default
  LLC                             = default


CONNECT_ACTIVE_RESP ID=001 #0x135c LEN=0012
  Controller/PLCI/NCCI            = 0x101


CONNECT_B3_REQ ID=001 #0x0005 LEN=0013
  Controller/PLCI/NCCI            = 0x101
  NCPI                            = default


CONNECT_B3_CONF ID=001 #0x0005 LEN=0014
  Controller/PLCI/NCCI            = 0x10101
  Info                            = 0x0


CONNECT_B3_ACTIVE_IND ID=001 #0x135d LEN=0013
  Controller/PLCI/NCCI            = 0x10101
  NCPI                            = default


CONNECT_B3_ACTIVE_RESP ID=001 #0x135d LEN=0012
  Controller/PLCI/NCCI            = 0x10101


    -- CAPI/ISDN1/12345661-0 answered Zap/1-1

       > ISDN1: too much voice to send for NCCI=0x10101

DISCONNECT_IND ID=001 #0x1361 LEN=0014
  Controller/PLCI/NCCI            = 0x201
  Reason                          = 0x3400


DISCONNECT_RESP ID=001 #0x1361 LEN=0012
  Controller/PLCI/NCCI            = 0x201


  == ISDN1: Interface cleanup PLCI=0x201

INFO_IND ID=001 #0x1374 LEN=0015
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x8045
  InfoElement                     = default


INFO_RESP ID=001 #0x1374 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element DISCONNECT

    -- ISDN1: Disconnect case 4

INFO_IND ID=001 #0x1375 LEN=0017
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x1e
  InfoElement                     = <82 88>


INFO_RESP ID=001 #0x1375 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element PI 82 88

       > ISDN1: In-band information available

INFO_IND ID=001 #0x1376 LEN=0017
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x8
  InfoElement                     = <80 90>


INFO_RESP ID=001 #0x1376 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element CAUSE 80 90

INFO_IND ID=001 #0x1377 LEN=0038
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x1c
  InfoElement                     = <91 a1 14 02 01 00 02 01 24>0<0c>0<0a a1 05>0<03 02 01 01 82 01 00>


INFO_RESP ID=001 #0x1377 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element FACILITY

INFO_IND ID=001 #0x1378 LEN=0019
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x4000
  InfoElement                     = <01 00 00 00>


INFO_RESP ID=001 #0x1378 LEN=0012
  Controller/PLCI/NCCI            = 0x101


    -- ISDN1: info element CHARGE in UNITS

  == ISDN1: CAPI Hangingup

    -- ISDN1: activehangingup (cause=16)

DISCONNECT_B3_REQ ID=001 #0x001c LEN=0013
  Controller/PLCI/NCCI            = 0x10101
  NCPI                            = default


  == Spawn extension (outside, 012345661, 1) exited non-zero on 'Zap/1-1'

DISCONNECT_B3_CONF ID=001 #0x001c LEN=0014
  Controller/PLCI/NCCI            = 0x10101
  Info                            = 0x0


    -- Hungup 'Zap/1-1'

DISCONNECT_B3_IND ID=001 #0x1379 LEN=0015
  Controller/PLCI/NCCI            = 0x10101
  Reason_B3                       = 0x3301
  NCPI                            = default


DISCONNECT_B3_RESP ID=001 #0x1379 LEN=0012
  Controller/PLCI/NCCI            = 0x10101


DISCONNECT_REQ ID=001 #0x001d LEN=0018
  Controller/PLCI/NCCI            = 0x101
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default


DISCONNECT_CONF ID=001 #0x001d LEN=0014
  Controller/PLCI/NCCI            = 0x101
  Info                            = 0x0


INFO_IND ID=001 #0x137a LEN=0018
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x8
  InfoElement                     = <82 e5 0f>


INFO_RESP ID=001 #0x137a LEN=0012
  Controller/PL

Axel
 
CAPI bekommt ein HANGUP. Was haengt denn am ISDN dran?
Welche ISDN-Karte wird verwendet?
Denn es meldet sich zwischendrin ZAP!?

Armin
 
Es ist eine AVM b1 ISDN-Karte am Anlagenanschluß. Zusätzlich 2 ZAPHFC-Karten zur internen Telefonanlage.
Ich faxe von einem Papierfax vom internen Anschluß über das Amt auf den 2 Kanal der CAPI-Karte.

Die Aufrufe vor und nach dem obenstehenden Makro sind:

Code:
exten => _78239966X,1,Goto(faxempfang,${EXTEN},1)

exten => t,1,Playtones(busy)
exten => t,2,Wait(3)
exten => t,3,hangup()

Die Konfiguration hat so mit Asterisk 1.0.9 und chan_capi mit Fax-Patch funktioniert. Jedoch ohne den Answer Befehl und als Fax-Kommando capiAnswerFax.

Axel
 
Ich kann keinen Fehler entdecken, ausser dass eben ein Hangup Signal an chan_capi gesendet wird (von Asterisk).

Armin
 
Mit oder ohne Answer Kommando?
Ohne Answer kommt gar keine Verbindung zu Stande,
Das heißt beim Papierfax kommt keine Antwort.
 
Ohne Answer. Das Answer wird beim receivefax automatisch gemacht.
Eine Verbindung kommt schon zustande, aber keine Fax-Verbindung.

Armin
 
Leider funktioniert das Faxe empfangen immer noch nicht.
Er scheint den Anruf anzunehmen und bleibt dann einfach stehen.

Erstaunlicherweise kam auf der Gegenseite ein ok und das Fax ist durch.

Die angelegte Datei im tmp hat aber die Größe 0.

Anbei noch mal den Abschnitt der extensions.conf und das log mit capi debug

Code:
[macro-faxreceive]
 
exten => s,1,SetVar(FAXFILE=/tmp/${UNIQUEID})
exten => s,2,SetVar(EXTMAIL=${ARG2})
exten => s,3,SetVar(CCMAIL=${ARG3})
exten => s,4,capicommand(receivefax|${FAXFILE})
exten => s,5,System(/var/lib/asterisk/scripts/mailfax "${CALLERIDNUM}" "${ARG1}" "x" "${EXTMAIL}" "${FAXFILE}" "Hugo Müller Corp." "${CCMAIL}")




Log
Code:
CONNECT_IND ID=001 #0x5455 LEN=0054
  Controller/PLCI/NCCI            = 0x101
  CIPValue                        = 0x4
  CalledPartyNumber               = <c1>1234567
  CallingPartyNumber              = <21 80>7119876543
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <90 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo                  = default

    -- CONNECT_IND (PLCI=0x101,DID=1234567,CID=7119876543,CIP=0x4,CONTROLLER=0x1)
       > ISDN1: msn='*' DNID='1234567' DID
  == ISDN1: Incoming call '07119876543' -> '1234567'
INFO_IND ID=001 #0x5456 LEN=0017
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x1e
  InfoElement                     = <80 83>

INFO_RESP ID=001 #0x5456 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element PI 80 83
       > ISDN1: Origination is non ISDN
INFO_IND ID=001 #0x5457 LEN=0023
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x70
  InfoElement                     = <c1>1234567

INFO_RESP ID=001 #0x5457 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CALLED PARTY NUMBER
    -- ISDN1: Updated channel name: CAPI/ISDN1/1234567-1
    -- ISDN1: CAPI/ISDN1/1234567-1: 1234567 would possibly match in context outside
INFO_IND ID=001 #0x5458 LEN=0016
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP ID=001 #0x5458 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CHANNEL IDENTIFICATION 89
INFO_IND ID=001 #0x5459 LEN=0018
  Controller/PLCI/NCCI            = 0x101
  InfoNumber                      = 0x70
  InfoElement                     = <c1>61

INFO_RESP ID=001 #0x5459 LEN=0012
  Controller/PLCI/NCCI            = 0x101

    -- ISDN1: info element CALLED PARTY NUMBER
    -- ISDN1: Updated channel name: CAPI/ISDN1/123456761-2
    -- ISDN1: CAPI/ISDN1/123456761-2: 123456761 matches in context outside
    -- Executing Goto("CAPI/ISDN1/123456761-2", "faxempfang|123456761|1") in new stack
    -- Goto (faxempfang,123456761,1)
    -- Executing Macro("CAPI/ISDN1/123456761-2", "faxreceive|61|"[email protected]"") in new stack
    -- Executing SetVar("CAPI/ISDN1/123456761-2", "FAXFILE=/tmp/asterisk-1645-1133538568.1") in new stack
  == Started pbx on channel CAPI/ISDN1/123456761-2
Dec  2 16:49:28 WARNING[1671]: pbx.c:5965 pbx_builtin_setvar_old: SetVar is deprecated, please use Set instead.
    -- Executing SetVar("CAPI/ISDN1/123456761-2", "EXTMAIL="[email protected]"") in new stack
    -- Executing SetVar("CAPI/ISDN1/123456761-2", "CCMAIL=") in new stack
    -- Executing capiCommand("CAPI/ISDN1/123456761-2", "receivefax|/tmp/asterisk-1645-1133538568.1") in new stack
    -- capiCommand: 'receivefax' '/tmp/asterisk-1645-1133538568.1'
    -- Setup fax b3conf fmt=0, stationid='' headline=''
  == ISDN1: Answering for 123456761
CONNECT_RESP ID=001 #0x5455 LEN=0051
  Controller/PLCI/NCCI            = 0x101
  Reject                          = 0x0
  BProtocol
   B1protocol                     = 0x4
   B2protocol                     = 0x4
   B3protocol                     = 0x4
   B1configuration                = default
   B2configuration                = default
   B3configuration                = <00 00 00 00 00 00>
   GlobalConfiguration            = default
  ConnectedNumber                 = <00 80>123456761
  ConnectedSubaddress             = default
  LLC                             = default
  AdditionalInfo
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

CONNECT_ACTIVE_IND ID=001 #0x545a LEN=0015
  Controller/PLCI/NCCI            = 0x101
  ConnectedNumber                 = default
  ConnectedSubaddress             = default
  LLC                             = default

Gruß Axel
 
Niemand mehr eine Idee, wie dieses Problem zu beheben ist?

Gruß Axel
 
Versuch mal bitte chan_capi-cm aus CVS-HEAD. Ich hatte vor zwei Tagen noch ein deadlock entfernt...

Armin
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
246,398
Beiträge
2,251,513
Mitglieder
374,089
Neuestes Mitglied
YPLCRP
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.