[asterisk-users] [1.4] "show channels" in extensions.conf?

Gilles codecomplete at free.fr
Sat Feb 19 12:16:42 CST 2011


On Sat, 19 Feb 2011 07:29:28 -0800 (PST), Steve Edwards
<asterisk.org at sedwards.com> wrote:
>Ugly: system(asterisk -r -x 'show channels')
>
>Elegant: AGI using AMI.

Thanks for the idea. I'll write a script for this.

Looks like Dial() is synchronous, which means that it's only possible
to know how it went after the fact, not while the channel is active:

============
exten => 7001,1,Dial(Zap/1/${GSM})
exten => 7001,n,Hangup()
exten => 7001,n,NoOp( Dial Status: ${DIALSTATUS})
exten => 7001,n,Goto(s-${DIALSTATUS},1)

exten => s-ANSWER,1,NoOp(Went OK)
exten => s-BUSY,1,Busy
exten => s-NOANSWER,1,Hangup
exten => s-CANCEL,1,Hangup
exten => s-CONGESTION,1,Congestion
============




More information about the asterisk-users mailing list