[Asterisk-Users] Channel Data Access
Mark Edwards
mark at switchnet.com.au
Sun Oct 30 22:18:05 MST 2005
My objective is to write an AGI Script to monitor channel status on an
originated call prior to passing it to a queue.
Current approach:
1. Originate via AMI...
set msg(Channel) "Local/1128 at default-agi/n"
set msg(Exten) "0021$numberDial"
set msg(Account) $agentid
set msg(Callerid) $axtn
set msg(Priority) 1
set msg(Context) default-agi
[default-agi]
exten => _1128,1,agi(OutBoundCall.agi)
exten => _0021X.,1,Dial(IAX2/id:secret at provider/${EXTEN},20,g)
2. Capture channel status via agi then initiate transfer into a queue
but.... channel data returning into my AGI script appears a little
removed from the action...
Local/1128-abcd,1 rings Local/1128-abcd,2
I issue ANSWER from AGI and see data associated with Local/1128-abcd,2
however, the oubbound channel is IAX/provider-1 which is bridged with
Local/1128-abcd,1 according to "show channels verbose", and my AGI is
looking at Local/1128 abcd,2
What I'd really like to see is the status when IAX/provider-1 gets
linked or achieves progress. The plan is to detect this in the AGI and
initiate a transfer into a queue at this point.
If no progress is made in connecting the call, I want to drop it
programmatically.
If anyone could point me in the direction of some additional docco that
might help nudge me in the right direction, I would be very grateful.
cheers,
Mark Edwards.
http://www.switchnet.com.au
More information about the asterisk-users
mailing list