[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-users
Subject: Re: [SR-Users] Problem Re-writing RURI
From: Alex Balashov <abalashov () evaristesys ! com>
Date: 2014-01-30 1:19:59
Message-ID: 52E9A8BF.4090506 () evaristesys ! com
[Download RAW message or body]
Hi Geoffrey,
On 01/29/2014 08:03 PM, Geoffrey Mina wrote:
> I am trying to manually rewrite the RURI for a certain scenario.
>
> The RURI is currently:
> sip:110219546496707@12.12.12.12
> <mailto:sip%3A110219546496707@12.12.12.12>;npdi;rate=0.000880
>
> I want to re-write so it's just:
> sip:110219546496707@12.12.12.12 <mailto:sip%3A110219546496707@12.12.12.12>
>
> I have the following snippet which isn't working:
> xlog("L_INFO","sip:$(ruri{uri.user})@$(ruri{uri.host})");
> $ru = "sip:$(ruri{uri.user})@$(ruri{uri.host})";
> t_relay();
PVs are not actually substituted inside string literals on assignment.
You'll need to do this:
$ru = "sip:" + $(ruri{uri.user}) + "@" + $(ruri{uri.host});
(I know, it's kind of counterintuitive, because you can xlog() that just
fine.)
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic