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 like!>");

:)

On 08/11/2010 02:00 PM, Uriel Rozenbaum wrote:

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:(.*)"(.*)"(.*)sip:(.*)$/Remote-Party-ID:\1"$avp(s:ANIegress)"\3sip:\4/ig');
...

With the first line I'm trying, to change the user part of the SIP-URI
to the value in $avp(s:ANIegress).
Then i just replace the token between double quotes (if any) with the
value in $avp(s:ANIegress).

But when I check the captured (ngrep) results I have the following:

Before:
Remote-Party-ID: "60911000"
<sip:541160911...@192.168.200.100>;privacy=off;screen=no.
After:
Remote-Party-ID: "60911000"
<sip:1160911...@192.168.200.100>;privacy=off;screen=no.Remote-Party-ID:
"1160911100"<sip:541160911...@192.168.200.100>;privacy=off;screen=no.

Can anyone point me on the direction to solve the issue, or a better
way to replace the values in RPID, PAI (and possibly From Header for
some providers)?

Thanks in advence!
Uriel

_______________________________________________
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


--
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.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

Reply via email to