[asterisk-users] Detecting fax without Aswer()ing the call first?
Martin
ra25 at atlas.cz
Sun Feb 24 17:13:31 CST 2013
Trying to make the fax detection work. My current setup (with no fax) is done
without Answer(), so the call is answered only when someone actually picks-up
the phone. But when the incoming call is fax, I can her the tone and call is
never forwarded to "Fax" extension.
But... Strange thing happens when I (mistakenly) put a call on hold:
-- Executing [youngandson-test at incoming:2]
Gosub("SIP/66.193.176.35-000000b8", "process-callerid,s,1") in new stack
-- Executing [s at process-callerid:1] Verbose("SIP/66.193.176.35-000000b8",
"3,- Original CallerID: "FREE CALL TOLL" <18009806858> ") in new stack
-- - Original CallerID: "FREE CALL TOLL" <18009806858>
-- Executing [s at process-callerid:2] GotoIf("SIP/66.193.176.35-000000b8",
"1?4") in new stack
-- Goto (process-callerid,s,4)
-- Executing [s at process-callerid:4] GotoIf("SIP/66.193.176.35-000000b8",
"0?8") in new stack
-- Executing [s at process-callerid:5] GotoIf("SIP/66.193.176.35-000000b8",
"0?8") in new stack
-- Executing [s at process-callerid:6] GotoIf("SIP/66.193.176.35-000000b8",
"1?7:8") in new stack
-- Goto (process-callerid,s,7)
-- Executing [s at process-callerid:7] Set("SIP/66.193.176.35-000000b8",
"CALLERID(num)=18009806858") in new stack
-- Executing [s at process-callerid:8] Return("SIP/66.193.176.35-000000b8", "")
in new stack
-- Executing [youngandson-test at incoming:3]
Macro("SIP/66.193.176.35-000000b8", "stdexten,210,sip/ra2501") in new stack
-- Executing [s at macro-stdexten:1] Dial("SIP/66.193.176.35-000000b8",
"sip/ra2501,360") in new stack
== Using SIP RTP CoS mark 5
-- Called sip/ra2501
-- SIP/ra2501-000000b9 is ringing
[2013-02-24 17:05:12] WARNING[6554]: chan_sip.c:8979 process_sdp: ignoring
'video' media offer because port number is zero
-- SIP/ra2501-000000b9 answered SIP/66.193.176.35-000000b8
-- Locally bridging SIP/66.193.176.35-000000b8 and SIP/ra2501-000000b9
[2013-02-24 17:05:31] WARNING[6554]: chan_sip.c:8979 process_sdp: ignoring
'video' media offer because port number is zero
[2013-02-24 17:05:31] WARNING[6554]: chan_sip.c:8945 process_sdp: ignoring
'audio' media offer because port number is zero
-- Started music on hold, class 'default', on channel
'SIP/66.193.176.35-000000b8'
[2013-02-24 17:05:31] WARNING[6532]: res_musiconhold.c:659 monmp3thread: poll()
failed: Interrupted system call
[2013-02-24 17:05:31] WARNING[6532]: res_musiconhold.c:659 monmp3thread: poll()
failed: Interrupted system call
....
....
....
[2013-02-24 17:05:34] WARNING[6532]: res_musiconhold.c:659 monmp3thread: poll()
failed: Interrupted system call
[2013-02-24 17:05:34] WARNING[6532]: res_musiconhold.c:659 monmp3thread: poll()
failed: Interrupted system call
== Redirecting 'SIP/66.193.176.35-000000b8' to fax extension due to CNG
detection
-- Stopped music on hold on SIP/66.193.176.35-000000b8
== Spawn extension (incoming, fax, 1) exited non-zero on
'SIP/66.193.176.35-000000b8' in macro 'stdexten'
== Spawn extension (incoming, fax, 1) exited non-zero on
'SIP/66.193.176.35-000000b8'
-- Executing [fax at incoming:1] Gosub("SIP/66.193.176.35-000000b8",
"receive-fax,fax,1") in new stack
-- Executing [fax at receive-fax:1] Verbose("SIP/66.193.176.35-000000b8",
"3,Incoming fax from 18009806858") in new stack
-- Incoming fax from 18009806858
-- Executing [fax at receive-fax:2] Set("SIP/66.193.176.35-000000b8",
"FAXDEST=/var/spool/fax/incoming") in new stack
-- Executing [fax at receive-fax:3] Set("SIP/66.193.176.35-000000b8",
"FAX-FILENAME=20130224-170534 Incoming Fax") in new stack
-- Executing [fax at receive-fax:4] ReceiveFAX("SIP/66.193.176.35-000000b8",
"/var/spool/fax/incoming/20130224-170534 Incoming Fax.tif") in new stack
-- Channel 'SIP/66.193.176.35-000000b8' receiving FAX
'/var/spool/fax/incoming/20130224-170534 Incoming Fax.tif'
== Using UDPTL CoS mark 5
== Spawn extension (receive-fax, fax, 4) exited non-zero on
'SIP/66.193.176.35-000000b8'
Fax is suddenly detected and received! (Im not sure why all these warnings came
up, something misconfigured in music on hold...)
Is there any way to make Asterisk "listen" for CNG tone during the connected
call, eliminating the need for Answer() and Wait()?
Is the fax detection completely impossible when compressed codec (g729, gsm...)
is in use? I've read its unreliable but does not work at all for me.
(Asterisk 1.8.13 installed from Debian repository)
Thanks ....
Martin
More information about the asterisk-users
mailing list