[asterisk-users] Continuing after a TIMEOUT(absolute)
Brendan Sterne
brendan at callvine.com
Fri Apr 30 11:31:53 CDT 2010
CF,
When I comment out the timeout the call continues as expected. I
believe the timeout is kicking in.
Can anyone point me to an example where TIMEOUT(absolute) is used as a
general timer, where the call continues after the expiry? I'm not
sure which extension to use "T" or "t". I've tried both but neither
seem to work.
Cheers,
- Brendan
Brendan Sterne
QA Lead, Callvine
On Apr 30, 2010, at 9:38 AM, C F wrote:
> I don't think you are actually hitting the time out. Comment out the
> set timeout line I think the results will be the same. Which tells me
> the timeout is not kicking in.
>
> On 4/29/10, Brendan Sterne <brendan at callvine.com> wrote:
>> Greetings,
>>
>> I'm trying to continue to do some processing after a TIMEOUT
>> (absolute). In my dialplan below, when a call comes in to [default],
>> I call macro-phonenum and pass it a timeout of 20 seconds. macro-
>> phonenum sets TIMEOUT(absolute), then loops saying the phone number
>> that was called (in MACRO_EXTEN). When the timeout expires I want to
>> call my macro-hangup (so it can say "goodbye" or whatever). But the
>> system is just hanging up. The dialplan and log output is below.
>> Any
>> info is appreciated. This is on version 1.6.0.5.
>>
>>
>>
>> [macro-answer-and-join]
>> exten => s,1,NoOp()
>> exten => s,n,Answer()
>> exten => s,n,Wait(4)
>> exten => s,n,SendDTMF(1)
>> exten => s,n,Wait(1)
>> exten => s,n,SendDTMF(1)
>> exten => s,n,MacroExit
>>
>> [macro-hangup]
>> exten => s,1,NoOp()
>> exten => s,n,Playback(goodbye)
>> exten => s,n,Hangup()
>> ;
>> exten => T,1,NoOp()
>> exten => T,n,Playback(goodbye)
>> exten => T,n,Hangup()
>>
>> [macro-phonenum]
>> exten => s,1,NoOp()
>> exten => s,n,Macro(answer-and-join)
>> exten => s,n,Set(TIMEOUT(absolute)=${ARG1})
>> exten => s,n,Set(i=1000)
>> exten => s,n,While($[${i} >= 1])
>> exten => s,n,SayDigits(${MACRO_EXTEN})
>> exten => s,n,Wait(5)
>> exten => s,n,Set(i=$[${i} - 1])
>> exten => s,n,EndWhile()
>> exten => s,n,MacroExit
>> ;
>> exten => T,1,NoOp()
>> exten => T,n,Macro(hangup)
>> exten => T,n,MacroExit
>>
>>
>> [default]
>> exten => _X.,1,NoOp()
>> exten => _X.,n,Macro(phonenum,20)
>> exten => _X.,n,Macro(hangup)
>> ;
>> exten => T,1,NoOp()
>> exten => T,n,Macro(hangup)
>>
>>
>>
>> The log when the timeout occurs:
>>
>> <snip> (I'm in macro-phonenum)
>> -- <SIP/70.124.61.17-082a69a8> Playing 'digits/5.ulaw' (language
>> 'en')
>> -- <SIP/70.124.61.17-082a69a8> Playing 'digits/1.ulaw' (language
>> 'en')
>> -- <SIP/70.124.61.17-082a69a8> Playing 'digits/2.ulaw' (language
>> 'en')
>> -- <SIP/70.124.61.17-082a69a8> Playing 'digits/1.ulaw' (language
>> 'en')
>> -- <SIP/70.124.61.17-082a69a8> Playing 'digits/2.ulaw' (language
>> 'en')
>> -- Executing [s at macro-phonenum:7] Wait("SIP/
>> 70.124.61.17-082a69a8", "5") in new stack
>> == Spawn extension (macro-phonenum, s, 7) exited non-zero on 'SIP/
>> 70.124.61.17-082a69a8' in macro 'phonenum'
>> == Spawn extension (macro-phonenum, s, 7) exited non-zero on 'SIP/
>> 70.124.61.17-082a69a8'
>> Scheduling destruction of SIP dialog 'D8FE9724-1DD1-11B2-9F1A-
>> A4EF9DB84584 at 192.168.1.98' in 32000 ms (Method: ACK)
>> set_destination: Parsing <sip:70.124.61.17:5060> for address/port to
>> send to
>> set_destination: set destination to 70.124.61.17, port 5060
>> Reliably Transmitting (NAT) to 70.124.61.17:5060:
>> BYE sip:70.124.61.17:5060 SIP/2.0
>> <snip>
>>
>>
>>
>> Cheers,
>> - Brendan
>>
>> Brendan Sterne
>> QA Lead, Callvine
>>
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>> http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> 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