[Serusers] Manipulate To: Fom: Fields

James Barroso jbarroso at calltower.com
Thu May 13 21:37:54 CEST 2004


I am using SER to manipulate the INVITE URI and the To: and From: fields
in the message header. The manipulation works on request messages, but
does not seem to work on reply messages to those requests. For example:

 

In the following, a + is prepended to the first message in the second
message.

 

U 172.16.252.235:5060 -> 172.16.252.228:5060

INVITE sip:14157671212 at 172.16.252.228:5060 SIP/2.0.

Via: SIP/2.0/UDP  172.16.252.235:5060;branch=z9hG4bK324671a0.

From: <sip:18666779422 at 172.16.252.235>;tag=16777541.

To: <sip:14157671212 at 172.16.252.228>.

 

U 172.16.252.228:5060 -> 172.16.252.225:5060

INVITE sip:+14157671212 at 172.16.252.225:5060 SIP/2.0.

Via: SIP/2.0/UDP 172.16.252.228;branch=0.

Via: SIP/2.0/UDP  172.16.252.235:5060;branch=z9hG4bK324671a0.

From: "James B" <sip:+18666779422 at 172.16.252.235>;tag=16777541.

To: <sip:+14157671212 at 172.16.252.228>.

 

When a 200 ok is received, I need to strip the + sign going back to the
originating device. Unfortunately, the route portion of the ser.cfg file
only seems to apply to request messages as is evident by the fact that
the plus remains intact in the following messages. In the 200 ok that is
forwarded to 172.16.252.235, I need to strip the + sign from the To: and
From: fields:

 

#

U 172.16.252.225:5060 -> 172.16.252.228:5060

SIP/2.0 200 OK.

To: <sip:+14157671212 at 172.16.252.228>;tag=83b7263c.

From: "James B"<sip:+18666779422 at 172.16.252.235>;tag=16777541.

Via: SIP/2.0/UDP 172.16.252.228;branch=0;received=172.16.252.228.

Via: SIP/2.0/UDP 172.16.252.235:5060;branch=z9hG4bK324671a0.

Call-ID: a6880c80-1d91c30f-73-ebfc10ac at 172.16.252.235.

CSeq: 101 INVITE.

 

#

U 172.16.252.228:5060 -> 172.16.252.235:5060

SIP/2.0 200 OK.

To: <sip:+14157671212 at 172.16.252.228>;tag=83b7263c.

From: "James B"<sip:+18666779422 at 172.16.252.235>;tag=16777541.

Via: SIP/2.0/UDP 172.16.252.235:5060;branch=z9hG4bK324671a0.

Call-ID: a6880c80-1d91c30f-73-ebfc10ac at 172.16.252.235.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040513/a097b211/attachment.htm>


More information about the sr-users mailing list