Reject call
client.Live.Sessions.Reject(ctx, sessionID, body) error
POST/live/sessions/{session_id}/reject
Reject an incoming SIP call. Send a required SIP rejection status_code between 300 and 699.
Reject 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.Reject(
context.TODO(),
"session_id",
live.SessionRejectParams{
StatusCode: 486,
},
)
if err != nil {
panic(err.Error())
}
}