[Asterisk-Dev] Retrieving variable set by SetVar()in extensions.conf

Kevin P. Fleming kpfleming at starnetworks.us
Thu Mar 31 08:39:51 MST 2005


Alf Thomas Nilsen wrote:

> I have been thinking about using ast_variable_retrieve() to read variables
> from rtp.conf. This would, however only enable me to set a value per codec.
> In reality I want the variable to be set when making a call, through
> extensions.conf (SetVar()). However, I don't know how to retrieve a variable
> set with SetVar().

Look at the new 'writable functions' stuff that when in via bug 2278. 
Using that you can provide a 'virtual variable' and store the result 
anywhere you like. However, you will have to determine if that 
variable's value will be inspected prior to setting up the channel or 
will be allowed to affect the sample/frame size on an operating channel.



More information about the asterisk-dev mailing list