[asterisk-users] Problem with ReceiveFax

Ishfaq Malik ish at pack-net.co.uk
Mon Mar 12 04:27:19 CDT 2012


On Fri, 2012-03-02 at 15:32 +0000, Ishfaq Malik wrote:
> I'm trying to get an inbound fax written to a tiff file but I'm having
> major problems. Using asterisk 1.8.7.0 on CentOS 5.6
> 
> Here's the CLI output when I try
> 
> CLI> 
>   == Using UDPTL CoS mark 5
>   == Using SIP RTP CoS mark 5
>     -- Executing [200 at local:1] Goto("SIP/588-00000007", "fax-in,s,1")
>     -- Goto (fax-in,s,1)
>     -- Executing [s at fax-in:1] Answer("SIP/588-00000007", "")
>     -- Executing [s at fax-in:2] Wait("SIP/588-00000007", "3")
> [2012-03-02 15:11:27] NOTICE[4628]: chan_sip.c:7280 sip_read: FAX CNG detected but no fax extension
>     -- Executing [s at fax-in:3] Set("SIP/588-00000007", "FAXFILE=/tmp/fax-588-20120302-151130.tiff")
>     -- Executing [s at fax-in:4] ReceiveFAX("SIP/588-00000007", "/tmp/fax-588-20120302-151130.tiff")
>     -- Channel 'SIP/588-00000007' receiving FAX '/tmp/fax-588-20120302-151130.tiff'
> [2012-03-02 15:11:33] WARNING[4628]: res_fax.c:1508 receivefax_t38_init: channel 'SIP/588-00000007' refused to negotiate T.38
> [2012-03-02 15:11:33] WARNING[4628]: res_fax.c:1529 receivefax_t38_init: Audio FAX not allowed on channel 'SIP/588-00000007' and T.38 negotiation failed; aborting.
> [2012-03-02 15:11:33] ERROR[4628]: res_fax.c:1734 receivefax_exec: error initializing channel 'SIP/588-00000007' in T.38 mode
>   == Spawn extension (fax-in, s, 4) exited non-zero on 'SIP/588-00000007'
>     -- Executing [h at fax-in:1] NoOP("SIP/588-00000007", "###       FAXSTATUS: FAILED")
>     -- Executing [h at fax-in:2] NoOP("SIP/588-00000007", "###        FAXERROR: T38_NEG_ERROR")
>     -- Executing [h at fax-in:3] NoOP("SIP/588-00000007", "###         FAXMODE: ")
>     -- Executing [h at fax-in:4] NoOP("SIP/588-00000007", "###        FAXPAGES: 0")
>     -- Executing [h at fax-in:5] NoOP("SIP/588-00000007", "###      FAXBITRATE: ")
>     -- Executing [h at fax-in:6] NoOP("SIP/588-00000007", "###   FAXRESOLUTION: ")
>     -- Executing [h at fax-in:7] NoOP("SIP/588-00000007", "### REMOTESTATIONID: ")
>     -- Executing [h at fax-in:8] System("SIP/588-00000007", "mail -s FaxToEmail ish at pack-net.co.uk < /tmp/fax-588-20120302-151130.tiff")
> [2012-03-02 15:11:33] WARNING[3685]: chan_sip.c:8740 process_sdp: Unsupported SDP media type in offer: audio 0 RTP/AVP 8
> [2012-03-02 15:11:33] WARNING[3685]: chan_sip.c:8827 process_sdp: Failing due to no acceptable offer found
> 
> 
> Any insight in to what is going wrong would be really helpful.
> 
> I'm using Fax for Asterisk and have attained a license and installed it.
> 
> The fax machine is connection to a Draytek VoIP enabled router and then to our test server
> 
> Here's the settings for the peer
> 
> carthage*CLI> sip show peer 588
> 
> 
>   * Name       : 588
>   Realtime peer: Yes, cached
>   Secret       : <Set>
>   MD5Secret    : <Not set>
>   Remote Secret: <Not set>
>   Context      : local
>   Subscr.Cont. : <Not set>
>   Language     : 
>   AMA flags    : Unknown
>   Transfer mode: open
>   CallingPres  : Presentation Allowed, Not Screened
>   Callgroup    : 
>   Pickupgroup  : 
>   MOH Suggest  : 
>   Mailbox      : 
>   VM Extension : asterisk
>   LastMsgsSent : 32767/65535
>   Call limit   : 5
>   Max forwards : 0
>   Dynamic      : Yes
>   Callerid     : "" <>
>   MaxCallBR    : 384 kbps
>   Expire       : 2598
>   Insecure     : no
>   Force rport  : Yes
>   ACL          : No
>   DirectMedACL : No
>   T.38 support : Yes
>   T.38 EC mode : FEC
>   T.38 MaxDtgrm: -1
>   DirectMedia  : No
>   PromiscRedir : No
>   User=Phone   : No
>   Video Support: No
>   Text Support : No
>   Ign SDP ver  : No
>   Trust RPID   : No
>   Send RPID    : Yes
>   Subscriptions: Yes
>   Overlap dial : Yes
>   DTMFmode     : rfc2833
>   Timer T1     : 500
>   Timer B      : 32000
>   ToHost       : 
>   Addr->IP     : 82.68.49.35:5060
>   Defaddr->IP  : (null)
>   Prim.Transp. : UDP
>   Allowed.Trsp : UDP
>   Def. Username: 588
>   SIP Options  : replaces replace 
>   Codecs       : 0x10c (ulaw|alaw|g729)
>   Codec Order  : (alaw:20,ulaw:20,g729:20)
>   Auto-Framing :  No 
>   100 on REG   : Yes
>   Status       : OK (36 ms)
>   Useragent    : DrayTek UA-1.2.3 Vigor2710 3.3.6.1_232201
>   Reg. Contact : sip:588 at xxx.xxx.xxx.xxx
>   Qualify Freq : 120000 ms
>   Sess-Timers  : Accept
>   Sess-Refresh : uas
>   Sess-Expires : 1800 secs
>   Min-Sess     : 90 secs
>   RTP Engine   : asterisk
>   Parkinglot   : 
>   Use Reason   : No
>   Encryption   : No
> 
> 
> Here's the relevant sip settings
> 
>   T.38 support:           Yes
>   T.38 EC mode:           FEC
>   T.38 MaxDtgrm:          -1
> 
> 
> here's the fax settings
> 
> fax show settings
> FAX For Asterisk Settings:
> 	ECM: Enabled
> 	Status Events: On
> 	Minimum Bit Rate: 2400
> 	Maximum Bit Rate: 14400
> 	Modem Modulations Allowed: V17,V27,V29
> 
> 
> FAX Technology Modules:
> 
> DIGIUM (Digium FAX Driver) Settings:
> 	Maximum T.38 Packet Delay: 800
> 	T.38 Session Packet Capture: Off
> 	G.711 Session Audio Capture: Off
> 
> fax show stats
> 
> FAX Statistics:
> ---------------
> 
> Current Sessions     : 0
> Reserved Sessions    : 0
> Transmit Attempts    : 0
> Receive Attempts     : 9
> Completed FAXes      : 0
> Failed FAXes         : 9
> 
> Digium G.711        
> Licensed Channels    : 1
> Max Concurrent       : 0
> Success              : 0
> Switched to T.38     : 0
> Canceled             : 0
> No FAX               : 0
> Partial              : 0
> Negotiation Failed   : 0
> Train Failure        : 0
> Protocol Error       : 0
> IO Partial           : 0
> IO Fail              : 0
> 
> Digium T.38         
> Licensed Channels    : 1
> Max Concurrent       : 0
> Success              : 0
> Canceled             : 0
> No FAX               : 0
> Partial              : 0
> Negotiation Failed   : 0
> Train Failure        : 0
> Protocol Error       : 0
> IO Partial           : 0
> IO Fail              : 0
> 


I've tried this with the f option on receiveFax but it still isn't
working. Any insight would be helpful as this is driving me a bit potty

  == Using UDPTL CoS mark 5
  == Using SIP RTP CoS mark 5
    -- Executing [200 at local:1] Goto("SIP/588-00000000", "fax-in,s,1")
    -- Goto (fax-in,s,1)
    -- Executing [s at fax-in:1] Answer("SIP/588-00000000", "")
    -- Executing [s at fax-in:2] Wait("SIP/588-00000000", "3")
    -- Executing [s at fax-in:3] Set("SIP/588-00000000", "FAXFILE=/tmp/fax-588-20120312-092231.tiff")
    -- Executing [s at fax-in:4] ReceiveFAX("SIP/588-00000000", "/tmp/fax-588-20120312-092231.tiff,f")
    -- Channel 'SIP/588-00000000' receiving FAX '/tmp/fax-588-20120312-092231.tiff'
[2012-03-12 09:22:34] WARNING[4529]: res_fax.c:1508 receivefax_t38_init: channel 'SIP/588-00000000' refused to negotiate T.38
    -- Channel 'SIP/588-00000000' FAX session '0' started
[2012-03-12 09:22:34] WARNING[3763]: chan_sip.c:8740 process_sdp: Unsupported SDP media type in offer: audio 0 RTP/AVP 8
[2012-03-12 09:22:34] WARNING[3763]: chan_sip.c:8827 process_sdp: Failing due to no acceptable offer found
[2012-03-12 09:22:44] ERROR[4529]: res_fax.c:1344 generic_fax_exec: channel 'SIP/588-00000000' FAX session '0' failure, reason: 'fax session timed-out' (TIMEOUT)
    -- Executing [s at fax-in:5] Hangup("SIP/588-00000000", "")
  == Spawn extension (fax-in, s, 5) exited non-zero on 'SIP/588-00000000'
    -- Executing [h at fax-in:1] NoOP("SIP/588-00000000", "###       FAXSTATUS: FAILED")
    -- Executing [h at fax-in:2] NoOP("SIP/588-00000000", "###        FAXERROR: TIMEOUT")
    -- Executing [h at fax-in:3] NoOP("SIP/588-00000000", "###         FAXMODE: ")
    -- Executing [h at fax-in:4] NoOP("SIP/588-00000000", "###        FAXPAGES: 0")
    -- Executing [h at fax-in:5] NoOP("SIP/588-00000000", "###      FAXBITRATE: ")
    -- Executing [h at fax-in:6] NoOP("SIP/588-00000000", "###   FAXRESOLUTION: ")
    -- Executing [h at fax-in:7] NoOP("SIP/588-00000000", "### REMOTESTATIONID: ")
    -- Executing [h at fax-in:8] System("SIP/588-00000000", "mail -s FaxToEmail ish at -net.co.uk < /tmp/fax-588-20120312-092231.tiff")
    -- FAX handle 0: [ 040.001588 ], entering CLOSING state
    -- Channel 'SIP/588-00000000' FAX session '0' is complete, result: 'FAILED' (FAX_NO_FAX), error: 'T1_TIMEOUT', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''

Thanks in Advance

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062




More information about the asterisk-users mailing list