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 henning.westerh...@1und1.de wrote: On Friday 13 August 2010,

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) + sip: + $avp(s:ANIegress) + @ + $(hdr(From){tobody.host}) + ; + $(hdr(From){tobody.params});

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-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

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: whatever you