Skip to main content

Live SIP Call Controls

SIP helpers on an existing Live session. Place outbound calls with POST /v1/live/sessions. Attach a sideband to watch ringing and answer. See the GPT-Live guide and OpenAI Telephony.

All four routes require Authorization: Bearer sk-… and a path session_id. The same routes are mounted under /api/v1.

Accept​

POST 

https://api.knox.chat/v1/live/sessions/:session_id/accept

Accept an incoming SIP call. Knox pins session.model to gpt-live-1 and sets session.type to "live" (required by OpenAI; do not send another value). Starts billing with the 15-second SIP init charge.

curl -s https://api.knox.chat/v1/live/sessions/sess_…/accept \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"session": {
"model": "gpt-live-1",
"audio": { "output": { "voice": "marin" } },
"store": true
}
}'

An empty body is accepted. session.type if present must be "live".

Hang up​

POST 

https://api.knox.chat/v1/live/sessions/:session_id/hangup

End a SIP call. No body.

curl -s https://api.knox.chat/v1/live/sessions/sess_…/hangup \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-X POST

Refer (transfer)​

POST 

https://api.knox.chat/v1/live/sessions/:session_id/refer

Transfer the call. target_uri is required and must be a non-blank SIP Refer-To URI with no whitespace.

curl -s https://api.knox.chat/v1/live/sessions/sess_…/refer \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "target_uri": "sip:+15555550199@sip.example.com" }'

Reject​

POST 

https://api.knox.chat/v1/live/sessions/:session_id/reject

Reject an incoming SIP call. status_code is required and must be an integer 300-699.

curl -s https://api.knox.chat/v1/live/sessions/sess_…/reject \
-H "Authorization: Bearer $KNOXCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status_code": 486 }'

Error Responses​

StatusWhen
400Invalid JSON, session.type not "live" (accept), missing target_uri (refer), or status_code outside 300-699 (reject).
401Missing or invalid Knox API key.
402Account balance is not greater than $0.01 (accept starts a billable session).
403Token is not authorized for gpt-live-1.
404Session not found or not owned by you.
502Upstream SIP action failed.