[asterisk-users] DIALSTATUS not set

Julian Lyndon-Smith
Fri, 03 Aug 2007 18:58:08 -0000

I'm trying to write a dialplan that will allow me to "stress" test
it. I
want to be able to dial an extension, or pretend that the extension is
busy or out of order (so that I can see what to do)

given the dialplan snippet:

[outbound]

exten => _X.,1,NoOp(${TEST})
exten => _X.,n,Dial(SIP/${EXTEN})

exten => Busy,1,Busy(2)
exten => Busy,n,Hangup()

exten => Congestion,1,Congestion(2)
exten => Congestion,n,Hangup()

exten => NoAnswer,1,Wait(10)
exten => NoAnswer,n,Hangup()

exten => h,1,NoOp(XXXXXXXXX)
exten => h,n,NoOp(${DIALSTATUS}:${HANGUPCAUSE})

why if I call the Busy or Congestion extensions, the DIALSTATUS and
HANGUPCAUSE variables are not set ?

If I call the NoAnswer extension, DIALSTATUS is blank and hangupcause is
16. I presume that this is correct ?

If I call (say) extension 1234 all things are set ok.

Julian.