Brian K. Alexander, Jr. (Vision Point Systems)
2007-Feb-01 15:25 UTC
[asterisk-users] Using Local Channels with Originate
I have been trying to get a DIALSTATUS output from a call started with
originate. I searched a fair bit and have found several references to using
local channels to do this. However, I could not find enough of the specifics
to get it working myself.
What I need to do is dial a zap channel and run various scripts if the
channel is answered, busy, no-answer,etc.
Here is the dial plan I am using:
[outdialer]
exten => 100,1,Dial(ZAP/4/1234567)
exten => 100,n,DeadAgi(notdeadyet.py)
exten => 100,n,Hangup
[dialerplan]
exten => s,1,AGI(showstatus.py|${DIALSTATUS})
exten => s,n,Hangup
Here are the manager commands I am using:
Action: login
Username: test
Secret: nottelling
Action: originate
Channel: Local/100@outdialer/n
Context: dialerplan
Extension: s
Priority: 1
Action: logoff
The notdeadyet.py script never runs. The ${DIALSTATUS} passed into
showstatus.py is empty. I don't understand what I did wrong.
Thanks in advance for your help. I am stumped by this.'
-Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20070201/607708a3/attachment.htm
Brian K. Alexander, Jr. (Vision Point Systems)
2007-Feb-05 07:43 UTC
[asterisk-users] Using Local Channels with Originate
I haven't quite gotten this working yet but I am going to update the thread
with what I have learned. Maybe this will help the next guy who tries to
figure this out.
The trick to using the DIALSTATUS seems to be to put it in the handler for
the h (hang-up extension).
[outdialer]
exten => 100, 1, Dial(${numberToDial})
exten => h, 1, Goto(s-${DIALSTATUS},1)
exten => s-ANSWER,1,NoOp("Answered")
exten => s-BUSY,1,NoOp("Busy")
exten => s-NOANSWER,1,NoOp("Not answered")
exten => s-CANCEL,1,NoOp("Cancelled")
exten => s-CONGESTION,1,NoOp("Fast busy")
exten => s-CHANUNAVAIL,1,NoOp("Channel unavailable")
[dialerplan]
exten => s,1,Background(demo-congrats)
exten => s,n,WaitExten
so on ...
Here are the manager commands I am using:
Action: login
Username: test
Secret: nottelling
Action: originate
Channel: Local/100@outdialer/n
Context: dialerplan
Extension: s
Priority: 1
Variable: numberToDial=ZAP/4/1234567890
Action: logoff
I am always getting ANSWERED for ${DIALSTAUS} so something is not quite
right. Hopefully I am getting closer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20070205/fbc5c32d/attachment.htm