get

View as MarkdownOpen in Claude

Retrieve a single SIP endpoint resource.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the SIP endpoint.

Response

typestringRequired
A string representation of the type of object this record is.
idstringRequiredformat: "uuid"
The unique identifier of the SIP endpoint.
usernamestringRequired
The username for the SIP endpoint.
caller_idstring or nullRequired
Friendly Caller ID used as the CNAM when dialing a phone number or the From when dialing another SIP Endpoint.
send_asstringRequired
When dialing a PSTN phone number, you must send it From a number you have purchased or verified. send_as indicates which number this endpoint has set as its origination. random indicates it will randomly choose a purchased or verified number from within the project.
cipherslist of stringsRequired
A list of encryption ciphers this endpoint will support.
codecslist of stringsRequired
A list of codecs this endpoint will support.
encryptionenumRequired
Whether connections to this endpoint require encryption or if encryption is optional.
call_handlerenum or nullRequired
What type of handler you want to run on inbound calls.
calling_handler_resource_idstring or nullRequiredformat: "uuid"
The unique identifier of the calling handler resource.
call_request_urlstring or nullRequired
A string representing the LaML URL to access when a call is received. This is only used (and required) when call_handler is set to laml_webhooks.
call_request_methodenum or nullRequired
A string representing the HTTP method to use with call_request_url. Valid values are GET and POST.
call_fallback_urlstring or nullRequired
A string representing the LaML URL to access when the call to call_request_url fails. This is only used (and required) when call_handler is set to laml_webhooks.
call_fallback_methodenum or nullRequired
A string representing the HTTP method to use with call_fallback_url. Valid values are GET and POST.
call_status_callback_urlstring or nullRequired
A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to laml_webhooks.
call_status_callback_methodenum or nullRequired
A string representing the HTTP method to use with call_status_callback_url. Valid values are GET and POST.
call_laml_application_idstring or nullRequired
A string representing the ID of the LaML application to forward incoming calls to. This is only used (and required) when call_handler is set to laml_application.
call_dialogflow_agent_idstring or nullRequired
A string representing the ID of the Dialogflow agent to forward incoming calls to. This is only used (and required) when call_handler is set to dialogflow.
call_relay_topicstring or nullRequired
A string representing the Relay topic to forward incoming calls to. This is only used (and required) when call_handler is set to relay_topic.
call_relay_topic_status_callback_urlstring or nullRequired
A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_topic.
call_relay_contextstring or nullRequired
A string representing the Relay context to forward incoming calls to. This is only used (and required) when call_handler is set to relay_context.
call_relay_context_status_callback_urlstring or nullRequired
A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_context.
call_relay_applicationstring or nullRequired
A string representing the Relay application to forward incoming calls to. This is only used (and required) when call_handler is set to relay_application.
call_video_room_idstring or nullRequiredformat: "uuid"
A string representing the ID of the Video Room to forward incoming calls to. This is only used (and required) when call_handler is set to video_room.
call_relay_script_urlstring or nullRequired
A string representing a URL of a SWML script to respond to incoming calls. This is only used (and required) when call_handler is set to relay_script.

Response Example

Response
{
"type": "sip_endpoint",
"id": "67075301-69b2-4fc3-8a2c-c95a69a5665e",
"username": "c3p0",
"caller_id": "C-3P0",
"send_as": "random",
"ciphers": [
"string"
],
"codecs": [
"string"
],
"encryption": "required",
"call_handler": "ai_agent",
"calling_handler_resource_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6",
"call_request_url": "string",
"call_request_method": "POST",
"call_fallback_url": "string",
"call_fallback_method": "POST",
"call_status_callback_url": "string",
"call_status_callback_method": "POST",
"call_laml_application_id": "string",
"call_dialogflow_agent_id": "string",
"call_relay_topic": "office",
"call_relay_topic_status_callback_url": "https://myapplication/handle_relay_callbacks",
"call_relay_context": "string",
"call_relay_context_status_callback_url": "https://myapplication/handle_relay_callbacks",
"call_relay_application": "string",
"call_video_room_id": "string",
"call_relay_script_url": "https://dev.signalwire.com/relay-bins/f9d13f68-f71e-4042-95bb-b07b9e2f2f92"
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com",
});
const endpoint = await client.fabric.sipEndpoints.get("endpoint-id");
console.log(`Sip Endpoint: ${endpoint.name}, ID: ${endpoint.id}`);