[Kamailio-Users] [sr-dev] Functions that don't accept pvars.

Henning Westerholt henning.westerholt at 1und1.de
Fri Oct 2 06:26:09 CEST 2009


On Fri, October 2, 2009 6:17 am, Alex Balashov wrote:
> Come to think of it, I don't even know if this is entirely possible
> with rtpproxy.  In order to forward packets between interfaces it
> appears that "bridging mode" is required, and in order to activate it
> two listen addresses must be specified - but only two, and not more
> than two.

Hello Alex,

> I just figured I would try it with 5 by binding it to 0.0.0.0 and
> seeing what happens.
>
> Not sure how to get around this without using MediaProxy, which seems
> both increasingly incompatible with Kamailio politically and also
> requires a slew of Python dependencies that are difficult to install
> on a CentOS host that I do not really administer.  If this were a
> Debian box like my systems, it would be easier.

Never used mediaproxy so far, but i also got this impressions.

>> The reason I need to do this, by the way, is because I have a host with
>> 5 network interfaces and depending on where the media is going the
>> source IP of the media needs to be different.  But there are too many
>> possible combinations for me to just put all of the possible scenarios
>> statically into the configuration, and it's not clean;  I need it to be
>> dynamic and query a database so it can be changed on the fly.
>>
>> Any suggestions for workarounds that allow me to use rtpproxy are
>> welcome!
>>
>>> It's very frustrating that some functions don't accept pseudovariables
>>> and there's no workaround.
>>> [..]
>>> I understand it is difficult to go back and update all legacy
>>> functions to accept PVs everywhere.  But isn't it possible to provide
>>> a wrapper/compatibility function in the core that will parse a PV and
>>> generate as a result something that other functions can see as a
>>> string literal?

Ah, you mean something like a "pv_printf()" exported to the configuration
file? This would be indeed a nice workaround, but not sure if its possible
on a first glance. Perhaps Daniel can comment on this? Another thing, it
should be not that hard to update rtpproxy to be able to use PVs, the
fixup function and the evaluation functions are available in the core and
more or less just needs to be called.

Regards,

Henning

Henning




More information about the Users mailing list