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
Theme

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.

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())
  }
}
Parameters
callID string
body CallReferParams
Returns Examples