[Asterisk-Users] Dial Macro timeout fails

whois wes whoiswes at gmail.com
Mon Jul 3 07:58:18 MST 2006


This may sound stupid, but I had a similar issue that I solved by
placing an Answer at the beginning of what would be your 'screen'
macro.

However, we have a call-screening macro as well, and don't have the
Answer command at the beginning...here it is, if this helps any.

[macro-announce]
exten => s,1,Background(callfrom)
exten => s,2,Background(${ARG1})
exten => s,3,Read(ACCEPT|call-accept|1)
exten => s,4,Gotoif($[${ACCEPT} = 1] ?50) ;connect
exten => s,5,Gotoif($[${ACCEPT} = 2] ?30) ;reject to vm
exten => s,6,Gotoif($[${ACCEPT} = 3] ?30:30) ;any thing else vm
exten => s,30,SetVar(MACRO_RESULT=CONTINUE)
exten => s,31,Goto(50)
exten => s,50,System(/bin/rm -f ${ARG1}.gsm)
exten => h,1,System(/bin/rm -f ${ARG1}.gsm)


On 7/3/06, David <asterisk at startupanywhere.org> wrote:
> To add to the mystery, if the cell phone answers and presses "1" as requested, the
> logs don't register priority 1,1 being executed.  It is as if the macro has
> prematurely aborted.
>
> David
>
> David said:
> > I just downloaded, compiled and installed Asterisk 1.2.9.1.  I did this specifically
> > to get the Dial M(x^y) feature so that I could implement call completion
> > confirmation over IAX2 channels (not available in 1.0.7).  The problem is that the
> > call is always completed--even without the required user input.  The problem seems
> > to be related to the response timeout.  Macro priorities i,1 or t,1 are never
> > executed.  Here is what I have in extensions.conf:
> >
> > [macro-screen]
> > exten => s,1,Wait(1)
> > exten => s,n,Background(press-1)
> > exten => s,n,Set(TIMEOUT(response)=2)
> > exten => 1,1,NoOp(Caller accepted)
> > exten => i,1,Set(MACRO_RESULT=CONTINUE)
> > exten => t,1,Set(MACRO_RESULT=CONTINUE)
> >
> > [local]
> > ....
> > exten =>
> > 2388,1,Dial(IAX2/${VOICEPULSEINFO}@${VOICEPULSE_GW_1}/1${MYCELLPHONE},${CELLRINGTIME},M(screen))
> > exten => 2388,2,Hangup
> > ....
> >
> > [inbound-calls]
> > ....
> > exten => 1${VOICEPULSENUMBER},12,Dial(local/2388 at local&${ALLPHONES},${RINGTIME},tr)
> > ....
> >
> > The above is just the call priority with the Dial command and ALLPHONES is a &
> > delimited list of other extensions and worked fine for years.
> >
> > Here is what happens when a call comes in:
> > Executing Dial("IAX2/64.61.93.87:4569-3",
> > "local/2388 at local&Zap/1r1&IAX2/iaxy-lh&SIP/2350&SIP/2351&SIP/2352&IAX2/comet|35|tr")
> > in new stack
> >     -- Called 2388 at local
> >     -- Called 1r1
> >     -- Called iaxy-lh
> >     -- Called 2350
> >     -- Executing Dial("Local/2388 at local-b5e7,2",
> > "IAX2/"info"@connect01.voicepulse.com/1"actual cellphone number removed for
> > security"|25|M(screen)") in new stack
> >     -- Call accepted by 192.168.20.30 (format ulaw)
> >     -- Format for call is ulaw
> >     -- Called "info"@connect01.voicepulse.com/1"actual cellphone number removed for
> > security"
> >     -- Zap/1-1 is ringing
> >     -- IAX2/iaxy-lh-4 is ringing
> >     -- Call accepted by 64.61.93.87 (format ulaw)
> >     -- Format for call is ulaw
> >     -- Zap/1-1 is ringing
> >     -- IAX2/64.61.93.87:4569-5 is making progress passing it to
> > Local/2388 at local-b5e7,2
> >     -- Local/2388 at local-b5e7,1 is making progress passing it to
> > IAX2/64.61.93.87:4569-3
> >     -- Zap/1-1 is ringing
> >     -- IAX2/64.61.93.87:4569-5 answered Local/2388 at local-b5e7,2
> >     -- Executing Wait("IAX2/64.61.93.87:4569-5", "1") in new stack
> >     -- Zap/1-1 is ringing
> >     -- Executing BackGround("IAX2/64.61.93.87:4569-5", "press-1") in new stack
> >     -- Playing 'press-1' (language 'en')
> >     -- Executing Set("IAX2/64.61.93.87:4569-5", "TIMEOUT(response)=2") in new stack
> >     -- Local/2388 at local-b5e7,1 answered IAX2/64.61.93.87:4569-3
> >     -- Hungup 'IAX2/iaxy-lh-4'
> >     -- Hungup 'Zap/1-1'
> >     -- Attempting native bridge of IAX2/64.61.93.87:4569-3 and
> > IAX2/64.61.93.87:4569-5
> >   == Spawn extension (local, 2388, 1) exited non-zero on 'Local/2388 at local-b5e7,2'
> >
> >
> > The response timeout never occurs, I never see MACRO_RESULT set, and the call is
> > connected even though it shouldn't be until the caller presses 1.
> >
> > Any help (or explanation about why this doesn't work) will be greatly appreciated.
> > I have been pulling my hair out trying to get this to work.
> >
> > Thanks,
> > David
> >
> >
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list