Skip to main content
POST
Hand back a transferred call
When a Classical IVR transfers a caller to a SIP destination, the caller stays on the OpenCX call while your SIP endpoint talks to them. Call this endpoint, instead of hanging up, when the caller should continue with the organization. OpenCX hangs up your SIP leg, then the IVR continues with the steps after the transfer, usually a transfer to a team. The caller keeps the same call, recording and session throughout. Send the session ID you received in the X-OPENCX-SESSION-ID SIP header of the transfer. The destination must list X-OPENCX-SESSION-ID among its allowed headers if it uses an allowlist.
  • Create the API key with the Hand back transferred calls (phone-calls:write) scope. That scope cannot read or change any other phone configuration. A phone:write key can also hand calls back.
  • Pass an optional summary of the conversation so far. It replaces the session’s summary before the teammate is connected, so they see it when the call rings. It is saved only when the hand-back is accepted.
  • Repeating a successful hand-back returns the same response and changes nothing; a summary sent with the repeat is ignored.
  • A 409 means the session has no transferred call waiting: your leg has not answered yet, your leg or the caller already hung up, or the session has no SIP transfer. Hanging up without calling this endpoint returns the caller to the IVR, which continues with the completed outcome.
  • A 404 means the session does not exist in the organization that owns the API key.
Do not hang up your leg first: OpenCX hangs it up for you once the hand-back is accepted. If your leg hangs up before the hand-back arrives, the hand-back is still accepted for a few seconds.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
session_id
string<uuid>
required

The session of the call to hand back, as received in the X-OPENCX-SESSION-ID SIP header

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
summary
string

Your summary of the conversation so far. Saved as the session's summary before a teammate is connected.

Required string length: 1 - 10000

Response

Default Response

session_id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
status
string
required
Allowed value: "handed_back"