Skip to content

Reject call

client.Realtime.Calls.Reject(ctx, callID, body) error
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
StatusCode param.Field[int64]optional

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

Reject call

package main

import (
  "context"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
  "github.com/openai/openai-go/realtime"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Realtime.Calls.Reject(
    context.TODO(),
    "call_id",
    realtime.CallRejectParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples