Zu Hauptinhalt wechseln

Dieser Browser wird nicht mehr unterstützt.

Führen Sie ein Upgrade auf Microsoft Edge durch, um die neuesten Features, Sicherheitsupdates und den technischen Support zu nutzen.

Microsoft Edge herunterladen Weitere Informationen zu Internet Explorer und Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Realtime

Transfer a SIP call

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

Transfers an active SIP call to a new destination using the SIP REFER verb.

Pfadparameter

call_id string Erforderlich

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

Anforderungstext

Destination URI for the REFER request.

Content-Type: application/json
target_uri string Erforderlich

URI that should appear in the SIP Refer-To header. Supports values like tel:+14155550123 or sip:agent\@example.com.

Antworten

The request has succeeded.

Client error

Text

Content-Type: application/json
error OpenAI.Error Erforderlich
code string | null Erforderlich
message string Erforderlich
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Eines der folgenden Elemente:
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 Erforderlich

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

Text

Content-Type: application/json
error OpenAI.Error Erforderlich
code string | null Erforderlich
message string Erforderlich
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Eines der folgenden Elemente:
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 Erforderlich

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.

Anfordern

curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target_uri": "tel:+14155550123"}'
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.refer('call_id', { target_uri: 'tel:+14155550123' });
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.refer(
    call_id="call_id",
    target_uri="tel:+14155550123",
)
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())
    }
}
package com.openai.example;

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

public final class Main {
    private Main() {}

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

        CallReferParams params = CallReferParams.builder()
            .callId("call_id")
            .targetUri("tel:+14155550123")
            .build();
        client.realtime().calls().refer(params);
    }
}
require "openai"

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

result = openai.realtime.calls.refer("call_id", target_uri: "tel:+14155550123")

puts(result)
de-de
Ihre Datenschutzoptionen
  • KI-Haftungsausschluss
  • Frühere Versionen
  • Blog
  • Mitwirken
  • Datenschutz
  • Consumer Health Privacy
  • Nutzungsbedingungen
  • Impressum
  • Marken
  • © Microsoft 2026