Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Accept call

live().sessions().accept(SessionAcceptParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/live/sessions/{session_id}/accept

Accept an incoming SIP call. Supply session with type live, the model, and startup configuration. Before accepting calls, follow the Live prompting guide to write frontend conversation instructions and a separate backend prompt. SIP media format is negotiated; omit audio.format.

ParametersExpand Collapse
SessionAcceptParams params
Optional<String> sessionId
Session session

Model and startup configuration for the Live session that answers the incoming SIP call.

Accept call

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.live.sessions.SessionAcceptParams;

public final class Main {
    private Main() {}

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

        SessionAcceptParams params = SessionAcceptParams.builder()
            .sessionId("session_id")
            .session(SessionAcceptParams.Session.builder()
                .model(SessionAcceptParams.Session.Model.GPT_LIVE_1)
                .build())
            .build();
        client.live().sessions().accept(params);
    }
}
Returns Examples