[OpenSIPS-Users] wrong contact header in reply route

Faheem Muhammad faheem2084 at gmail.com
Tue Sep 29 19:00:44 CEST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150929/ecf84039/attachment-0001.htm>


More information about the Users mailing list