[sr-dev] replacing k pvars with s selects

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 3 19:04:07 CEST 2009



On 07/03/2009 06:38 PM, Jan Janak wrote:
> On Fri, Jul 3, 2009 at 6:26 PM, Daniel-Constantin
> Mierla<miconda at gmail.com> wrote:
>   
>> On 07/03/2009 06:15 PM, Juha Heinanen wrote:
>>     
>>> in order to clear lots of confusion
>>>       
>> whose confusion? pv framework is pretty different that select, things like
>> $sht(htable=>key) a.s.o. do not reflect something in the sip message.
>>     
>
> The thing that started this is "$fd". If you see "$fd" written in the
> sip-router configuration file, how can you tell whether this is an AVP
> or a PV? The answer is you cannot, unless you look into the
> implementation.
>   
probably the script writer that loads the pv module is aware of what it 
exports and does: $name is looked up first as PV then as avp.

If the ser writer would use avp class prefix all the time e.g.: $f.name 
for avps in from list instead of just $name, then it is really no 
possible overlapping.

That will remove the possible typo errors with PV, in K if $name does 
not exist (let's say I wrote $fx instead of $fd), then error is issued 
at startup. Now is considered to be avp and possible to appear at runtime.

If $class.name is enforced in ser side, then we can get good startup 
checking and no namespace overlapping.

Daniel

> This is a burning issue in many modules. It is not a problem as long
> as you only use kamailio modules or only ser modules, but it become
> apparent when we try to mix them.
>
>   Jan.
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the sr-dev mailing list