[Asterisk-Dev] Identifying associated channel in rtp.c

Kevin P. Fleming kpfleming at digium.com
Tue Apr 19 06:31:50 MST 2005


Alf Thomas Nilsen wrote:
> I am trying to retrieve a variable set with SetVar() in extensions.conf. I
> have been told that the preferred way to do this is to use a function from
> pbx.h/.c called "pbx_builtin_getvar_helper(chan, "name")". The problem,
> however, is that I'm inexperienced with Asterisk and this kind of
> programming so I have had a really hard time finding the associated channel
> to retrieve the variable from. I would appreciate it if anyone could point
> me in the right direction. If there is other ways of retrieving variables
> set with SetVar() I would also like to hear about them.

No, that is the only way. However, rtp.c has no knowledge of channels at 
all, so it cannot retrieve channel variables.

If you want to do this, you'll need to retrieve the channel variable in 
chan_sip (or whatever RTP-using channel you are working with), then pass 
the value into the RTP layer via some other means.



More information about the asterisk-dev mailing list