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

Transfer call

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

Transfer a SIP call to another destination. Supply a nonblank target_uri for the SIP Refer-To header.

ParametersExpand Collapse
sessionID string
body SessionReferParams

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