[Asterisk-Users] Inheriting variables

Asterisk asterisk at dotr.com
Thu Feb 24 09:17:11 MST 2005


Bill Seddon wrote:
> Julian
> 
> << For example, I want to store the zap channel number into
> SourceChannel 
> on the incoming call, and make it available to the called agent
> channel.>>
> 
> If global variables are not suitable maybe the registry will work.  You
> may have looked at DBGet and DBPut to retrieve and store arbitrary
> values.  For example you might store values using the channel id as the
> key and when the call ends delete the values.

The problem with this is that if I use the channel ID as the key, the 
target channel does not know the parent channel, and therefore does not 
know what key to use.

Internally, the channels obviously know how they are linked, but I 
wanted to achieve this without having to write app_GetChanData - 
although that sounds quite interesting now ... :)

Julian
> 
> Database values are available to all channels but you can have your
> dialplan only work with database values related to its own channel or
> channels that are related in someway.
> 
> Bill Seddon
> 
> Lyquidity Solutions Limited



More information about the asterisk-users mailing list