[asterisk-users] GotoIf DIALSTATUS - not working

Joseph syscon780 at gmail.com
Sun May 5 09:49:48 CDT 2013


On 05/05/13 20:50, Alec Davis wrote:
>
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com
>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Joseph
>> Sent: Sunday, 5 May 2013 5:33 p.m.
>> To: asterisk-users at lists.digium.com
>> Subject: [asterisk-users] GotoIf DIALSTATUS - not working
>>
>> What am I doing wrong?
>> Goif dialstatus: busy CONGESTION not working.
>>
>> exten => _7NXXXXXX,1,Dial(SIP/7780${EXTEN:1}@pstn-5665,60,tr)
>> exten => _7NXXXXXX,n,GotoIf($[$["${DIALSTATUS}" = "BUSY"] |
>> $["${DIALSTATUS}" = "CONGESTION"]]?line2)
>> exten => _7NXXXXXX,n(line2),Dial(SIP/9780${EXTEN:1}@pstn-1270,60,tr)
>> exten => _7NXXXXXX,n,Hangup()
>>
>> When I try to call another number (7780476444) on a different
>> line it supposed to jump to "(line2)" on busy (and dial
>> Dial(SIP/9780${EXTEN:1}@pstn-1270) but instead the call hangs up.
>>
>>     -- Called SIP/77804764444 at pstn-5665
>>   == Everyone is busy/congested at this time (1:0/0/1)
>>     -- Executing [74764444 at internal:5]
>> Hangup("SIP/11-0000015b", "") in new stack
>>
>> --
>> Joseph
>>
>> --
>
>I'd suggest a line to print the DIALSTATUS as below.
>I get CHANUNAVAIL, thus hangs up.
>
>exten => _7NXXXXXX,1,Dial(SIP/7780${EXTEN:1}@pstn-5665,60,tr)
>exten => _7NXXXXXX,n,NoOp(DialStatus="${DIALSTATUS}")
>exten => _7NXXXXXX,n,GotoIf($[$["${DIALSTATUS}" = "BUSY"] |
>$["${DIALSTATUS}" = "CONGESTION"]]?line2)
>exten => _7NXXXXXX,n,Hangup()
>exten => _7NXXXXXX,n(line2),Dial(SIP/9780${EXTEN:1}@pstn-1270,60,tr)
>exten => _7NXXXXXX,n,NoOp(DialStatus="${DIALSTATUS}")
>exten => _7NXXXXXX,n,Hangup()
>
>Alec

Thank Alex, it is working. I was modifying the wrong context :-/

-- 
Joseph



More information about the asterisk-users mailing list