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

Refer call

client.Realtime.Calls.Refer(ctx, callID, body) error
POST/realtime/calls/{call_id}/refer

Transfer an active SIP call to a new destination using the SIP REFER verb.

ParametersExpand Collapse
callID string
body CallReferParams

Refer 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.Refer(
    context.TODO(),
    "call_id",
    realtime.CallReferParams{
      TargetUri: "tel:+14155550123",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples