In this lesson, we will look in to why 32 second disconnection occurs and how can we troubleshoot it.

What causes 32 seconds disconnection?

?name=Selection_039.png

A 32 second disconnection issue is caused by a broken ACK.

  • In the screenshot above, you can see that PortaSIP is sending 200ok Messages [1] to confirm a call has been answered. Porta is expecting an ACK message for its 200ok which will acknowledge that the UA is ready to accept the call.
  • As you can see, the ACK messages [2] are not send beyond the first hop as Porta did not accept its format. Instead, porta continues to send 200ok messages [3] until it receives a correcly build ACK message. The ACK message is broken.
  • After 32 seconds, Porta will give up and will send a BYE message [4] that terminates the call.

Below we will look in to what part of the ACK is broken. This information may help us guide the UA manufacturers to fix the issue.

No Contact Header in the ACK message

?name=Selection_040.png

According to RFC3261, ACK needs to have contact header which is not provided by your softphone.

"The UAS MUST add a Contact header field to
the response. The Contact header field contains an address where the
UAS would like to be contacted for subsequent requests in the dialog
(which includes the ACK for a 2xx response in the case of an INVITE)."

ACK Header should answer to the same port 200ok responds to.

?name=Selection_040_1.png

The ACK header should be same as 200ok. If the 200ok comes from 5061, the ack should be sent to 5061.

The 200ok may come with ";lr" symbol. The ACK should also contain the ";lr" in either the ACK header or the Route header. Below is an example of a broken ACK message:

ACK sip:8801665@78.40.240.169 SIP/2.0
Route: <sip:78.40.240.169:5061>

the proper ACK should be

ACK sip:8801665@78.40.240.169:5061;lr SIP/2.0
Route: <sip:78.40.240.169>

or

ACK sip:8801665@78.40.240.169 SIP/2.0
Route: <sip:78.40.240.169:5061;lr>

This issue where ";lr" is not present can be fixed by enabling the 'AllowBrokenACK' parameter onyour PortaSIP server. Please raise a ticket to request this change.

CSeq should be same number as 200ok CSeq

?name=Selection_040_1_1.png

In above example, CSeq header is 102. This means this ack is a response to 102 200ok message. If the CSeq numbe ris not the same, porta will not know to which message the UA has sent the response for.

?name=Selection_041.png

You can clearly see the CSeq values in the SIP log viewer. You can see that a 200ok with CSeq 883 [3] is sent from vendor. The ACK [4] sent back to it has teh same CSeq 883.

When the UA receives 200ok [1], it has to respond with with an ACK [2] that has the same CSeq number.