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

Kevin P. Fleming kpfleming at starnetworks.us
Wed Mar 30 20:35:36 MST 2005


Alf Thomas Nilsen wrote:
> I am trying to add some functionality to Asterisk that will allow one to 
> define a payload size for any given codec and/or channel. As it is 
> today, each codec has a hardcoded size in the source code. I have 
> thought that the best way to do this would be to have a variable set to 
> the wanted size in extensions.conf using SetVar(). However, I am new to 
> Asterisk and I’m having a hard time understanding the source code. 
> Therefore I am not sure how to retrieve the variables I set using 
> SetVar() inside the source code (let’s say, rtp.c for example). I guess 
> it’s possible since predefined variables like SIP_CODEC exists.

We don't set the 'size', we set (or respond to) the sample rate, which 
determines the packet size. You can't just change the packet size 
without negotiation the sample size with the device at the other end of 
the channel.



More information about the asterisk-dev mailing list