Occasional dropped calls after 15 minutes


I am having a problem with a server. I am having some calls drop after 15 minutes. The internet carrier has what they call a virtual router. We do not have any way to access or change it. I have a flow from the call. Please help!!


Which version?

Which is which of party A and party B?

What are the call-IDs, tags, and Contact headers on all the requests and responses.

If party B is Asterisk, have you overridden T1 as the backoff seems to be starting very high; normally you would expect it to reach the maximum retries in about 30 seconds.

Looks like A gave a final timeout before B gave up, so I think it is probably getting the re-INVITEs but failing to send the responses to the correct place, or they are failing to get through.

Hi David,

Thanks for your reply.

We are using Asterisk version 11.5.1

Party A is the asterisk PBX, party B is the carrier trunk.

I am unsure of the call id, tags, etc. I have attached a pcap of the call on this link

The problem seems to be that the trunk sends a re invite but the server never responds to the request. The trunk usually drops the call. It looks like the PBX dropped the call in this case.

Here is the trunk definition.


re-INVITE is used to modify the dialog and the parameters of the session,
If a UAS (User agent server) generates a 2xx response and never receives an ACK, it SHOULD generate a BYE to terminate the dialog, this could be your case

In the other hand i I think nat=yes is deprecated as well careinvite in the asterisk version 11.x not sure about it, Also I dont think you will find many peoples willing to download a pcap file of 22 MB and analyze it for you in support forum.

Thanks for your response ambiorixg12,

It does appear my problem is an invite that does not receive an ACK. I have tried to determine if canreinvite set to yes on the trunk would help. It does not appear to do so. Is their a way to respond to an invite request while a call is in place?

You can not do it manually,

Do you know of a way to have the SIP trunk not request an invite during a call? I tried session-timers=refuse but the invite is still sent.

I dont think it can be done, because modification in a sip session like changing addresses or ports, adding a media stream, deleting a media stream, and so on, is accomplished by sending a re-INVITE

Based on that I would have to respond to the re invite on order to keep the call active. That brings two possibilities to consider. If the PBX does not receive the request that would present one problem. The re invite does appear to be in the packets so perhaps it can be considered last. Next would be a way to have the PBX respond to the invite. Can that be done using a script? Is there a way to force asterisk to respond?

Session with re-INVITE (IP Address Change)

 Alice                Proxy 2                Bob
    |   F1 INVITE        |                    |
    |------------------->|      F2 INVITE     |
    |   F3 100 Trying    |------------------->|
    |<-------------------|   F4 180 Ringing   |
    |   F5 180 Ringing   |<-------------------|
    |<-------------------|                    |
    |                    |    F6 200 OK       |
    |    F7 200 OK       |<-------------------|
    |<-------------------|                    |
    |                 F8  ACK                 |
    |      Both Way RTP Media Established     |
    |                                         |
    |           Bob changes IP address        |
    |                                         |
    |                 F9 INVITE               |
    |                F10 200 OK               |
    |                 F11  ACK                |
    |         New RTP Media Stream            |
    |                 F12 BYE                 |
    |               F13 200 OK                |
    |                                         |

It seems the ACK is not recived, you should ask you carrier about this, they can make a sip trace on their side, and verify if this is the issue.

I will ask them to trace calls and see if this is the case.

Thank you.

Asterisk isn’t seeing an ACK, because its responses are not reaching the peer. I’m not sure where the PCAP is being taken, but I would say that Asterisk would definitely send a response, so either you are capturing on the far side of the router and that is not passing the response, or the Contact header in the re-invite is pointing to an address not on the interface being captured.

Can you explain why you believe you need to force the assumption that rport has been set and require comedia? In particular, is Asterisk inside or outside NAT. If it is inside and the peer is outside, you have not provided any way for it to find its own external address.

Although the re-invite is inbound, your network clearly has problems with re-invites, so I would delete the obsolete canreinvite and use directmedia=no, so that it, at least, doesn’t try outbound re-invites.

As noted, the T1 setting on the peer is excessive. No-one is going to wait 15 minutes for a call to start ringing.

It is much better to include the relevant parts of sip set debug on output in-line, than links to, potentially, very large pcap files.