Make outbound calls via SIP trunk.
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Access this API via: client.conversationalAi.sipTrunk/**
* Handle an outbound call via SIP trunk
* @param request - Call configuration with agent, phone numbers
* @param requestOptions - Optional request configuration
* @throws UnprocessableEntityError if request fails
*/
client.conversationalAi.sipTrunk.outboundCall(
request: BodyHandleAnOutboundCallViaSipTrunkV1ConvaiSipTrunkOutboundCallPost,
requestOptions?: RequestOptions
): HttpResponsePromise<SipTrunkOutboundCallResponse>;
interface BodyHandleAnOutboundCallViaSipTrunkV1ConvaiSipTrunkOutboundCallPost {
/** Agent ID to use for the call */
agentId: string;
/** Agent's phone number ID */
agentPhoneNumberId: string;
/** Destination phone number */
toNumber: string;
/** Optional metadata */
metadata?: Record<string, unknown>;
}