[OpenSIPS-Users] wrong contact header in reply route

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Sep 30 19:53:13 CEST 2015


Hi Faheem,

In onreply route you must not touch the contact hdr if reply comes from 
the proxy. That reply will contain as contact the IP of the end callee 
(some device behind the proxy). IF you do fix_nated_contact(), you will 
overwrite it with the IP of the source entity (the proxy) loosing 
valuable routing info.

Regards,

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

On 29.09.2015 20:00, Faheem Muhammad wrote:
> Hi,
> I'm facing an ACK loop while making calls. The issue is occurred due 
> to bad CONTACT header. Scenario is as follows.
>
> sip_user1(10.111.11.136) <-> 
> OpenSIPS-1(10.109.5.189) <-->Outbound_proxy1 (10.109.5.237)
>
> The issue occurs when sip_user1 sends INVITE to OpenSIPS-1. OpenSIPS-1 
> processes the request and send to Outbound_proxy1.
> When OpenSIPS-1 receive 200 OK from Outbound_proxy1, it relays '200 
> OK' back to sip_user1 with bad CONTACT header. It relays '200 OK' with 
> the CONTACT header of the proxy.
>
> I have tried to apply the fix_nated_contact() in reply route block but 
> it does not fix the contact header which causes an ACK loop internally 
> when first ACK is received from sip_user1.
> Can you please suggest me what's wrong with my routing logic.
>
>
> Here is my reply_route block.
> ------------------------------------------------------------------
> onreply_route[handle_nat] {
> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
>     if (isbflagset(FLB_NAT)) {
>  xlog("L_NOTICE", "[$pr:$fU@$si:$sp]:  fixing Nated Contact. \n");
> # issue comes here...
>         fix_nated_contact();
>
>     }
>
> }
> --------------------------------------------------------------------
>
> OpenSIPS Logs and SIP trace is attached below link.
> https://www.dropbox.com/sh/rrjgajt9zgj852q/AABrCIftwjVcaMbWgJwR9NYha?dl=0
>
> Regards,
> Faheem
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150930/2c42d50b/attachment.htm>


More information about the Users mailing list