Troubleshooting Repeated SIP 200 OK Responses and BYE Timeouts
Trace the final SIP ACK and the reverse BYE independently. See six controlled Asterisk and FreeSWITCH cases covering Record-Route DNS and TLS connection state.
When the same SIP INVITE receives repeated final 200 OK responses, trace the matching final ACK to the device that sent the response. If a server-originated BYE also goes unanswered, check the return path and TLS connection used for that BYE separately.
On November 24, 2026 KST, 한국에이아이통신 (한국AI통신), operated by TeamLearners Inc. at koreaaitel.com, ran three isolated conditions each with Asterisk 22.11.0 and FreeSWITCH 1.11.4.
What we observed in six isolated tests
A synthetic SIP peer behind a TCP relay challenged the initial INVITE with 407. Its final 200 OK advertised a different hostname in Record-Route. We changed which names the test resolver could resolve and whether the original TLS connection stayed open.
| Test condition | Final INVITE 200 responses per PBX | Final ACK reached the peer | Server-originated BYE |
|---|---|---|---|
| Only the initial hostname resolves; original TLS connection stays open | 5 | No | 200 response on the original connection |
| Both names resolve to the relay; original TLS connection stays open | 1 | Yes | 200 response on the original connection |
| Both names resolve; original TLS connection closes after ACK | 1 | Yes | Original connection unavailable; no response |
Both PBXs behaved the same way. In the first condition, the route hostname returned NXDOMAIN, while both PBXs answered the BYE sent over the open connection. In the third condition, the peer received the ACK before we closed the connection. The test covers SIP signaling on the original flow. Carrier calls, RTP, reconnection to the Contact target, and SIP transaction timeout behavior require separate tests.
Which ACK matches the repeated 200 OK?
The caller generates an in-dialog ACK for the successful INVITE. The ACK uses the same numeric CSeq as that INVITE and changes the method to ACK. The endpoint that sent the final response can retransmit it until the matching ACK arrives, including over a reliable transport such as TLS. RFC 3261 on the final INVITE ACK · Retransmission of the final response
- Match the
Call-ID,Fromtag, andTotag in the signaling logs for the same SIP leg. Find the ACK whoseCSeqnumber matches the final INVITE response. Record the earlier ACK to the authentication challenge separately. - Compare the final response’s
Record-RouteandContactwith the outgoing ACK’sRoute, Request-URI, and actual destination. The route set and remote target can send the ACK through a different next hop from the original INVITE. - Check the actual target’s DNS result, port, protocol, and TLS certificate validation from the PBX’s own host or container. If the outbound log shows the ACK, confirm arrival in the next hop’s SIP log. RFC 3261 on dialog routing · RFC 3263 on locating SIP servers
On Asterisk, run pjsip set logger on in the CLI. On FreeSWITCH, run sofia profile TEST_PROFILE siptrace on with the actual test profile name. At a TLS relay, compare connection timestamps with the decoded signaling at the endpoints. Before sharing a trace, mask authorization headers, phone numbers, IP addresses, and SDP. Use consistent aliases for dialog identifiers across the captures. Asterisk debug logging · FreeSWITCH troubleshooting tools
What should you capture when the BYE times out?
Follow the server’s outgoing BYE, its receipt at the PBX, and the 200 OK returning to the server. Match the BYE and its response by CSeq and record the destination and TLS connection that carried the request. If that connection closed between the final ACK and the BYE, check whether the sender attempted a new connection and where it went. Keep both test endpoints and the relay available through the final response. RFC 3261 on BYE · SIP connection reuse
Verify audio separately by sending a distinct test signal at each end and checking that both arrive. For Korean 070 inbound and outbound settings, see the Korean 070 SIP setup and PBX compatibility guide, the SIP trunk documentation, and the network requirements.