[OpenSIPS-Users] ACK not Relayed to correct destination on RE-INVITE

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Wed May 4 18:13:59 CEST 2011

Hi Ash,
I don't see the re-INVITE in your trace but I see that ACK after 200 OK 
from Yealink is not routed properly. I think your Cisco 877 has some 
sort of SIP ALG enabled:

Note 200 OK message from FreeSwitch contains:
Record-Route: <sip:;lr;ftag=1063201394;did=212.ef2d2d26>
Contact: <sip:xxxx7772 at;transport=udp>

After that Yealink sends an ACK:
ACK sip:xxxx7772 at;transport=udp SIP/2.0
Route: <sip:;lr;ftag=1063201394;did=212.ef2d2d26>

Route header is correct, but Request-URI is wrong: it must contain 
remote target address from the Contact header: ACK 
sip:xxxx7772 at;transport=udp

I think that if you collected the SIP trace from Yealink you would have 
found that router put its own IP address in Contact of 200 OK, hence it 
put router's IP into Request-URI.

The very first INVITE message from the Yealink is not quite right too: 
source ip:port is but Contact and Via contains This might be caused but STUN not working properly, 
but since the problem occurs in both ways and with different UAs, Cisco 
877 is likely modifying the SIP headers.

On 29.04.2011 08:28, Ash wrote:
> Hi there,
> I have been trying for the last week to configure the load balancing in
> OpenSIPS.  I am trying to configure a load balancer as per the wiki on
> the Freeswitch page -
> http://wiki.freeswitch.org/wiki/Enterprise_deployment_OpenSIPS, I have
> also tried the sample on the OpenSIPS site and I am getting the same
> results.
> I am attempting to have all my registrations and Invites proxied to the
> the Freeswitch server which will do the call processing.  My phone is
> told to point to the SIP Domain voip2.siptest.net.au
> <http://voip2.siptest.net.au> which resolves to OpenSIPS.
> This is a quick layout of the path:
>     Yealink T20 - VOIP Phone - (Private IP)
>     | (NAT)
>     Cisco 877 DSL Router ( (Public IP)
>     |
>     |
>     OpenSIPS ( (Public IP)
>     |
>     FreeSWITCH ( (Public IP)
>     |
>     External VOIP Provider
>     (Assume 2.2.239.X and 1.1.108.X are public ranges)
> I register to the OpenSIPS load balancer using domains in this test case
> I am using 613xxxx2002 at voip2.siptest.net.au
> <mailto:613xxxx2002 at voip2.siptest.net.au> where voip2.siptest.net.au
> <http://voip2.siptest.net.au> is pointed to  The
> registration appears normal on both the OpenSIPS and Freeswitch.  The
> destination I am calling is via another SIP provider which is routed by
> Freeswitch on the external profile.
> The problem I am seeing is that it looks like when a RE-INVITE happens
> the ACK gets sent back to instead of being relayed to
>,  I can see the ACK from but OpenSIPS then
> replies and sends the ACK message to where it should be
> seeing that it needs to send it to  Freeswitch will then
> keep sending 200 OK to OpenSIPS and then hang the call up after 30
> seconds as there has been no ACK received.  If there is no RE-Invite
> then the calls seems to work fine.  It only seems to be when a RE-Invite
> is sent by the Phone.  (I have tried a Siemens Gigaset and get the same
> issue). If I register the phone directly to Freeswitch I don't seem to
> have these issues.
> I have seen this issue mentioned on mailing lists in the past and I have
> tried the suggestions but none seem to work for me.
> I have provided the following which may assist:
> opensips.cfg
> http://pastebin.com/hG2GUHWV
> SIP Trace
> http://pastebin.com/8fahFPj3
> OpenSIPS debug
> http://pastebin.com/T9ULEeXt
> Hopefully someone out there might have some ideas.  Any advice would be
> appreciated.
> Cheers,
> Ash.

Andrew Pogrebennyk

More information about the Users mailing list