[Serusers] Manipulate To: Fom: Fields
James Barroso
jbarroso at calltower.com
Thu May 13 23:27:43 CEST 2004
I have it working as show below. I would like to do it stateless...is
there a way?
-----Original Message-----
From: Daniel-Constantin Mierla [mailto:daniel at iptel.org]
Sent: Thursday, May 13, 2004 2:31 PM
To: James Barroso
Cc: serusers at lists.iptel.org
Subject: Re: [Serusers] Manipulate To: Fom: Fields
You need an onreply_route, like
onreply_route[1] {
# strip +
.........
}
and after prepending + in your route you have to call t_on_reply("1");,
for example
route {
.....
# prepend +
t_on_reply("1");
.....
}
Anyhow, you should not touch the From and To headers, that may introduce
a lot of interoperabilities. Why changing the request URI is not enough?
>From and To are mostly used to identify the dialog by the clients.
Daniel
On 5/13/2004 9:37 PM, James Barroso wrote:
> 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.
>
>
>
>-----------------------------------------------------------------------
-
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>
More information about the sr-users
mailing list