[Asterisk-Dev] Bridged channel during 'h' extension

Alastair Maw asterisk at almaw.com
Fri Sep 12 03:18:10 MST 2003


Steven Poelmans wrote:

> I would like to know the name of the channel that was bridged, after
> the call has been hung up. I want to set it somehow in a variable
> that can be read in an AGI script, started from the 'h' extension.
> 
> I tried to read it from setup_env in app_agi.c, from
> chan->bridge->name. But I assume its empty before the AGI script
> starts... Now im digging further into the dial app, but im kinda
> stuck atm.. Any suggestions?
> 
> Thanks in advance, Steven

:(

The h extension has a whole load of stuff unset such that getting 
variables from AGI scripts doesn't work. A bug report should probably be 
filed about this.

In the meantime, you can get variables into your AGI script by putting 
them into argv thusly: AGI(foo.pl,${MYVAR})

Here you discover another bug, which is that AGI(foo.pl,${VAR1},${VAR2}) 
doesn't work - only VAR1 gets passed in.

-- 
Alastair Maw <al.maw at mxtelecom.com>
MX Telecom - Systems Analyst
http://www.mxtelecom.com




More information about the asterisk-dev mailing list