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.
Parameters
callID string
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())
}
}