Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Reject call

client.Live.Sessions.Reject(ctx, sessionID, body) error
POST/live/sessions/{session_id}/reject

Reject an incoming SIP call. Send a required SIP rejection status_code between 300 and 699.

ParametersExpand Collapse
sessionID string
body SessionRejectParams

Reject call

package main

import (
  "context"

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

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Live.Sessions.Reject(
    context.TODO(),
    "session_id",
    live.SessionRejectParams{
      StatusCode: 486,
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples