Reject call
client.Realtime.Calls.Reject(ctx, callID, body) error
POST/realtime/calls/{call_id}/reject
Decline an incoming SIP call by returning a SIP status code to the caller.
Parameters
callID string
Reject 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.Reject(
context.TODO(),
"call_id",
realtime.CallRejectParams{
},
)
if err != nil {
panic(err.Error())
}
}