SIP Response Code

SIP 487 Request Terminated

7 min read  ·  Updated April 2026

SIP 487 Request Terminated means a CANCEL request reached the server before the original INVITE got a final response. Most of the time this is normal — the caller hung up before the called party answered. When it isn't, the cause is almost always a CANCEL race, a forking branch that lost, or a proxy timeout.

In this guide

1. What SIP 487 means

SIP 487 Request Terminated is defined in RFC 3261 as the response a server sends to an INVITE that was canceled before a final response was generated. It is a final response itself — an ACK is required to complete the transaction.

The most common cause is also the most innocuous: the caller hung up before the callee answered. The caller's user agent sends CANCEL, the server stops processing the INVITE, and 487 is returned to confirm the transaction was terminated.

487 only indicates a problem when:

2. The CANCEL/487 protocol flow

SIP CANCEL is a request that cancels a pending INVITE transaction. The flow involves four messages:

  1. Caller sends INVITE
  2. Caller sends CANCEL (because user hung up before callee answered)
  3. Server responds 200 OK to the CANCEL
  4. Server responds 487 Request Terminated to the original INVITE
  5. Caller sends ACK to acknowledge the 487
; Normal CANCEL flow INVITE -> <- 100 Trying <- 180 Ringing CANCEL -> <- 200 OK (response to CANCEL) <- 487 Request Terminated (response to INVITE) ACK ->

The two 200 OK responses sometimes confuse engineers reading traces — one acknowledges the CANCEL request, the other (if it arrives) would acknowledge the INVITE. Only one of these can win. If 200 OK to the INVITE arrives before CANCEL is processed, the call connects and CANCEL is too late. If CANCEL is processed first, 487 is returned and the call never connects.

The ACK after 487 is mandatory under RFC 3261. Failing to ACK a 487 leaves the transaction in an indeterminate state and may cause the server to retransmit the 487 until its timer expires.

3. Common causes of unexpected 487

Cause 01
Caller hangup before answer (normal)
By far the most common cause. The caller pressed end before the callee picked up. The caller's user agent sends CANCEL, the server returns 487. This is correct behavior and not a problem. Expect to see 487 frequently in any production SIP environment that handles real human calls.
Cause 02
Forking branch lost the race
When a proxy forks an INVITE to multiple destinations (for example, ringing several phones for the same extension), the first to answer wins. The proxy then CANCELs all other branches, each of which returns 487. This is normal forking behavior — expect one 487 per losing branch. Only investigate if all branches are returning 487 with no winner.
Cause 03
Proxy or SBC timeout triggering CANCEL
An intermediate proxy or SBC waiting for a final response may give up after a configured timeout (often 32 seconds, matching Timer C in RFC 3261) and send CANCEL upstream. The original INVITE then gets 487 because the proxy canceled it on the caller's behalf. Check proxy timer values if calls are getting 487 at consistent intervals.
Cause 04
SIP ALG or middlebox interference
A SIP ALG on a router or firewall can drop or rewrite messages in ways that cause one side to think the call is canceled when the other side does not. Disable SIP ALG on all network devices in the path. This is also a common cause of CANCEL/487 appearing without an obvious user trigger.
Cause 05
CANCEL race with 200 OK
If the callee answers (sends 200 OK) at almost the same instant the caller hangs up (sends CANCEL), the two messages cross. The race is resolved by which message the server processes first. The losing side sees an unexpected outcome — the caller may see a brief connection followed by a hang up, or the callee may answer to silence and immediately get a BYE.

4. Forking and 487

Forking is when a SIP proxy receives one INVITE and sends multiple copies to different destinations. The most common scenario is an extension configured to ring multiple devices simultaneously — desk phone, mobile softphone, and a backup extension all ring at once.

The flow generates multiple 487 responses by design:

  1. Proxy receives INVITE for extension 1001
  2. Proxy forks INVITE to three endpoints (desk phone, softphone, backup)
  3. All three endpoints start ringing
  4. Desk phone answers first, sends 200 OK
  5. Proxy sends CANCEL to softphone and backup
  6. Softphone returns 487 Request Terminated
  7. Backup returns 487 Request Terminated

Two 487 responses for one call is normal in this scenario. The pattern only suggests a problem when no winner emerges — if every branch is returning 487 without any 200 OK, something else is wrong (commonly a proxy timeout that fires before any endpoint answers).

5. CANCEL race conditions

The classic SIP race is when the callee's 200 OK and the caller's CANCEL are in flight at the same time. Both are valid messages from valid endpoints; the outcome depends on which the server processes first.

If 200 OK wins

The callee's 200 OK reaches the server first. The call is considered answered. The CANCEL arrives but is too late — per RFC 3261, the proxy responds 481 Call/Transaction Does Not Exist to the CANCEL because there is no pending INVITE to cancel. The caller, having sent CANCEL, expects the call to be torn down. The caller's user agent then sends BYE to terminate the established dialog, which the callee sees as an immediate hangup after answering.

If CANCEL wins

The CANCEL reaches the server first. The pending INVITE is terminated and 487 Request Terminated is returned. The 200 OK from the callee arrives next. The proxy may forward the 200 OK back to the caller anyway (since some endpoints generate it before they fully process incoming CANCEL), and the caller's user agent must respond ACK followed immediately by BYE to dismantle the dialog.

Both outcomes are correct per the protocol, but both produce a confusing user experience. Designing endpoints to handle CANCEL races gracefully is an under-tested edge case in many SIP stacks.

6. Diagnosing 487 from a SIP trace

When investigating a 487 in a SIP trace, the answers are almost always in the timing and the message sequence. Look for:

Most 487 responses in a healthy production environment are user hangups. The signal you're looking for is a pattern — many 487s clustered around the same destination, the same proxy, or the same time window — not individual occurrences.

Frequently asked questions

What does SIP 487 Request Terminated mean?

SIP 487 Request Terminated means a CANCEL request reached the server before the original INVITE got a final response. The server responds 487 to the original INVITE to confirm that the transaction was terminated. Most 487 responses are normal — they happen any time a caller hangs up before the called party answers.

Is SIP 487 always a problem?

No. SIP 487 is the expected response when a call is canceled before being answered, which is a normal user behavior. 487 only indicates a problem when it appears unexpectedly — for example, when neither party hung up, when 487 arrives without a preceding CANCEL, or when forking branches are getting CANCELed faster than expected.

What is the difference between SIP 487 and SIP 486?

SIP 486 Busy Here is sent by the called endpoint when it cannot accept the call because it is on another call or otherwise busy. SIP 487 Request Terminated is sent in response to the original INVITE after a CANCEL aborts the transaction. 486 means the callee rejected the call; 487 means the call was canceled (usually by the caller) before the callee responded.

Seeing unexpected SIP 487 patterns?

Paste your SIP trace into SIPSymposium. The analyzer identifies CANCEL races, forking branch losses, and proxy timeouts that lead to 487 Request Terminated responses.

Analyze my trace Create free account
Related guides