Hi. I've been using the RxFAX() Callweaver application over a SIP 
channel for a long time. As my provider (Eutelia, Italy) supports T38, 
inbound faxing has always been reliable.

Now I've created a procmail rule that calls a bash script that converts 
an attached PDF, generates the call file (as in the Wiki, with some 
modifications to allow me to track back the sender e-mail and the phone 
number to use as destination) and moves it to the Callweaver outgoing 
directory (maybe I could put it on the wiki, if someone is interested in 
it). It works perfectly sending faxes to a TDM400 (ZAP) line, but fails 
when trying to use the Eutelia SIP channel.

Here's the extensions.conf section:

[faxout]
exten => s,1,Set(SIP_CODEC=ulaw)
exten => s,n,Set(LOCALSTATIONID=My FAX)
exten => s,n,Set(LOCALHEADERINFO=Fax Server)
exten => s,n,TxFAX(${FAXFILE},caller,ecm,debug)
exten => s,n,Hangup()

Don't know if the codec switch is needed (the standard for the SIP trunk 
is g729), but the result is the same.

The called machine usually detects that the call is a fax one, but fails 
to handshake.
Here's the debug code of a failed call (maybe there's something unuseful 
and not needed, sorry):

--------------------------------------------
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Our T38 capability (12048)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:--)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Setting NAT on RTP to 1
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:--)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:--)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Setting NAT on UDPTL to 1
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:--)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Outgoing Call for 051XXXXXX
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Our T38 capability 
(12048), joint T38 capability (12048)
Feb 25 00:18:37 DEBUG[4117609360] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:37 DEBUG[4124998544] chan_sip.c: Acked pending invite 102
Feb 25 00:18:37 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 102: Match 
Found
Feb 25 00:18:37 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:37 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:37 DEBUG[4124998544] chan_sip.c: (Provisional) Stopping 
retransmission (but retaining packet) on 
'[email protected]' Request 103: Found
Feb 25 00:18:40 DEBUG[4124998544] chan_sip.c: (Provisional) Stopping 
retransmission (but retaining packet) on 
'[email protected]' Request 103: Found
Feb 25 00:18:40 DEBUG[4124998544] chan_sip.c: Activating RTP on response 
[email protected] (1)
Feb 25 00:18:40 DEBUG[4124998544] chan_sip.c: T38 state changed to 0 on 
channel SIP/051XXXXXX-out-3f27
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: Acked pending invite 103
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 103: Match 
Found
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: Activating RTP on response 
[email protected] (1)
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: T38 state changed to 0 on 
channel SIP/051XXXXXX-out-3f27
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: build_route: Record-Route 
hop: <sip:83.211.227.13;ftag=as6902d66e;lr=on>
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: build_route: Record-Route 
hop: <sip:83.211.227.21;ftag=as6902d66e;lr=on>
Feb 25 00:18:41 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:41 DEBUG[4117609360] rtp.c: Had to change frame MS from 0 to 20
Feb 25 00:18:41 DEBUG[4117609360] rtp.c: Able to create smoother  :) 
ms: 20 len 20
Feb 25 00:18:41 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:41 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:42 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:42 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:44 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:44 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:44 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:45 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:45 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:45 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier down (-1) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Carrier up (-2) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Abort (-8) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Abort (-8) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 HDLC signal 
status is Framing OK (-6) in state 18
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW T.30 Changing from 
phase T30_PHASE_A_CNG to T30_PHASE_B_RX
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW FAX Set rx type 4
Feb 25 00:18:47 DEBUG[4117609360] app_txfax.c: FLOW FAX Set tx type 0
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: Activating UDPTL on 
response [email protected] (1)
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: T38 state changed to 4 on 
channel SIP/051XXXXXX-out-3f27
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: FaxVersion: 0
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: T38MaxBitRate: 14400
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: RateMangement: transferredTCF
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: MaxBufferSize:200
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: FaxMaxDatagram: 72
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: UDP EC: t38UDPRedundancy
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: T38MaxFaxRate 14400 found
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: T38 state changed to 5 on 
channel SIP/051XXXXXX-out-3f27
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: T38mode enabled for 
channel SIP/051XXXXXX-out-3f27
Feb 25 00:18:48 DEBUG[4117609360] app_txfax.c: FLOW T.38 Tx     0: 
indicator no-signal
Feb 25 00:18:48 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Response 101: 
Match Found
Feb 25 00:18:48 DEBUG[4117609360] app_txfax.c: FLOW T.38 Tx     1: 
indicator cng
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Scheduled a registration 
timeout for sip.voipcheap.co.uk id  #109
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 104: Match Found
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 105: Match Found
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Registration successful
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Cancelling timeout 109
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Scheduled a registration 
timeout for voip.eutelia.it id  #114
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 104: Match Found
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Registration successful
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Cancelling timeout 114
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Scheduled a registration 
timeout for voip.eutelia.it id  #118
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Scheduled a registration 
timeout for 88.61.111.250 id  #120
Feb 25 00:18:51 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 104: Match Found
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Registration successful
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Cancelling timeout 118
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: (Provisional) Stopping 
retransmission (but retaining packet) on 
'[email protected]' Request 104: Found
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 104: Match Found
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: (Provisional) Stopping 
retransmission (but retaining packet) on 
'[email protected]' Request 105: Found
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Stopping retransmission on 
'[email protected]' of Request 105: Match Found
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Registration successful
Feb 25 00:18:52 DEBUG[4124998544] chan_sip.c: Cancelling timeout 120
Feb 25 00:18:57 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=RFC3581/global nat=RFC3581/Channel:--)
Feb 25 00:19:23 DEBUG[4124998544] chan_sip.c: Auto destroying call 
'[email protected]'
Feb 25 00:19:23 DEBUG[4124998544] chan_sip.c: Auto destroying call 
'[email protected]'
Feb 25 00:19:24 DEBUG[4124998544] chan_sip.c: Auto destroying call 
'[email protected]'
Feb 25 00:19:24 DEBUG[4124998544] chan_sip.c: Auto destroying call 
'[email protected]'
Feb 25 00:19:31 DEBUG[4124998544] chan_sip.c: Check nat (client is on 
local net/peer nat=Always/global nat=RFC3581/Channel:SIP/051XXXXXX-out-3f27)
Feb 25 00:19:31 DEBUG[4117609360] generator.c: Trying to deactivate 
generator in SIP/051XXXXXX-out-3f27
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: 
==============================================================================
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: Fax send not successful - 
result (49) The call dropped prematurely.
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: 
==============================================================================
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: FLOW T.30 Changing from 
state 18 to 32
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: FLOW T.30 Changing from 
phase T30_PHASE_A_CNG to T30_PHASE_CALL_FINISHED
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: FLOW T.38T Set rx type 8
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: FLOW T.38T Set tx type 8
Feb 25 00:19:31 DEBUG[4117609360] app_txfax.c: FLOW T.38T FAX exchange 
complete
Feb 25 00:19:31 DEBUG[4117609360] pbx.c: Extension s, priority 4 
returned normally even though call was hung up
Feb 25 00:19:31 DEBUG[4117609360] generator.c: Trying to deactivate 
generator in SIP/051XXXXXX-out-3f27

--------------------------------------------

So it seems the T38 gets enabled but the call doesn't go through.

I've also noticed that removing the "caller" option of TxFAX(), if I 
force the receiving machine to treat the call as a fax one, everything 
works. But it's almost unusable as no automatic detection can be done by 
the called party.
Performing a SipT38Switchover() before the TxFAX() sometimes work when 
I'm calling another SIP connected fax machine, but fails when calling a 
PSTN fax from my SIP channel.

Any idea? Thank you.
Stefano
_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users

Reply via email to