Re: [OpenSIPS-Users] contact after fix_nated_contact()

2016-05-30 Thread Bogdan-Andrei Iancu

Hi Rahul,

the fix_nated_contact() replaces the IP and port from the Contact URI 
with the source IP and port from network level - so, the outcome is 
really predictable ; you can print the incoming contact $ct and the 
source network coordinates $si and $sp - this will give all the info you 
need to see.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.05.2016 19:17, Gupta, Rahul wrote:

Hi Alex, thanks for the quick reply. I don't see if msg_apply_changes() is 
available in opensips. When I use it, I get the bad config file error. I did 
add loadmodule textops.so


Thanks
Rahul Gupta


---

Vote for IPC in the 2016 Waters Technology Awards. Winners are decided by people who are 
most important to us - our customers! Please vote for us (#27, #29) by 
"https://www.surveymonkey.com/r/R6Y27GJ;.



-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Alex Balashov
Sent: Monday, May 23, 2016 12:00 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] contact after fix_nated_contact()

On 05/23/2016 11:55 AM, Gupta, Rahul wrote:

How do I get the updated contact after fix_nated_contact(), for
example in the log statement  $ct prints the old Contact.

xlog("Contact before fix_nated_contact: $ct");

fix_nated_contact();

xlog("Contact after fix_nated_contact: $ct");

You can run msg_apply_changes() after calling fix_nated_contact(), assuming it 
doesn't have any effects harmful to your cause:

http://kamailio.org/docs/modules/4.4.x/modules/textopsx.html#textopsx.f.msg_apply_changes

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] contact after fix_nated_contact()

2016-05-23 Thread Alex Balashov

On 05/23/2016 12:17 PM, Gupta, Rahul wrote:


Hi Alex, thanks for the quick reply. I don't see if
msg_apply_changes() is available in opensips. When I use it, I get
the bad config file error. I did add loadmodule textops.so


Oh, sorry! I thought this function was available in OpenSIPS too.

--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] contact after fix_nated_contact()

2016-05-23 Thread Gupta, Rahul
Hi Alex, thanks for the quick reply. I don't see if msg_apply_changes() is 
available in opensips. When I use it, I get the bad config file error. I did 
add loadmodule textops.so


Thanks
Rahul Gupta


---

Vote for IPC in the 2016 Waters Technology Awards. Winners are decided by 
people who are most important to us - our customers! Please vote for us (#27, 
#29) by "https://www.surveymonkey.com/r/R6Y27GJ;.



-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Alex Balashov
Sent: Monday, May 23, 2016 12:00 PM
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] contact after fix_nated_contact()

On 05/23/2016 11:55 AM, Gupta, Rahul wrote:
> How do I get the updated contact after fix_nated_contact(), for
> example in the log statement  $ct prints the old Contact.
>
> xlog("Contact before fix_nated_contact: $ct");
>
> fix_nated_contact();
>
> xlog("Contact after fix_nated_contact: $ct");

You can run msg_apply_changes() after calling fix_nated_contact(), assuming it 
doesn't have any effects harmful to your cause:

http://kamailio.org/docs/modules/4.4.x/modules/textopsx.html#textopsx.f.msg_apply_changes

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] contact after fix_nated_contact()

2016-05-23 Thread Alex Balashov

On 05/23/2016 11:55 AM, Gupta, Rahul wrote:

How do I get the updated contact after fix_nated_contact(), for example
in the log statement  $ct prints the old Contact.

xlog("Contact before fix_nated_contact: $ct");

fix_nated_contact();

xlog("Contact after fix_nated_contact: $ct");


You can run msg_apply_changes() after calling fix_nated_contact(), 
assuming it doesn't have any effects harmful to your cause:


http://kamailio.org/docs/modules/4.4.x/modules/textopsx.html#textopsx.f.msg_apply_changes

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] contact after fix_nated_contact()

2016-05-23 Thread Gupta, Rahul
How do I get the updated contact after fix_nated_contact(), for example in the 
log statement  $ct prints the old Contact.

xlog("Contact before fix_nated_contact: $ct");
fix_nated_contact();
xlog("Contact after fix_nated_contact: $ct");


Thanks
Rahul Gupta

---

Vote for IPC in the 2016 Waters Technology Awards. Winners are decided by 
people who are most important to us - our customers! Please vote for us (#27, 
#29) by clicking here.

--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an intended 
recipient of this e-mail, do not duplicate or redistribute it by any means. 
Please delete it and any attachments and notify the sender that you have 
received it in error. Unintended recipients are prohibited from taking action 
on the basis of information in this e-mail.E-mail messages may contain computer 
viruses or other defects, may not be accurately replicated on other systems, or 
may be intercepted, deleted or interfered with without the knowledge of the 
sender or the intended recipient. If you are not comfortable with the risks 
associated with e-mail messages, you may decide not to use e-mail to 
communicate with IPC. IPC reserves the right, to the extent and under 
circumstances permitted by applicable law, to retain, monitor and intercept 
e-mail messages to and from its systems.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users