[asterisk-users] SIP calls dropping at 15 minutes

Steve Edwards asterisk.org at sedwards.com
Fri Nov 20 10:13:13 CST 2015


I have a problem where SIP calls from some providers are dropping at 15 
minutes.

The topology is: Client sends calls to a host running OpenSIPS, OpenSIPS 
sends calls to an Asterisk server.

Below,

'Client' is the IP address of the client's host (running 
FPBX-2.8.1(1.8.20.0)

'OpenSIPS' is the IP address of my host running OpenSIPS 1.7.2-tls

'Asterisk' is the IP address of my host running Asterisk 11.17.1.

The relevant snippet of opensips.cfg is:

# 317
         if      ($rU =~ '317*')
                 {
                 ds_select_dst(
                           '02'          # set-id (in dispatcher.list)
                         , '4'           # algorithm (4 = round-robin)
                           );
                 forward();
                 return;
                 }

where set-id 02 is 'sip:Asterisk:5061'

The 'Flow' diagram from Wireshark from a tcpdump on the OpenSIPS host 
follows, hopefully the email clients will not mung it too much.

|Time     | Client                                | Asterisk          |
|         |                   | OpenSIPS          | 
|7.158764 |         INVITE SDP (g711U g7          |                   |SIP From: "760xxxxxxx" <sip:760xxxxxxx at client To:<sip:317xxxxxxx at OpenSIPS
|         |(5060)   ------------------>  (5060)   |                   |
|7.159003 |                   |         INVITE SDP (g711U g7          |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|7.161857 |                   |         100 Trying|                   |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|7.161958 |         100 Trying|                   |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |
|7.538268 |                   |         200 OK SDP (g711U te          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|7.538411 |         200 OK SDP (g711U te          |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |
|7.585703 |         ACK       |                   |                   |SIP Request
|         |(5060)   ------------------>  (5060)   |                   |
|7.585941 |                   |         ACK       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|7.586548 |         INVITE SDP (g711U te          |                   |SIP From: "760xxxxxxx" <sip:760xxxxxxx at client To:<sip:317xxxxxxx at OpenSIPS
|         |(5060)   ------------------>  (5060)   |                   |
|7.586726 |                   |         INVITE SDP (g711U te          |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|7.587792 |                   |         100 Trying|                   |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|7.587922 |         100 Trying|                   |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |
|7.588003 |                   |         200 OK SDP (g711U te          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|7.588081 |         200 OK SDP (g711U te          |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |
|7.635401 |         ACK       |                   |                   |SIP Request
|         |(5060)   ------------------>  (5060)   |                   |
|7.635674 |                   |         ACK       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|907.588019|                   |         INVITE SDP (g711U te          |SIP Request
|         |                   |(5060)   <------------------  (5061)   |
|907.590138|                   |         100 Giving a try              |SIP Status
|         |                   |(5060)   ------------------>  (5061)   |
|907.590261|                   |         INVITE SDP (g711U te          |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|907.591294|                   |         481 Call/Transaction          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|907.591420|                   |         ACK       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|907.591467|                   |         481 Call/Transaction          |SIP Status
|         |                   |(5060)   ------------------>  (5061)   |
|907.592140|                   |         ACK       |                   |SIP Request
|         |                   |(5060)   <------------------  (5061)   |
|907.867923|                   |         BYE       |                   |SIP Request
|         |                   |(5060)   <------------------  (5061)   |
|907.868231|                   |         BYE       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|907.869337|                   |         481 Call leg/transac          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|907.869412|                   |         481 Call leg/transac          |SIP Status
|         |                   |(5060)   ------------------>  (5061)   |
|1140.290782|         INVITE SDP (g711U te          |                   |SIP From: "760xxxxxxx" <sip:760xxxxxxx at client To:<sip:317xxxxxxx at OpenSIPS
|         |(5060)   ------------------>  (5060)   |                   |
|1140.291032|                   |         INVITE SDP (g711U te          |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|1140.292338|                   |         481 Call/Transaction          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|1140.292445|         481 Call/Transaction          |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |
|1140.339890|         ACK       |                   |                   |SIP Request
|         |(5060)   ------------------>  (5060)   |                   |
|1140.340011|                   |         ACK       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|1140.452758|         BYE       |                   |                   |SIP Request
|         |(5060)   ------------------>  (5060)   |                   |
|1140.452893|                   |         BYE       |                   |SIP Request
|         |                   |(5060)   ------------------>  (5061)   |
|1140.453470|                   |         481 Call leg/transac          |SIP Status
|         |                   |(5060)   <------------------  (5061)   |
|1140.453541|         481 Call leg/transac          |                   |SIP Status
|         |(5060)   <------------------  (5060)   |                   |

My knowledge of SIP is limited, but it appears that Asterisk is sending an 
INVITE at 907.588019, OpenSIPS responds with an INVITE at 907.590261, but 
Asterisk thinks the call doesn't exist and sends a BYE.

1) Is a 'ds_select_dst()' followed by a 'forward()' the right way to route 
calls in OpenSIPS? It works most of the time.

2) Can (or should) I configure Asterisk to not send the INVITE at 15 
minutes?

3) Should OpenSIPS be responding differently to the INVITE at 15 minutes?

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST



More information about the asterisk-users mailing list