> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Joseph
> Sent: Sunday, 5 May 2013 5:33 p.m.
> To: [email protected]
> 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@pstn-5665
>   == Everyone is busy/congested at this time (1:0/0/1)
>     -- Executing [74764444@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


--
_____________________________________________________________________
-- 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

Reply via email to