Fax troubles on 1.6.1.0

Community-based Support for users of Free Fax For Asterisk

Fax troubles on 1.6.1.0

Postby dmn49 » Mon Jun 08, 2009 1:25 am

Hi, everyone!

The beginning of the topic is here.

The configuration of the fax is still unsuccessfull. :(

I've tried to send the fax from one asterisk to another.

Here is configs:

iax.conf
Code: Select all
disallow=all
allow=alaw

[test]
type=friend
auth=md5
user=1
secret=<secret>
context=group2
context=to-fax
context=from-fax
;trunk=yes
;notransfer=yes
host=10.0.30.6


extensions.conf
Code: Select all
[to-group2]
exten => _7XXX,1,Dial(IAX2/Academy/${EXTEN}@group1,30,r)

[to-fax]
exten => 9975,1,Goto(fax,receive,1)
exten => receive,1,NoOp(**** FAX RECEIVE ****)
exten => receive,n,Set(GLOBAL(FAXCOUNT)=${GLOBAL(FAXCOUNT)})
exten => receive,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten => receive,n,Set(FAXFILE=fax-${FAXCOUNT}-rx.tif)
exten => receive,n,Set(GLOBAL(LASTFAXCALLERNUM)=${CALLERID(num)})
exten => receive,n,Set(GLOBAL(LASTFAXCALLERNAME)=${CALLERID(name)})
exten => receive,n,NoOp(**** SETTING FAXOPT ****)
;exten => receive,n,Set(FAXOPT(filename)=${FAXFILE})
exten => receive,n,Set(FAXOPT(ecm)=yes)
exten => receive,n,Set(FAXOPT(headerinfo)=MY FAXBACK RX)
exten => receive,n,Set(FAXOPT(localstationid)=1234567890)
exten => receive,n,Set(FAXOPT(maxrate)=14400)
exten => receive,n,Set(FAXOPT(minrate)=2400)
exten => receive,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => receive,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => receive,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => receive,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => receive,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => receive,n,NoOp(**** RECEIVING FAX : ${FAXFILE} ****)
exten => receive,n,ReceiveFAX(/home/ftp/faxin/${FAXFILE},d)


[from-fax]
exten => send,1,NoOp(**** SENDING FAX ****)
;exten => send,n,Playback(bye)
exten => send,n,Wait(6)
exten => send,n,Set(GLOBAL(FAXCOUNT)=$[ 1 + ${GLOBAL(FAXCOUNT)}])
exten => send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten => send,n,Set(FAXFILE=fax.tif)
exten => send,n,NoOp(**** SETTING FAXOPT ****)
exten => send,n,Set(FAXOPT(filename)=${FAXFILE})
exten => send,n,Set(FAXOPT(ecm)=yes)
exten => send,n,Set(FAXOPT(headerinfo)=Fax from ${GLOBAL(LASTFAXCALLERNAME)} at ${GLOBAL(LASTFAXCAL$
exten => send,n,Set(FAXOPT(localstationid)=1234567890)
exten => send,n,Set(FAXOPT(maxrate)=14400)
exten => send,n,Set(FAXOPT(minrate)=2400)
exten => send,n,NoOp(**** SENDING FAX : ${FAXFILE} ****)
exten => send,n,SendFAX(/home/ftp/faxout/${FAXFILE},d)


test.call
Code: Select all
Channel: Local/7975@group2
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: send
Extension: from-fax


debug iax2
Code: Select all
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW   
   Timestamp: 00010ms  SCall: 15719  DCall: 00000 [10.0.30.6:4569]
   VERSION         : 2
   CALLED NUMBER   : 7975
   CODEC_PREFS     : (alaw)
   CALLING NUMBER  :
   CALLING PRESNTN : 0
   CALLING TYPEOFN : 0
   CALLING TRANSIT : 0
   CALLING NAME    :
   LANGUAGE        : en
   CALLED CONTEXT  : group2
   ENCRYPTION      : 32768
   FORMAT          : 8
   CAPABILITY      : 8
   ADSICPE         : 0
   DATE TIME       : 2009-06-08  11:17:04

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: AUTHREQ
   Timestamp: 00004ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
   AUTHMETHODS     : 2
   CHALLENGE       : \x31\x30\x31\x37\x35\x35\x38\x31\x36
   USERNAME        : test

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: AUTHREP
   Timestamp: 00033ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
   MD5 RESULT      : 9fa65a01675d737944e21fe484d68565

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: ACCEPT
   Timestamp: 00028ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
   FORMAT          : 8

Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK   
   Timestamp: 00028ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 002 Type: CONTROL Subclass: ANSWER
   Timestamp: 00031ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 003 Type: IAX     Subclass: ACK   
   Timestamp: 00031ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
Tx-Frame Retry[000] -- OSeqno: 002 ISeqno: 003 Type: CONTROL Subclass: (20?)
   Timestamp: 00036ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
Tx-Frame Retry[000] -- OSeqno: 003 ISeqno: 003 Type: CONTROL Subclass: (20?)
   Timestamp: 00039ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
Tx-Frame Retry[000] -- OSeqno: 004 ISeqno: 003 Type: IAX     Subclass: HANGUP
   Timestamp: 00059ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
   CAUSE CODE      : 16

Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 002 Type: CONTROL Subclass: (255?)
   Timestamp: 00034ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 004 Type: IAX     Subclass: ACK   
   Timestamp: 00034ms  SCall: 15719  DCall: 09437 [10.0.30.6:4569]
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 003 Type: IAX     Subclass: ACK   
   Timestamp: 00036ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 004 Type: IAX     Subclass: ACK   
   Timestamp: 00039ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 005 Type: IAX     Subclass: ACK   
   Timestamp: 00059ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: INVAL 
   Timestamp: 00000ms  SCall: 09437  DCall: 15719 [10.0.30.6:4569]


Warnings in CLI
Code: Select all
[Jun  8 11:17:04] WARNING[3576]: pbx.c:3831 __ast_pbx_run: Channel 'Local/7975@group1-1987;1' sent into invalid extension 's' in context 'default', but no invalid handler
[Jun  8 11:17:04] NOTICE[3576]: pbx_spool.c:348 attempt_thread: Call completed to Local/7975@group1



On another asterisk
Code: Select all
[Jun  8 11:26:39] WARNING[11425]: res_fax.c:999 receivefax_exec: Channel 'IAX2/test2-13214' failed answer attempt.


Also I cannot send faxes throgh SIP trunk on the fax connected to the Samsung PBX.

Where is the problem? :shock: :(
dmn49
Newsterisk
 
Posts: 9
Joined: Tue Jun 02, 2009 7:47 am

Postby dmn49 » Tue Jun 09, 2009 1:46 am

I did it! 8) :twisted:

extensions.conf
Code: Select all

[from-fax]
exten => 1111,1,Playback(prompt)
exten => 1111,n(collect),Read(digito,,,,,5)
exten => 1111,n,system(cp -f /etc/asterisk/pattern.call /etc/asterisk/fax.call && vim "+1s/XXXX/${digito}/" "+wq" /etc/asterisk/fax.call && cp /etc/asterisk/fax.call /var/spool/asterisk/outgoing/)

exten => send,1,NoOp(**** SENDING FAX ****)
exten => send,n,Playback(receive-fax)
exten => send,n,Wait(6)
exten => send,n,Set(GLOBAL(FAXCOUNT)=$[ 1 + ${GLOBAL(FAXCOUNT)}])
exten => send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten => send,n,Set(FAXFILE=fax.tif)
exten => send,n,SendFAX(/home/ftp/faxout/${FAXFILE},d)


[prompts]
exten => 100,1,Wait(2)
exten => 100,n,Record(/var/lib/asterisk/sounds/ru/receive-fax:alaw)
exten => 100,n,NoOp(${RECORDED_FILE})
exten => 100,n,Wait(2)
exten => 100,n,Playback(/var/lib/asterisk/sounds/ru/receive-fax)
exten => 100,n,NoOp(${PLAYBACKSTATUS})
exten => 100,n,Wait(1)
exten => 100,n,Hangup()

[fax]
include => to-fax
include => to-group1
include => from-fax



pattern.call
Code: Select all
Channel: Local/XXXX@group1
MaxRetries: 1
RetryTime: 60
WaitTime: 30
Context: fax
Extension: send
Priority: 1


It works! :D
dmn49
Newsterisk
 
Posts: 9
Joined: Tue Jun 02, 2009 7:47 am


Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest