[asterisk-dev] Bug in setting/retrieving channel variables

Tony Mountifield tony at softins.clara.co.uk
Tue Jul 24 06:38:25 CDT 2007


In article <46A5C4A3.9030302 at ina-germany.de>,
David Roden <dr at ina-germany.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1
> Hi, everyone.
> I'm building a telephony application using asterisk-1.2.13 andAsterisk-Java 0.3 and I
> encounter some strange behaviour in thefollowing situation:
> I use local channels to create an AGI connection to my server, enablingme to set the caller
> presentation and the caller ID before making a dialover the AGI connection. Before sending
> the Dial command I also set avariable on the channel (using name, _name, and __name as
> variablenames). Using the Manager API I wait for the NewChannelEvent and send aGetVar action
> to retrieve the variable from the new channel so that Ican connect the new channel with the
> dial command from the old channel.
> Unfortunately this only works about 90% to 95% of the time, the rest ofthe time the GetVar
> action returns an empty variable value. Are theresome timing issues involved in this or is
> this a bug or is this indeedsome intended behaviour?

I don't know about your GetVar problem, but have you seen the Dial event?
That should automatically give you an association from the old channel
to the new one.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list