📖 SIP Status Codes & Call Disconnect Reference
This document provides a reference of SIP response codes, standardized SDK disconnect causes, and best practices for handling call disconnection in the Pitel VoIP Android SDK.
🔍 Overview
When a call session terminates, the SDK triggers the onCallDisconnected callback in PitelCallListener (or observeCallState):
override fun onCallDisconnected(statusCode: Int, reason: String?, cause: String?) {
Log.d("VoIP", "Call ended: code=$statusCode, reason=$reason, cause=$cause")
}
statusCode(Int): Raw SIP response code returned by PBX (e.g.200,486,404).reason(String?): Reason text received from PBX (e.g."Busy Here","Not Found").cause(String?): Standardized SDK cause identifier normalized across Android & iOS.
📊 Complete SIP Status Codes Table
| SIP Code | SDK Cause | Meaning / Context | Normal vs Error |
|---|---|---|---|
| 200 | NORMAL_CLEARING | Call ended normally after conversation. | Normal |
| 487 | ORIGINATOR_CANCEL | Either caller or callee canceled/hung up before answer. | Normal |
| 486 / 600 | USER_BUSY | Callee is currently busy on another call or rejected. | Error / Busy |
| 480 | NO_USER_RESPONSE | Callee is temporarily unavailable or timed out ringing. | Error / Timeout |
| 404 | UNALLOCATED_NUMBER | Dialed extension or phone number does not exist on PBX. | Error / Not Found |
| 401 / 403 / 603 | CALL_REJECTED | PBX rejected the call due to auth failure or permissions. | Error / Rejected |
| 408 / 504 | RECOVERY_ON_TIMER_EXPIRE | Request timed out waiting for PBX server response. | Error / Timeout |
| 488 / 606 | INCOMPATIBLE_DESTINATION | Codec mismatch or media negotiation failed. | Error / Codec |
| 502 | NETWORK_OUT_OF_ORDER | Telephony gateway or intermediate carrier link is down. | Error / Gateway |
| 500 / 503 | NORMAL_TEMPORARY_FAILURE | Temporary PBX server or network failure. | Error / Server |