[asterisk-users] GotoIf DIALSTATUS - not working
Alec Davis
sivad.a at paradise.net.nz
Sun May 5 03:50:58 CDT 2013
> -----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
More information about the asterisk-users
mailing list