31481: Call/Transaction Does Not Exist
VOICE
ERROR
31481 means the call or transaction you are referencing no longer exists. For outgoing calls, Twilio does not assign a CallSID until the accept event fires, and a Call can move to closed after the remote end cancels it.
- You tried to read or use an outgoing call's
CallSIDbefore theacceptevent fired. For outgoing calls, the call may not have aCallSIDuntil then. - The call was canceled by the remote end, which transitions the
Calltoclosed. - In a Voice SDK app, the
CallInviteobject was released before the underlying signaling connection finished processing the invite lifecycle.
- Wait for the outgoing call's
acceptevent before you read or rely onCallSID. - Treat
cancelas terminal in your call flow and stop any follow-up actions once the call has been canceled or disconnected. - Keep the
CallInviteobject alive until the invite is accepted, rejected, or canceled.