Skip to content
Primary navigation

Reject call

client.realtime.calls.reject(stringcallID, CallRejectParams { status_code } body?, RequestOptionsoptions?): void
POST/realtime/calls/{call_id}/reject

Decline an incoming SIP call by returning a SIP status code to the caller.

ParametersExpand Collapse
callID: string
body: CallRejectParams { status_code }
status_code?: number

SIP response code to send back to the caller. Defaults to 603 (Decline) when omitted.

Reject call

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

await client.realtime.calls.reject('call_id');
Returns Examples