[sr-dev] assigning $rd buggy?

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jul 4 13:53:39 CEST 2011


Is there a method to replace the whole part after the @ with a single
assignment (setting domain,port and parameters)?

I want to avoid:
  $ru = "sip:" + $rU + "@" + "1.2.3.4:5060";

Thanks
Klaus

Am 04.07.2011 13:46, schrieb Daniel-Constantin Mierla:
> $rd is only the host part of the r-uri, you add also port there. I guess
> same happens if you do rewritehost() with host and port.
> 
> If you want to update the port as well, then use $rp in a second
> assignment.
> 
> Cheers,
> Daniel
> 
> On 7/4/11 1:43 PM, Klaus Darilion wrote:
>> version: kamailio 3.1.4 (i386/linux)
>>
>> FAILURE_ROUTE:
>>
>> xlogl("L_NOTICE","failure to PSTN gateway: Call to $ru\n");
>> $rd = "81.209.128.132:5060";
>> xlogl("L_NOTICE","next gateway. Call to $ru\n");
>> route(RELAY);
>>
>> results in:
>>
>>
>> NOTICE:<script>: 1089:failure to PSTN gateway: Call to
>> sip:00431505641636 at 1.2.3.4:5060
>> ERROR: pv [pv_core.c:186]: failed to parse the R-URI
>> NOTICE:<script>: 1097:next gateway. Call to<null>
>> ...
>> ERROR: uri2dst: bad_uri: sip:00431505641636 at 81.209.128.132:5060:5060
>>
>> Looks like the assignment to $rd is buggy (double port)
>>
>> regards
>> klaus
>>
>> _______________________________________________
>> sr-dev mailing list
>> sr-dev at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 



More information about the sr-dev mailing list