Pular para o conteúdo principal

Não há mais suporte para esse navegador.

Atualize o Microsoft Edge para aproveitar os recursos, o suporte técnico e as atualizações de segurança mais recentes.

Baixar o Microsoft Edge Mais informações sobre o Internet Explorer e o Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Realtime

Decline a SIP call

POST /openai/v1/realtime/calls/{call_id}/reject

Declines an incoming SIP call by returning a SIP status code to the caller.

Parâmetros de caminho

call_id string exigido

The identifier for the call provided in the realtime.call.incoming webhook.

Corpo da solicitação

Provide an optional SIP status code. When omitted the API responds with 603 Decline.

Content-Type: application/json
status_code integer

Respostas

The request has succeeded.

Client error

Corpo

Content-Type: application/json
error OpenAI.Error exigido
code string | null exigido
message string exigido
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string exigido

The public continuation instruction.

details OpenAI.Error[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

Server error

Corpo

Content-Type: application/json
error OpenAI.Error exigido
code string | null exigido
message string exigido
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string exigido

The public continuation instruction.

details OpenAI.Error[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

Solicitar

curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status_code": 486}'
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

await client.realtime.calls.reject('call_id');
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
client.realtime.calls.reject(
    call_id="call_id",
)
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())
    }
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.realtime.calls.CallRejectParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        client.realtime().calls().reject("call_id");
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

result = openai.realtime.calls.reject("call_id")

puts(result)
pt-br
Suas escolhas de privacidade
  • Aviso de isenção de responsabilidade sobre a IA
  • Versões anteriores
  • Blog
  • Contribuir
  • Privacidade
  • Privacidade da Integridade do Consumidor
  • Termos de Uso
  • Marcas Comerciais
  • © Microsoft 2026