Hi - am looking for someone who can help me understand how to get access to channel data via AGI.<br>
<br>
My objective is to write an AGI Script to monitor channel status on an originated call prior to passing it to a queue.<br>
<br>
Current approach:<br>
<br>
1. Originate via AMI...<br>
<br>
set msg(Channel) "Local/1128@default-agi/n"<br>
set msg(Exten) "0021$numberDial"<br>
set msg(Account) $agentid<br>
set msg(Callerid) $axtn<br>
set msg(Priority) 1<br>
<br>
[default-agi]<br>
exten => _1128,1,agi(OutBoundCall.agi)<br>
exten => _0021X.,1,Dial(IAX2/id:secret@provider/${EXTEN},20,g)<br>
<br>
2. Capture channel status via agi then initiate transfer into a queue<br>
<br>
but.... channel data returning into my AGI script appears a little removed from the action...<br>
<br>
Local/1128-abcd,1 rings Local/1128-abcd,2<br>
<br>
I issue ANSWER from AGI and see data associated with Local/1128-abcd,2<br>
<br>
however, the oubbound channel is IAX/provider-1 which is bridged with Local/1128-abcd,1<br>
according to "show channels verbose", and my AGI is looking at Local/1128-abcd,2<br>
<br>
What I'd really like to see is the status when IAX/provider-1 gets linked or achieves progress.<br>
The plan is to detect this in the AGI and initiate a transfer into a queue at this point.<br>
<br>
If no progress is made in connecting the call, I want to drop it programmatically.<br>
<br>
If anyone could point me in the direction of some additional docco that might<br>
help nudge me in the right direction, I would be very grateful.<br>
<br>
cheers,<br>
<br>
Mark Edwards.<br>