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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Mar 31 09:29:24 MST 2005


On Thursday 31 March 2005 08:49, Alf Thomas Nilsen wrote:
> This is exactly what I want to do. However, I'm primarily trying to
> do this for G.729A and G.726 using SIP and IAX2 so what I really need
> is a way to pass variables to rtp.c.
>
> 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().

#include <asterisk/pbx.h>
value = pbx_builtin_getvar_helper(chan, "name");

-- 
Tilghman



More information about the asterisk-dev mailing list