Summary: | ASTERISK-04266: Fax detection will not properly jump to fax detection if inside a macro | ||
Reporter: | Jean-Yves Avenard (jyavenard) | Labels: | |
Date Opened: | 2005-05-24 13:18:30 | Date Closed: | 2008-01-15 15:37:46.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_adsi |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I've been having the following problem today : I have a quite simple dialplan made to receive a fax: [answer-extension] exten => 1,1,Answer exten => 1,2,Macro(setcallerid) exten => 1,3,Ringing exten => 1,4,Wait(3) exten => 1,5,Macro(stdfwd3iax-notransfer,${EXTENSION},${EXTENSION},${EXTENSION}) exten => fax,1,Goto(faxreceive,1,1) The Wait(3) is there simply to give the system a bit of time to detect if it's a fax calling, this has worked so far in all cases except today. I received a fax from overseas and it seems that Asterisk has been unable to detect that it was a fax in the 3 seconds wait. Changing to 5s was sufficient to receive the fax. But obviously this is not a solution I want to adopt all the time as 1-it's a tool long wait, 2-what happens if 5s is still not enough another time. So Asterisk recognized that a fax was being received while executing the macro stdfwd3iax-notransfer (this extension simply check if it can call a SIP phone and forward to voicemail if not) And I saw the following message in the console: -- Executing VoiceMail("Zap/10-1", "u200") in new stack -- Playing '/data/asterisk/var/spool/asterisk/voicemail/default/200/unavail' (language 'en') -- Redirecting Zap/10-1 to fax extension May 25 01:19:34 WARNING[17629]: pbx.c:2412 ast_pbx_run: Timeout, but no rule 't' in context 'answer-extension' -- Hungup 'Zap/10-1' It seems that Asterisk once entered in a Macro is unable to jump to the fax extension and gave me a timeout (which I do not handle in my dialplan). If I change the Wait(3) into Wait(0) the problem can be easily reproduced at all times. I then added a fax extension in the Macro just in case, but it made no difference whatsoever. The fully log is below. -- Accepting call from '' to '85735200' on channel 0/10, span 1 -- Executing AGI("Zap/10-1", "getnumber.agi|200") in new stack -- Launched AGI Script /data/asterisk/var/lib/asterisk/agi-bin/getnumber.agi -- AGI Script getnumber.agi completed, returning 0 -- Executing Set("Zap/10-1", "EXTENSION=00") in new stack -- Executing Goto("Zap/10-1", "answer-extension|1|1") in new stack -- Goto (answer-extension,1,1) -- Executing Answer("Zap/10-1", "") in new stack -- Executing Macro("Zap/10-1", "setcallerid") in new stack -- Executing GotoIf("Zap/10-1", "11?10:11") in new stack -- Goto (macro-setcallerid,s,10) -- Executing Set("Zap/10-1", "CALLERID(number)=''") in new stack -- Executing GotoIf("Zap/10-1", "0?20") in new stack -- Executing Ringing("Zap/10-1", "") in new stack -- Executing Wait("Zap/10-1", "0") in new stack -- Executing Macro("Zap/10-1", "stdfwd3iax-notransfer|200|200|100") in new stack -- Executing DBget("Zap/10-1", "temp=CFIM/200") in new stack -- DBget: varname=temp, family=CFIM, key=200 -- DBget: Value not found in database. -- Executing Goto("Zap/10-1", "3") in new stack -- Goto (macro-stdfwd3iax-notransfer,s,3) -- Executing Dial("Zap/10-1", "IAX2/iax100|20|tr") in new stack May 25 01:19:21 NOTICE[17629]: app_dial.c:972 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3) == Everyone is busy/congested at this time (1:0/0/1) -- Executing NoOp("Zap/10-1", "CHANUNAVAIL") in new stack -- Executing Goto("Zap/10-1", "s-CHANUNAVAIL|1") in new stack -- Goto (macro-stdfwd3iax-notransfer,s-CHANUNAVAIL,1) -- Executing Goto("Zap/10-1", "s|400") in new stack -- Goto (macro-stdfwd3iax-notransfer,s,400) -- Executing Dial("Zap/10-1", "SIP/ipp100|20|tr") in new stack May 25 01:19:21 NOTICE[17629]: app_dial.c:972 dial_exec_full: Unable to create channel of type 'SIP' (cause 3) == Everyone is busy/congested at this time (1:0/0/1) -- Executing Goto("Zap/10-1", "s2-CHANUNAVAIL|1") in new stack -- Goto (macro-stdfwd3iax-notransfer,s2-CHANUNAVAIL,1) -- Executing Goto("Zap/10-1", "s|200") in new stack -- Goto (macro-stdfwd3iax-notransfer,s,200) -- Executing DBget("Zap/10-1", "temp=CFBS/200") in new stack -- DBget: varname=temp, family=CFBS, key=200 -- DBget: Value not found in database. -- Executing Goto("Zap/10-1", "202") in new stack -- Goto (macro-stdfwd3iax-notransfer,s,202) -- Executing VoiceMail("Zap/10-1", "u200") in new stack -- Playing '/data/asterisk/var/spool/asterisk/voicemail/default/200/unavail' (language 'en') -- Redirecting Zap/10-1 to fax extension May 25 01:19:34 WARNING[17629]: pbx.c:2412 ast_pbx_run: Timeout, but no rule 't' in context 'answer-extension' -- Hungup 'Zap/10-1' | ||
Comments: | By: Russell Bryant (russell) 2005-05-24 13:33:09 Can you verify which version you are experiencing this problem in? This issue has already been identified and fixed in both CVS HEAD and 1.0. I believe that it won't be in an official release until 1.0.8, which should come out very soon. By: Russell Bryant (russell) 2005-05-24 13:36:57 This is also not related to Dialplan Functions ... By: Jean-Yves Avenard (jyavenard) 2005-05-24 13:49:29 This is in CVS-HEAD-05/17/05-12:38:16 By: Brian West (bkw918) 2005-05-24 16:11:02 No the 5 seconds is the solution.. international faxes 1. take longer. 2. are more error prone. This is not a bug. /b By: Brian West (bkw918) 2005-05-24 16:16:29 Oh do this.. move/copy your exten => fax inside the macro also. Because a macro is basically a goto with some voodoo. /b By: Jean-Yves Avenard (jyavenard) 2005-05-24 19:54:08 As my original notes mentions the "exten => fax" was also added inside the Macro and made no difference. The system *is* detecting a fax, however as you can see from the log: -- Redirecting Zap/10-1 to fax extension May 25 01:19:34 WARNING[17629]: pbx.c:2412 ast_pbx_run: Timeout, but no rule 't' in context 'answer-extension' -- Hungup 'Zap/10-1' it will not go to the fax extension and will time-out By: Kevin P. Fleming (kpfleming) 2005-06-05 23:16:39 Fixed in CVS HEAD, thanks for the report! By: Digium Subversion (svnbot) 2008-01-15 15:37:22.000-0600 Repository: asterisk Revision: 5856 U trunk/channels/chan_modem_i4l.c U trunk/channels/chan_vpb.c U trunk/channels/chan_zap.c ------------------------------------------------------------------------ r5856 | kpfleming | 2008-01-15 15:37:22 -0600 (Tue, 15 Jan 2008) | 2 lines handle going to 'fax' extension when inside a macro properly (bug ASTERISK-4266) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5856 By: Digium Subversion (svnbot) 2008-01-15 15:37:46.000-0600 Repository: asterisk Revision: 5881 U trunk/channels/chan_vpb.c ------------------------------------------------------------------------ r5881 | bkramer | 2008-01-15 15:37:45 -0600 (Tue, 15 Jan 2008) | 2 lines / fixed bugs introduced by the fix for bug ASTERISK-4266 by kpfleming ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5881 |