[Kamailio-Users] rewritehostport

Daniel-Constantin Mierla miconda at gmail.com
Wed May 27 16:27:00 CEST 2009



On 05/27/2009 05:20 PM, Iñaki Baz Castillo wrote:
> 2009/5/27 Alex Balashov <abalashov at evaristesys.com>:
>   
>> Some functions accept PV arguments, some don't.
>>
>> The other approach is to rebuild the URI ($ru - it's a mutable
>> pseudovariable) manually.  That is to say:
>>
>>    rewritehostport("$avp(s:domain):$avp(s:port)");
>>
>>    (if it worked)
>>
>> is equivalent to:
>>
>>    $ru = "sip:" + $rU + "@" + $avp(s:domain) + ":" + $avp(s:port);
>>     
>
> Easier (IMHO):
>
>   $rd = $avp(s:domain);
>   $rp = $avp(s:port);
>   
or

pv_printf("$ru", "sip:$rU@$avp(s:domain):$avp(s:port)");

Cheers,
Daniel

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





More information about the sr-users mailing list