[OpenSIPS-Users] Change Contact info in REGISTER messages

Răzvan Crainea razvan at opensips.org
Thu Jun 19 08:39:52 CEST 2014


Hi, Miguel!

Do you only want to change the Contact info that is stored in OpenSIPS 
database or change the Contact header in the REGISTER message?
The code you pasted changes only the info in the location table. If you 
want to change the header, you can remove it and add a new one. 
Something like:

remove_hf("Contact");
append_hf("Contact: <sip:$tU@$si:5092>\r\n");

See [1] for more details.

[1] http://www.opensips.org/html/docs/modules/devel/sipmsgops#id249696

Best regards,

Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 06/19/2014 09:10 AM, Miguel Oyarzo wrote:
>
> Hi,
>
> How can I change the Contact info in REGISTER messages?
>
> I have tried
> if (is_method("REGISTER"))
> {
>
> if (!save("location","","sip:61370000000 at 10.10.1.120:5090
> <http://sip:61370000000@10.10.1.120:5090>")) { .... }
> - and -
> $avp(aor)="sip:$tU@$si:5092";
> if (!save("location","f","$avp(aor))") { ... }
>
> }
>
> But doesn't work.
>
> Any suggestion?
>
>
>
> --
> "Efficiency is doing things right; effectiveness is doing the right
> things(Peter Drucker)"
>
> Miguel Oyarzo
> DevOps & VoIP Engineer
> Linux User: # 483188 - counter.li.org <http://counter.li.org>
> http://au.linkedin.com/in/mikeaustralia
> Melbourne, Australia
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list