{
  "id": "communication/sip-481-loop-detected",
  "signature": "SIP/2.0 481 Call/Transaction Does Not Exist",
  "signature_zh": "SIP/2.0 481 呼叫/事务不存在",
  "regex": "SIP/2\\.0 481 (Call|Transaction) Does Not Exist",
  "domain": "communication",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "SIP proxy or B2BUA receives a request for a dialog or transaction that it has already terminated or never created, often due to forked requests or out-of-order CANCEL.",
  "root_cause_type": "generic",
  "root_cause_zh": "SIP 代理或 B2BUA 收到了一个针对已终止或从未创建的对话或事务的请求，通常是由于分叉请求或 CANCEL 乱序导致。",
  "versions": [
    {
      "version": "Kamailio 5.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "FreeSWITCH 1.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Asterisk 20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "opensips 3.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restart the SIP proxy service to clear all dialogs",
      "why_fails": "The error is caused by dialog state mismatch, not by stale state. Restarting loses all active calls and won't fix the routing logic that creates the mismatch.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase transaction timeout values in SIP config",
      "why_fails": "481 is not a timeout error; it's a state machine inconsistency. Longer timeouts only delay the inevitable failure.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable SIP forking entirely",
      "why_fails": "While forking can contribute to 481 errors, disabling it breaks legitimate call distribution and is an overreaction. The root cause is usually improper dialog tracking.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Enable SIP dialog tracking in Kamailio: `modparam(\"dialog\", \"track_cseq_updates\", 1)` and ensure `dlg_flag` is set on initial INVITE. Also add `failure_route` to handle 481 gracefully by sending ACK and clearing state.",
      "success_rate": 0.82,
      "how": "Enable SIP dialog tracking in Kamailio: `modparam(\"dialog\", \"track_cseq_updates\", 1)` and ensure `dlg_flag` is set on initial INVITE. Also add `failure_route` to handle 481 gracefully by sending ACK and clearing state.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure FreeSWITCH to handle 481 by setting `sip-force-expires` on re-INVITE and enabling `sip-call-id` validation in the dialplan to reject mismatched requests.",
      "success_rate": 0.75,
      "how": "Configure FreeSWITCH to handle 481 by setting `sip-force-expires` on re-INVITE and enabling `sip-call-id` validation in the dialplan to reject mismatched requests.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add a SIP route in Asterisk that matches 481 responses and sends a CANCEL or BYE to clean up the dangling transaction on the upstream leg.",
      "success_rate": 0.8,
      "how": "Add a SIP route in Asterisk that matches 481 responses and sends a CANCEL or BYE to clean up the dangling transaction on the upstream leg.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Enable SIP dialog tracking in Kamailio: `modparam(\"dialog\", \"track_cseq_updates\", 1)` and ensure `dlg_flag` is set on initial INVITE. Also add `failure_route` to handle 481 gracefully by sending ACK and clearing state.",
    "Configure FreeSWITCH to handle 481 by setting `sip-force-expires` on re-INVITE and enabling `sip-call-id` validation in the dialplan to reject mismatched requests.",
    "Add a SIP route in Asterisk that matches 481 responses and sends a CANCEL or BYE to clean up the dangling transaction on the upstream leg."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://datatracker.ietf.org/doc/html/rfc3261#section-21.4.3",
  "official_doc_section": null,
  "error_code": "481",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.78,
  "resolvable": "partial",
  "first_seen": "2024-03-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}