import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import type * as Agora from "../../../index.js"; export declare namespace TelephonyClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Operations for telephony and outbound calling */ export declare class TelephonyClient { protected readonly _options: TelephonyClient.Options; constructor(options: TelephonyClient.Options); /** * Query historical call records for a specified appid based on the filter criteria. * * @param {Agora.ListTelephonyRequest} request * @param {TelephonyClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.telephony.list({ * appid: "appid" * }) */ list(request: Agora.ListTelephonyRequest, requestOptions?: TelephonyClient.RequestOptions): Promise>; /** * Initiate an outbound call to a specified number and create an agent to join the specified RTC channel. * * Use this endpoint to initiate an outbound call to the specified number and create an agent that joins the target RTC channel. The agent waits for the callee to answer. * * @param {Agora.CallTelephonyRequest} request * @param {TelephonyClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.telephony.call({ * appid: "appid", * name: "customer_service", * sip: { * to_number: "+19876543210", * from_number: "+11234567890", * rtc_uid: "100", * rtc_token: "" * }, * pipeline_id: "fzufjlweixxxxnlp", * properties: { * channel: "", * token: "", * agent_rtc_uid: "111", * remote_rtc_uids: ["100"] * } * }) * * @example * await client.telephony.call({ * appid: "appid", * name: "customer_service", * sip: { * to_number: "+19876543210", * from_number: "+11234567890", * rtc_uid: "100", * rtc_token: "" * }, * properties: { * channel: "", * token: "", * agent_rtc_uid: "111", * remote_rtc_uids: ["100"], * idle_timeout: 120, * llm: { * "url": "https://api.openai.com/v1/chat/completions", * "api_key": "", * "system_messages": [ * { * "role": "system", * "content": "You are a helpful chatbot." * } * ], * "max_history": 32, * "greeting_message": "Hello, how can I assist you today?", * "failure_message": "Please hold on a second.", * "params": { * "model": "gpt-4o-mini" * } * }, * tts: { * "vendor": "microsoft", * "params": { * "key": "", * "region": "eastus", * "voice_name": "en-US-AndrewMultilingualNeural" * } * }, * asr: { * "language": "en-US" * } * } * }) */ call(request: Agora.CallTelephonyRequest, requestOptions?: TelephonyClient.RequestOptions): core.HttpResponsePromise; private __call; /** * Retrieve the call status and related information of a specified agent. * * @param {Agora.GetTelephonyRequest} request * @param {TelephonyClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.telephony.get({ * appid: "appid", * agent_id: "agent_id" * }) */ get(request: Agora.GetTelephonyRequest, requestOptions?: TelephonyClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Instruct the agent to proactively hang up the ongoing call and leave the RTC channel. * * @param {Agora.HangupTelephonyRequest} request * @param {TelephonyClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.telephony.hangup({ * appid: "appid", * agent_id: "agent_id" * }) */ hangup(request: Agora.HangupTelephonyRequest, requestOptions?: TelephonyClient.RequestOptions): core.HttpResponsePromise; private __hangup; protected _getAuthorizationHeader(): Promise; protected _getCustomAuthorizationHeaders(): Promise>; }