[Kamailio-Users] prefix() cannot take pseudovariable argument?

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 16 22:50:56 CEST 2009



On 04/16/2009 10:42 PM, Alex Balashov wrote:
> Daniel-Constantin Mierla wrote:
>
>   
>> Hello,
>>
>> On 04/16/2009 10:14 PM, Alex Balashov wrote:
>>     
>>> Why can't prefix() accept a pseudovariable argument, e.g.
>>>
>>>     prefix("$avp(S:the_prefix)");
>>>
>>> ?
>>>
>>> It is interpreted literally.
>>>   
>>>       
>> this is old function from core -- most of them do not take 
>> pseudo-variables as argument. You can use instead:
>>
>> $rU = $avp(S:the_prefix) + $rU;
>>     
>
> That's what I ended up doing.  I was just wondering if there was some 
> philosophical / design-related reason for it and you answered my 
> question.  :)
>   
Nothing particularly, just that the function was not updated to take in 
consideration pseudo-variables. For a future version based on sip-router 
we look to a different approach to handle parameters that will allow 
kind of automatic conversion of pseudo-variables...

Cheers,
Daniel

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





More information about the sr-users mailing list