Fax-On-Demand Server

Klingelding

Neuer User
Mitglied seit
6 Sep 2004
Beiträge
45
Punkte für Reaktionen
0
Punkte
6
Hi,

besteht die Möglichkeit einen Fax-On-Demand (Faxpolling, Faxabruf) -Server auch mit chan_capi zu realisieren, so wie es mit der Option "a" von SendFAX moeglich ist?

-= Info about application 'SendFAX' =-

[..]

[Syntax]
SendFAX(filename[,a])

[Arguments]
filename
Filename of TIFF file to fax
a
Makes the application behave as the answering machine
(Default behavior is as calling machine)
 
Sicher geht das. im Dialplan mit capicommand(sendfax ...)

Armin
 
Hi,

Danke für deine Antwort.

Sicher geht das. im Dialplan mit capicommand(sendfax ...)

leider nein oder ich mache etwas Falsch.

Mit 123456,1,capicommand(sendfax|/tmp/fax.sff) kann ich kein Fax zum Abruf bereitstellen.
Es funktioniert nur wenn man 123456 z.B. mit einem Telefon anruft und dann mit einem Faxgerät verbindet. Genauso verhält sich auch SendFAX(/tmp/fax.tiff) aus app_fax.

Mit 123456,1,SendFAX(/tmp/fax.tiff,a) kann ich direkt ein Fax unter 123456 mit einem Faxgerät abrufen.
Der Faxabruf wurde u.A. mit HylaFAX (sendfax -p -d 123456) getestet.


Schön wäre es, wenn das auch mit capicommand(sendfax..) gehen würde. Dann könnte ich auf app_fax mit spandsp verzichten.
 
Zuletzt bearbeitet:
Es sollte funktionieren. Bei einer ankommenden Verbindung und capicommand(sendfax) wird automatisch auf die 'senderichtung' umgeschaltet.
Ob du was falsch machst wäre nur mit einem Log zu sagen (mit 'set verbose 5' und 'capi debug')

Armin
 
Hi,

Ob du was falsch machst wäre nur mit einem Log zu sagen (mit 'set verbose 5' und 'capi debug')


Asterisk 1.6.2.6
chan-capi 1.1.5

Hier sind die Logauszüge.

Beim ersten Logauszug wurde asterisk vom Telefon aus angerufen und anschliessend das Gespräch an ein ein Faxgerät weitergeleitet. Hierbei funktioniert der Abruf.
Code:
   GlobalConfiguration            = <01 00>
CAPI: ApplId=0x0002 Command=0x02 SubCommand=0x82 MsgNum=0x0019 NCCI=0x00000501
CONNECT_IND                ID=002 #0x0019 LEN=0051
  Controller/PLCI/NCCI            = 0x501
  CIPValue                        = 0x1
  CalledPartyNumber               = <c1>123456
  CallingPartyNumber              = <21 83>789123
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <80 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo                
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

    -- CONNECT_IND (PLCI=0x501,DID=123456,CID=789123,CIP=0x1,CONTROLLER=0x1)
       > ISDN1#02: msn='*' DNID='123456' MSN
  == ISDN1#02: setting format alaw - 0x8 (alaw)
  == ISDN1#02: Incoming call '0789123' -> '123456'
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x001a NCCI=0x00000501
INFO_IND                   ID=002 #0x001a LEN=0017
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0x1e
  InfoElement                     = <80 83>

INFO_RESP                  ID=002 #0x001a LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element PI 80 83
       > ISDN1#02: Origination is non ISDN
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x001b NCCI=0x00000501
INFO_IND                   ID=002 #0x001b LEN=0024
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0x70
  InfoElement                     = <c1>123456

INFO_RESP                  ID=002 #0x001b LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element CALLED PARTY NUMBER
       > ISDN1#02: INFO_IND DID digits not used in this state.
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x001c NCCI=0x00000501
INFO_IND                   ID=002 #0x001c LEN=0015
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0xa1
  InfoElement                     = default

INFO_RESP                  ID=002 #0x001c LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element Sending Complete
    -- ISDN1#02: CAPI/ISDN1#02/123456-2: 123456 matches in context isdn-in
  == Started pbx on channel CAPI/ISDN1#02/123456-2
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x001d NCCI=0x00000501
INFO_IND                   ID=002 #0x001d LEN=0016
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP                  ID=002 #0x001d LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element CHANNEL IDENTIFICATION 89
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x001e NCCI=0x00000501
INFO_IND                   ID=002 #0x001e LEN=0015
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0x8005
  InfoElement                     = default

INFO_RESP                  ID=002 #0x001e LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element SETUP
       > ISDN1#02: IE SETUP / SENDING-COMPLETE already received.
    -- Executing [123456@isdn-in:1] capicommand("CAPI/ISDN1#02/123456-2", "sendfax|/tmp/foo.sff") in new stack
[May  4 14:28:12] WARNING[4954]: pbx.c:1344 pbx_exec: The application delimiter is now the comma, not the pipe.  Did you forget to convert your dialplan?  (capicommand(sendfax|/tmp/foo.sff))
    -- capicommand: 'sendfax' '/tmp/foo.sff'
    -- capi sendfax: '/tmp/foo.sff' '' ''
    -- Setup fax b3conf fmt=0, stationid='' headline=''
  == ISDN1#02: Answering for 123456
       > chan_capi devicestate requested for ISDN1#02/123456 is 'Ringing'
CONNECT_RESP               ID=002 #0x0019 LEN=0052
  Controller/PLCI/NCCI            = 0x501
  Reject                          = 0x0
  BProtocol                     
   B1protocol                     = 0x4
   B2protocol                     = 0x4
   B3protocol                     = 0x4
   B1configuration                = default
   B2configuration                = default
   B3configuration                = <00 00 00 00 00 00>
   GlobalConfiguration            = <01 00>
  ConnectedNumber                 = <01 80>123456
  ConnectedSubaddress             = default
  LLC                             = default
  AdditionalInfo                
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

CAPI: ApplId=0x0002 Command=0x03 SubCommand=0x82 MsgNum=0x0020 NCCI=0x00000501
CONNECT_ACTIVE_IND         ID=002 #0x0020 LEN=0015
  Controller/PLCI/NCCI            = 0x501
  ConnectedNumber                 = default
  ConnectedSubaddress             = default
  LLC                             = default

CONNECT_ACTIVE_RESP        ID=002 #0x0020 LEN=0012
  Controller/PLCI/NCCI            = 0x501

CONNECT_B3_REQ             ID=002 #0x0008 LEN=0013
  Controller/PLCI/NCCI            = 0x501
  NCPI                            = default

    -- ISDN1#02: sent CONNECT_B3_REQ PLCI=0x501
CAPI: ApplId=0x0002 Command=0x82 SubCommand=0x81 MsgNum=0x0008 NCCI=0x00060501
CONNECT_B3_CONF            ID=002 #0x0008 LEN=0014
  Controller/PLCI/NCCI            = 0x60501
  Info                            = 0x0

CAPI: ApplId=0x0002 Command=0x83 SubCommand=0x82 MsgNum=0x0021 NCCI=0x00060501
CONNECT_B3_ACTIVE_IND      ID=002 #0x0021 LEN=0013
  Controller/PLCI/NCCI            = 0x60501
  NCPI                            = default

CONNECT_B3_ACTIVE_RESP     ID=002 #0x0021 LEN=0012
  Controller/PLCI/NCCI            = 0x60501

    -- ISDN1#02: Start sending fax.
    -- ISDN1#02: Fax connection, no EC/DTMF
    -- ISDN1#02: completed faxsend.
DISCONNECT_B3_REQ          ID=002 #0x0216 LEN=0013
  Controller/PLCI/NCCI            = 0x60501
  NCPI                            = default

CAPI: ApplId=0x0002 Command=0x84 SubCommand=0x81 MsgNum=0x0216 NCCI=0x00060501
DISCONNECT_B3_CONF         ID=002 #0x0216 LEN=0014
  Controller/PLCI/NCCI            = 0x60501
  Info                            = 0x0

CAPI: ApplId=0x0002 Command=0x84 SubCommand=0x82 MsgNum=0x0023 NCCI=0x00060501
DISCONNECT_B3_IND          ID=002 #0x0023 LEN=0044
  Controller/PLCI/NCCI            = 0x60501
  Reason_B3                       = 0x0
  NCPI                            = <80 25 00 00 00 00 02 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>

DISCONNECT_B3_RESP         ID=002 #0x0023 LEN=0012
  Controller/PLCI/NCCI            = 0x60501

DISCONNECT_REQ             ID=002 #0x0217 LEN=0013
  Controller/PLCI/NCCI            = 0x501
  AdditionalInfo                  = default

CAPI: ApplId=0x0002 Command=0x04 SubCommand=0x81 MsgNum=0x0217 NCCI=0x00000501
DISCONNECT_CONF            ID=002 #0x0217 LEN=0014
  Controller/PLCI/NCCI            = 0x501
  Info                            = 0x0

CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0024 NCCI=0x00000501
INFO_IND                   ID=002 #0x0024 LEN=0015
  Controller/PLCI/NCCI            = 0x501
  InfoNumber                      = 0x804d
  InfoElement                     = default

INFO_RESP                  ID=002 #0x0024 LEN=0012
  Controller/PLCI/NCCI            = 0x501

    -- ISDN1#02: info element RELEASE
CAPI: ApplId=0x0002 Command=0x04 SubCommand=0x82 MsgNum=0x0026 NCCI=0x00000501
DISCONNECT_IND             ID=002 #0x0026 LEN=0014
  Controller/PLCI/NCCI            = 0x501
  Reason                          = 0x3490

DISCONNECT_RESP            ID=002 #0x0026 LEN=0012
  Controller/PLCI/NCCI            = 0x501

       > ISDN1#02: CAPI INFO 0x3490: Normal call clearing
    -- chan_capi queue frame:[ TYPE: Control (4) SUBCLASS: Hangup (1) ] [ISDN1#02]
    -- capi sendfax: hangup.
    -- Closing fax file...
 capi sendfax: fax sent successful.
    -- Executing [h@isdn-in:1] NoOp("CAPI/ISDN1#02/123456-2", "Status: 0, Reason: 0, REASONTEXT: OK, Rate: 9600,  Resolution:0, Format: 0, Pages: 2, ID:  ") in new stack                                
  == ISDN1#02: CAPI Hangingup for PLCI=0xdead0000 in state 4
  == ISDN1#02: Interface cleanup PLCI=0xdead0000
       > chan_capi devicestate requested for ISDN1#02/123456 is 'Not in use'
       > chan_capi devicestate requested for ISDN1#02/123456 is 'Not in use'


Beim 2. Logauszug wurde der Faxabruf mit Hylafax (sendfax -p -d 123456) gestartet. Der Abruf ist nicht erfolgreich.
Code:
CAPI: ApplId=0x0002 Command=0x02 SubCommand=0x82 MsgNum=0x003f NCCI=0x00000201
CONNECT_IND                ID=002 #0x003f LEN=0051
  Controller/PLCI/NCCI            = 0x201
  CIPValue                        = 0x4
  CalledPartyNumber               = <c1>123456
  CallingPartyNumber              = <21 83>789123
  CalledPartySubaddress           = default
  CallingPartySubaddress          = default
  BC                              = <90 90 a3>
  LLC                             = default
  HLC                             = default
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

    -- CONNECT_IND (PLCI=0x201,DID=123456,CID=789123,CIP=0x4,CONTROLLER=0x1)
       > ISDN1#02: msn='*' DNID='123456' MSN
  == ISDN1#02: setting format alaw - 0x8 (alaw)
  == ISDN1#02: Incoming call '0789123' -> '123456'
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0040 NCCI=0x00000201
INFO_IND                   ID=002 #0x0040 LEN=0017
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x1e
  InfoElement                     = <80 83>

INFO_RESP                  ID=002 #0x0040 LEN=0012
  Controller/PLCI/NCCI            = 0x201

    -- ISDN1#02: info element PI 80 83
       > ISDN1#02: Origination is non ISDN
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0041 NCCI=0x00000201
INFO_IND                   ID=002 #0x0041 LEN=0024
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x70
  InfoElement                     = <c1>123456

INFO_RESP                  ID=002 #0x0041 LEN=0012
  Controller/PLCI/NCCI            = 0x201

    -- ISDN1#02: info element CALLED PARTY NUMBER
       > ISDN1#02: INFO_IND DID digits not used in this state.
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0042 NCCI=0x00000201
INFO_IND                   ID=002 #0x0042 LEN=0015
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0xa1
  InfoElement                     = default

INFO_RESP                  ID=002 #0x0042 LEN=0012
  Controller/PLCI/NCCI            = 0x201

    -- ISDN1#02: info element Sending Complete
    -- ISDN1#02: CAPI/ISDN1#02/123456-5: 123456 matches in context isdn-in
  == Started pbx on channel CAPI/ISDN1#02/123456-5
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0043 NCCI=0x00000201
INFO_IND                   ID=002 #0x0043 LEN=0016
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x18
  InfoElement                     = <89>

INFO_RESP                  ID=002 #0x0043 LEN=0012
  Controller/PLCI/NCCI            = 0x201

    -- ISDN1#02: info element CHANNEL IDENTIFICATION 89
CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0044 NCCI=0x00000201
INFO_IND                   ID=002 #0x0044 LEN=0015
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x8005
  InfoElement                     = default

INFO_RESP                  ID=002 #0x0044 LEN=0012
  Controller/PLCI/NCCI            = 0x201
    -- ISDN1#02: info element SETUP
       > ISDN1#02: IE SETUP / SENDING-COMPLETE already received.
    -- Executing [123456@isdn-in:1] capicommand("CAPI/ISDN1#02/123456-5", "sendfax|/tmp/foo.sff") in new stack
[May  4 15:18:19] WARNING[6738]: pbx.c:1344 pbx_exec: The application delimiter is now the comma, not the pipe.  Did you forget to convert your dialplan?  (c
apicommand(sendfax|/tmp/foo.sff))
    -- capicommand: 'sendfax' '/tmp/foo.sff'
    -- capi sendfax: '/tmp/foo.sff' '' ''
    -- Setup fax b3conf fmt=0, stationid='' headline=''
  == ISDN1#02: Answering for 123456
CONNECT_RESP               ID=002 #0x003f LEN=0052
  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            = <01 00>
  ConnectedNumber                 = <01 80>123456
  ConnectedSubaddress             = default
  LLC                             = default
  AdditionalInfo                 
   BChannelinformation            = default
   Keypadfacility                 = default
   Useruserdata                   = default
   Facilitydataarray              = default
   SendingComplete                = default

       > chan_capi devicestate requested for ISDN1#02/123456 is 'In use'
CAPI: ApplId=0x0002 Command=0x03 SubCommand=0x82 MsgNum=0x0046 NCCI=0x00000201
CONNECT_ACTIVE_IND         ID=002 #0x0046 LEN=0015
  Controller/PLCI/NCCI            = 0x201
  ConnectedNumber                 = default
  ConnectedSubaddress             = default
  LLC                             = default

CONNECT_ACTIVE_RESP        ID=002 #0x0046 LEN=0012
  Controller/PLCI/NCCI            = 0x201

CONNECT_B3_REQ             ID=002 #0x021c LEN=0013
  Controller/PLCI/NCCI            = 0x201
  NCPI                            = default

    -- ISDN1#02: sent CONNECT_B3_REQ PLCI=0x201
CAPI: ApplId=0x0002 Command=0x82 SubCommand=0x81 MsgNum=0x021c NCCI=0x00090201
CONNECT_B3_CONF            ID=002 #0x021c LEN=0014
  Controller/PLCI/NCCI            = 0x90201
  Info                            = 0x0

CAPI: ApplId=0x0002 Command=0x84 SubCommand=0x82 MsgNum=0x0047 NCCI=0x00090201
DISCONNECT_B3_IND          ID=002 #0x0047 LEN=0044
  Controller/PLCI/NCCI            = 0x90201
  Reason_B3                       = 0x3311
  NCPI                            = <40>8<00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>

DISCONNECT_B3_RESP         ID=002 #0x0047 LEN=0012
  Controller/PLCI/NCCI            = 0x90201

DISCONNECT_REQ             ID=002 #0x021d LEN=0013
  Controller/PLCI/NCCI            = 0x201
  AdditionalInfo                  = default

CAPI: ApplId=0x0002 Command=0x04 SubCommand=0x81 MsgNum=0x021d NCCI=0x00000201
DISCONNECT_CONF            ID=002 #0x021d LEN=0014
  Controller/PLCI/NCCI            = 0x201
  Info                            = 0x0

CAPI: ApplId=0x0002 Command=0x08 SubCommand=0x82 MsgNum=0x0048 NCCI=0x00000201
INFO_IND                   ID=002 #0x0048 LEN=0015
  Controller/PLCI/NCCI            = 0x201
  InfoNumber                      = 0x804d
  InfoElement                     = default

INFO_RESP                  ID=002 #0x0048 LEN=0012
  Controller/PLCI/NCCI            = 0x201

    -- ISDN1#02: info element RELEASE
CAPI: ApplId=0x0002 Command=0x04 SubCommand=0x82 MsgNum=0x004a NCCI=0x00000201
DISCONNECT_IND             ID=002 #0x004a LEN=0014
  Controller/PLCI/NCCI            = 0x201
  Reason                          = 0x3490

DISCONNECT_RESP            ID=002 #0x004a LEN=0012
  Controller/PLCI/NCCI            = 0x201

       > ISDN1#02: CAPI INFO 0x3490: Normal call clearing
    -- chan_capi queue frame:[ TYPE: Control (4) SUBCLASS: Hangup (1) ] [ISDN1#02]
    -- capi sendfax: hangup.
    -- Closing fax file...
 capi sendfax: fax send failed reason=0x3490 reasonB3=0x3311
    -- Executing [h@isdn-in:1] NoOp("CAPI/ISDN1#02/123456-5", "Status: 1, Reason: 13073, REASONTEXT: Connecting not successful (remote station is no FAX G3 machine), Rate: 14400,  Resolution:0, Format: 0, Pages: 0, ID:  ") in new stack                                   
  == ISDN1#02: CAPI Hangingup for PLCI=0xdead0000 in state 4
  == ISDN1#02: Interface cleanup PLCI=0xdead0000
       > chan_capi devicestate requested for ISDN1#02/123456 is 'Not in use'
       > chan_capi devicestate requested for ISDN1#02/123456 is 'Not in use'


Hylafax protokollierte dazu:
Code:
SESSION BEGIN 000077887 123456
HylaFAX (tm) Version 4.4.5
SEND FAX: JOB 63784 DEST 123456 COMMID 000077887 DEVICE '/dev/ttyds1'

<-- [12:AT+FCLASS=1\r]
--> [2:OK]
MODEM set XON/XOFF/FLUSH: input ignored, output disabled
DIAL 123456
<-- [13:ATDT123456\r]
--> [2:^P^C]
SEND FAILED: JOB 63784 DEST 123456 ERR [6] Unknown problem
<-- [5:ATH0\r]
--> [10:NO CARRIER]
MODEM No carrier
MODEM set DTR OFF
SESSION END

Fuehrt man den Test mit SendFAX(/tmp/fax.tiff,a) durch, kann man mit Hylafax Faxe abrufen.
Laesst man die Option "a" weg, verhällt es sich so wie capicommand(sendfax|/tmp/fax.sff).

Eigentlich sollte Faxpolling, wie z.B. mit Hylafax, und der Faxabruf mittels Weiterleitung an
ein Faxgerät mit der gleichen Konfiguration klappen.
 
Sorry, mein Fehler. Ich habe da selbst was durcheinander gebracht.
Fax-Polling ist in der Tat in chan_capi noch nicht eingebaut. Man kann zwar Faxe senden bei einem ankommenden Ruf, aber das ist noch kein Polling (vom Fax-Protokoll her).
Hierzu müsste chan_capi etwas erweitert werden.

Armin
 
Bei mir gibt es solche Überlegungen bisher nicht, da ich noch keine Verwendung dafür hatte.

Armin
 
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.