[asterisk-users] Problem with dialplan -> gotoif ?

2009-09-22 Thread Alex Samad
Hi

This is the output from show dialplan dial-sipmnf-sippt-pstn

[ Context 'dial-sipmnf-sippt-pstn' created by 'pbx_config' ]
  's' =>1. Verbose(1,Dialing ${ARG1} on mnf pt pstn)  [pbx_config]
2. Dial(SIP/${ar...@${sipmnf},${ARG2},${OUTBDIAL}) 
[pbx_config]
3. Set(GLOBAL(FOUNDME)=${DIALSTATUS}) [pbx_config]
4. GotoIf([${DIALSTATUS} = CHANUNAVAIL]?pt:ok) [pbx_config]
 [pt]   5. Dial(SIP/${ar...@${sippt},${ARG2},${OUTBDIAL}) 
[pbx_config]
6. Set(GLOBAL(FOUNDME)=${DIALSTATUS}) [pbx_config]
7. GotoIf([${DIALSTATUS} = CHANUNAVAIL]?pstn:ok) 
[pbx_config]
 [pstn] 8. Dial(${PSTN}/w${ARG1},${ARG2},${OUTBDIAL}) [pbx_config]
 [ok]   9. Goto(dialer-exit,s,1(${ARG3})  [pbx_config]



-- Executing [0296332...@in-uniden:1] Verbose("DAHDI/1-1", "1,Dialing 
0296332828 normal") in new stack
 Dialing 0296332828 normal
-- Executing [0296332...@in-uniden:2] Log("DAHDI/1-1", "Notice,Dialing 
0296332828 normal") in new stack
[Sep 22 18:20:42] NOTICE[18347]: Ext. 0296332828:2 @ in-uniden: Dialing 
0296332828 normal
-- Executing [0296332...@in-uniden:3] Gosub("DAHDI/1-1", 
"dial-sipmnf-sippt-pstn,s,1(0296332828,70)") in new stack
-- Executing [...@dial-sipmnf-sippt-pstn:1] Verbose("DAHDI/1-1", "1,Dialing 
0296332828 on mnf pt pstn") in new stack
 Dialing 0296332828 on mnf pt pstn
-- Executing [...@dial-sipmnf-sippt-pstn:2] Dial("DAHDI/1-1", 
"SIP/0296332...@mynetfone-09105023,70,WKT") in new stack
  == Using SIP RTP CoS mark 5
-- Called 0296332...@mynetfone-09105023
-- SIP/MyNetFone-09105023-097809e0 is making progress passing it to 
DAHDI/1-1
-- Got SIP response 486 "Busy Here" back from 125.213.160.81
-- SIP/MyNetFone-09105023-097809e0 is busy
  == Everyone is busy/congested at this time (1:1/0/0)
-- Executing [...@dial-sipmnf-sippt-pstn:3] Set("DAHDI/1-1", 
"GLOBAL(FOUNDME)=BUSY") in new stack
  == Setting global variable 'FOUNDME' to 'BUSY'
-- Executing [...@dial-sipmnf-sippt-pstn:4] GotoIf("DAHDI/1-1", "[BUSY = 
CHANUNAVAIL]?pt:ok") in new stack
-- Goto (dial-sipmnf-sippt-pstn,s,5)
-- Executing [...@dial-sipmnf-sippt-pstn:5] Dial("DAHDI/1-1", 
"SIP/0296332...@pennytel-8889186044,70,WKT") in new stack


i believe i have captured the relevant logging from the console. my problem is 
with  Gotoif statement

-- Executing [...@dial-sipmnf-sippt-pstn:4] GotoIf("DAHDI/1-1", "[BUSY = 
CHANUNAVAIL]?pt:ok") in new stack
-- Goto (dial-sipmnf-sippt-pstn,s,5)


from my understanding BUSY != CHANUNAVAIL, therefor it should have jumped to ok 
which is s,9.

What have I missed !


thanks
Alex


signature.asc
Description: Digital signature
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Problem with dialplan -> gotoif ?

2009-09-22 Thread Leif Madsen
Alex Samad wrote:
> 4. GotoIf([${DIALSTATUS} = CHANUNAVAIL]?pt:ok) 
> [pbx_config]

> i believe i have captured the relevant logging from the console. my problem 
> is with  Gotoif statement
> 
> -- Executing [...@dial-sipmnf-sippt-pstn:4] GotoIf("DAHDI/1-1", "[BUSY = 
> CHANUNAVAIL]?pt:ok") in new stack
> -- Goto (dial-sipmnf-sippt-pstn,s,5)
> 
> 
> from my understanding BUSY != CHANUNAVAIL, therefor it should have jumped to 
> ok which is s,9.
> 
> What have I missed !

You have missed the leading $ in front of the $[...] portion.

Add the $, and things should start working as you expect.

Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problem with dialplan -> gotoif ?

2009-09-22 Thread Alex Samad
On Tue, Sep 22, 2009 at 07:57:56AM -0400, Leif Madsen wrote:
> Alex Samad wrote:
> > 4. GotoIf([${DIALSTATUS} = CHANUNAVAIL]?pt:ok) 
> > [pbx_config]
> 
> > i believe i have captured the relevant logging from the console. my problem 
> > is with  Gotoif statement
> > 
> > -- Executing [...@dial-sipmnf-sippt-pstn:4] GotoIf("DAHDI/1-1", "[BUSY 
> > = CHANUNAVAIL]?pt:ok") in new stack
> > -- Goto (dial-sipmnf-sippt-pstn,s,5)
> > 
> > 
> > from my understanding BUSY != CHANUNAVAIL, therefor it should have jumped 
> > to ok which is s,9.
> > 
> > What have I missed !
> 
> You have missed the leading $ in front of the $[...] portion.
> 
> Add the $, and things should start working as you expect.
thanks the bloody obvious :)

> 
> Leif Madsen.
> http://www.leifmadsen.com
> http://www.oreilly.com/catalog/asterisk
> 


signature.asc
Description: Digital signature
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users