I have a PRI and sip channels. In one instance I have calls come in on the PRI and route directly to the SIP channels back out to cell phones. The calls get bridged from the pri to sip (external to external). I want to get the qos from the dialed channel, but if I use channel() it uses the PRI since that is the context it is in. How do I get channel() to access the dialed channel instead of the dialing channel? Or is there another variable/function to use? I store the results in a mysql table using odbc. Thanks! - Jeremy
If you can actually get dialiplan to run at a useful time when the dialed channel exists, I am fairly sure that you can use the IMPORT funnction on functions, as well as simple variables. Various variables are set up to allow you to find the outgoing channel, e.g. BRIDGEPEER.
To get information just after the called channel answers, you could use the Goto, subroutine or macro options, in Dial, to run dialplan on the called channel.