[OpenSIPS-Users] NAT: Why replacing "Contact" with the receivedpublic IP:port instead of adding a parameter with it?
Schumann Sebastian
Sebastian.Schumann at t-com.sk
Fri Nov 7 14:03:47 CET 2008
Hi Inaki
I have to change the IP in the contact field, using avps and textops functions.
$avp(s:contact) = $ct;
avp_subst("$avp(s:contact)", "/(.*)@.*(>.*)/\1 at 10.0.0.1:5060\2/");
remove_hf("Contact");
append_hf("Contact: $avp(s:contact)\r\n");
Similarly, the regexp could check for the point to include your parameter and put it there.
Not so elegant though, but works fine for me.
Best regards
Sebastian
> -----Original Message-----
> From: users-bounces at lists.opensips.org
> [mailto:users-bounces at lists.opensips.org] On Behalf Of Iñaki
> Baz Castillo
> Sent: Friday, 07. November 2008 13:59
> To: users at lists.opensips.org
> Subject: Re: [OpenSIPS-Users] NAT: Why replacing "Contact"
> with the receivedpublic IP:port instead of adding a parameter with it?
>
> 2008/11/7 Iñaki Baz Castillo <ibc at aliax.net>:
> > <F3>
> > BYE sip:alice at PRIVATE_ADDRESS;received="sip:PUBLIC_ADDRESS" SIP/2.0
> >
> > --------
> > Now the Proxy sets the destination URI $du with "sip:PUBLIC_ADDRESS"
> > so the BYE is forwarded tu alice public address without
> changing the
> > RURI.
> > --------
>
> Is it possible to add a parameter in the Contact URI? I don't
> find an elegant way.
>
> --
> Iñaki Baz Castillo
> <ibc at aliax.net>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list