Re: [SR-Users] Issue using subst

2010-08-15 Thread Uriel Rozenbaum
Hi Henning, I'll try using $pa if it is available. With $re I vave the issue on some gateways that send 2 RPID headers (one for called and other for caiiling party). Cheers, Uriel On Fri, Aug 13, 2010 at 1:16 PM, Henning Westerholt wrote: > On Friday 13 August 2010, Uriel Rozenbaum wrote: >> [.

Re: [SR-Users] Issue using subst

2010-08-13 Thread Henning Westerholt
On Friday 13 August 2010, Uriel Rozenbaum wrote: > [..] Hello Uriel, just noticed one small thing: > $avp(s:oldPAI) = $(hdr(P-Asserted-Identity)); There is some shortcut PVs for this header, i think its $pa. Maybe its a bit cleaner this way. I did not checked, but maybe there is also

Re: [SR-Users] Issue using subst

2010-08-13 Thread Uriel Rozenbaum
Here it comes. Fell free to make any notations, we are all here to improve the matter: # From Edition if (is_present_hf("From")) { $avp(s:newFrom) = $avp(s:ANIegress) + " ;" + $(hdr(From){tobody.params}); remove_hf("From"); insert_hf("From: $avp(s:newFrom)\r\n", "Contac

Re: [SR-Users] Issue using subst

2010-08-12 Thread Alex Balashov
On 08/12/2010 05:27 PM, Uriel Rozenbaum wrote: Takes a little more work but works perfectly. Thanks!!! Yes, but a lot easier to read, understand and modify from a code and business process management perspective. I have to be aware of calls that have 2 RPID headers (party=called and party=

Re: [SR-Users] Issue using subst

2010-08-12 Thread Uriel Rozenbaum
Alex, Takes a little more work but works perfectly. Thanks!!! I have to be aware of calls that have 2 RPID headers (party=called and party=calling), is you're interested I can paste the code once I'm done coding and testisng. :) Rgds, Uriel On Wed, Aug 11, 2010 at 6:41 PM, Alex Balashov wrote:

Re: [SR-Users] Issue using subst

2010-08-11 Thread Alex Balashov
Uriel, Why not simplify the matter? 1. Extract the value(s) of the existing Remote-Party-ID header using $re. Or, if you need something other than the RPID URI, some transformation applied to $hdr(Remote-Party-ID). 2. remove_hf("Remote-Party-ID"); 3. append_hf("Remote-Party-ID: "); :) O

[SR-Users] Issue using subst

2010-08-11 Thread Uriel Rozenbaum
Hi guys, I'm having a weird situation when trying to modify some parts of the RPID on my config file. I'm using Kamailio 1.5.3-notls The code is the following: ... subst('/^Remote-Party-ID:(.*)sip:(.*)@(.*)$/Remote-Party-ID:\1sip:$avp(s:ANIegress)@\3/ig'); subst('/^Remote-Party-ID:(.*)"(.*)"(.*)