[OpenSIPS-Users] ACK in failover for call setup

Seth Schultz sschultz at scholarchip.com
Fri Aug 22 02:00:14 CEST 2014


Hello,

First of all, thanks in advance for your time.

I am running OpenSIPS 1.9.2 and I am using the load_balancer module to
balance outbound calls.  Some of my gateways are on LAN and some of them
are external to my network.  There is NATing involved and I am using
set_advertised_address to ensure Via headers are properly constructed for
the INVITE and I am also using record_route_preset to ensure the
Record-Route headers are correct.  I am also using mhomed=1.  Now to the
problem.

Let's say during call setup the first gateway chosen is on the LAN.  If
this call setup fails it hits the failure route and another destination is
chosen.  It also sends an ACK to the first destination to let it know we
received the negative response and the ACK contains the correct IP address
in the Via header.  Now, when the second gateway that's chosen is external
and that call setup also fails, the ACK that is returned to the second
gateway for the negative response still contains the local LAN address in
the Via headers even though the INVITE to the second gateway had the
correct IP Address in the Via.  In fact, every other gateway chosen after
that will ACK with the local LAN address.  I've tried everything I can
think of to try and change this IP address, but I can't seem to do it.  I
would really appreciate someone's insight into this.

Thanks,
Seth

Here is a trace:

U 2014/08/21 19:27:27.791679 172.16.1.105:5060 -> 172.16.1.115:5060
INVITE sip:19999999876 at 172.16.1.115 SIP/2.0
Via: SIP/2.0/UDP 172.16.1.105;rport;branch=z9hG4bKFg352a70a3UDe
Max-Forwards: 67
From: "SCHIP OR" <sip:19999999999 at 172.16.1.115
<sip%3A12122558005 at 172.16.1.115>>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Contact: <sip:gw+opensips at 172.16.1.105:5060;transport=udp;gw=opensips>
User-Agent: FS5
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 231
X-FS-Support: update_display,send_info
Remote-Party-ID: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>
9999999999 <sip%3A12122558005 at 172.16.1.115>@172.16.1.115
>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1408638865 1408638866 IN IP4 172.16.1.105
s=FreeSWITCH
c=IN IP4 172.16.1.105
t=0 0
m=audio 24782 RTP/AVP 9 0 8 3 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20

U 2014/08/21 19:27:27.792287 172.16.1.115:5060 -> 172.16.1.105:5060
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Server: OpenSIPS (1.9.2-notls (x86_64/linux))
Content-Length: 0


U 2014/08/21 19:27:27.797418 172.16.1.115:5060 -> 172.16.1.2:5060
INVITE sip:19999999876 at 172.16.1.2 SIP/2.0
Record-Route: <sip:172.16.1.115:5060
;lr;ftag=Kmmp7H4SHtegB;schip=edd1.ce072fd2>
Via: SIP/2.0/UDP 172.16.1.115:5060;branch=z9hG4bK3854.62532862.0
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
Max-Forwards: 66
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Contact: <sip:gw+opensips at 172.16.1.105:5060;transport=udp;gw=opensips>
User-Agent: FS5
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 251
 X-FS-Support: update_display,send_info
Remote-Party-ID: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>
9999999999 <sip%3A12122558005 at 172.16.1.115>@172.16.1.115
>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1408638865 1408638866 IN IP4 172.16.1.109
s=FreeSWITCH
c=IN IP4 172.16.1.109
t=0 0
m=audio 39274 RTP/AVP 9 0 8 3 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=schipmangled:yes

U 2014/08/21 19:27:27.797732 172.16.1.2:5060 -> 172.16.1.115:5060
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 172.16.1.115:5060;branch=z9hG4bK3854.62532862.0
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Server: OpenSIPS (1.9.2-notls (x86_64/linux))
Content-Length: 0

U 2014/08/21 19:27:27.880492 172.16.1.2:5060 -> 172.16.1.115:5060
SIP/2.0 488 Destinations Exhausted
Via: SIP/2.0/UDP 172.16.1.115:5060;branch=z9hG4bK3854.62532862.0
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>;tag=5e9fb1280a969f03e7584717dc0b2ef5-7492
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Server: OpenSIPS (1.9.2-notls (x86_64/linux))
Content-Length: 0

######
This ACK has the correct Via because the INVITE was to a local gateway
######

U 2014/08/21 19:27:27.880799 172.16.1.115:5060 -> 172.16.1.2:5060
ACK sip:19999999876 at 172.16.1.2 SIP/2.0
*Via: SIP/2.0/UDP 172.16.1.115:5060;branch=z9hG4bK3854.62532862.0*
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
 Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
To: <sip:19999999876 at 172.16.1.115>;tag=5e9fb1280a969f03e7584717dc0b2ef5-7492
CSeq: 63995759 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.9.2-notls (x86_64/linux))
Content-Length: 0


U 2014/08/21 19:27:27.881441 172.16.1.115:5060 -> ext.ern.al.gw:5060
INVITE sip:19999999876 at ext.ern.al.gw:5060 SIP/2.0
Record-Route: <sip:opn.sips.ext.ip:5060;ftag=Kmmp7H4SHtegB;lr>
Record-Route: <sip:172.16.1.115:5060;ftag=Kmmp7H4SHtegB;lr>
Via: SIP/2.0/UDP opn.sips.ext.ip:5060;branch=z9hG4bK3854.62532862.1
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
Max-Forwards: 66
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Contact: <sip:gw+opensips at 172.16.1.105:5060;transport=udp;gw=opensips>
User-Agent: FS5
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 249
X-FS-Support: update_display,send_info
Remote-Party-ID: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>
9999999999 <sip%3A12122558005 at 172.16.1.115>@172.16.1.115
>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1408638865 1408638866 IN IP4 8.34.49.250
s=FreeSWITCH
c=IN IP4 8.34.49.250
t=0 0
m=audio 40528 RTP/AVP 9 0 8 3 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=schipmangled:yes

U 2014/08/21 19:27:27.888532 ext.ern.al.gw:5060 -> 172.16.1.115:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP opn.sips.ext.ip:5060;branch=z9hG4bK3854.62532862.1
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>;tag=gK0cc2566e
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Content-Length: 0


U 2014/08/21 19:27:27.912504 ext.ern.al.gw:5060 -> 172.16.1.115:5060
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP opn.sips.ext.ip:5060;branch=z9hG4bK3854.62532862.1
Via: SIP/2.0/UDP
172.16.1.105;received=172.16.1.105;rport=5060;branch=z9hG4bKFg352a70a3UDe
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
To: <sip:19999999876 at 172.16.1.115>;tag=gK0cc2566e
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
CSeq: 63995759 INVITE
Reason: Q.850;cause=1
Content-Length: 0

######
This ACK has an incorrect Via because the INVITE was to sent to an external
gateway
######

U 2014/08/21 19:27:27.912687 172.16.1.115:5060 -> ext.ern.al.gw:5060
ACK sip:19999999876 at ext.ern.al.gw:5060 SIP/2.0
*Via: SIP/2.0/UDP 172.16.1.115:5060;branch=z9hG4bK3854.62532862.1*
From: "SCHIP OR" <sip:1 <sip%3A12122558005 at 172.16.1.115>9999999999
<sip%3A12122558005 at 172.16.1.115>@172.16.1.115>;tag=Kmmp7H4SHtegB
Call-ID: 8dc4b6c9-a42d-1232-879e-07071b1d0b50
To: <sip:19999999876 at 172.16.1.115>;tag=gK0cc2566e
CSeq: 63995759 ACK
Max-Forwards: 70
User-Agent: OpenSIPS (1.9.2-notls (x86_64/linux))
Content-Length: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140821/1ba631cf/attachment-0001.htm>


More information about the Users mailing list