Accept call
client.Realtime.Calls.Accept(ctx, callID, body) error
POST/realtime/calls/{call_id}/accept
Accept an incoming SIP call and configure the realtime session that will handle it.
Parameters
callID string
Accept 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.Accept(
context.TODO(),
"call_id",
realtime.CallAcceptParams{
RealtimeSessionCreateRequest: realtime.RealtimeSessionCreateRequestParam{
},
},
)
if err != nil {
panic(err.Error())
}
}