Skip to main content

Create a SIP Endpoint

POST 

/endpoints/sip

To create a new SIP Endpoint, you send a POST request to the SIP Endpoint resource.

Permissions

The API token must include the following scopes: Voice.

Request

Body

required

    username stringrequired

    String representing the username portion of the endpoint. Must be unique across your project and must not container white space characters or @.

    Example: c3p0
    password stringrequired

    A password to authenticate registrations to this endpoint.

    Example: yavinOrBust
    caller_id string

    Friendly Caller ID used as the CNAM when dialing a phone number or the From when dialing another SIP Endpoint.

    Example: C-3P0
    send_as string

    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.

    Defaults to the project's SIP Settings default send as number.

    Example: random
    ciphers string[]

    A list of encryption ciphers this endpoint will support.

    Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32.

    Defaults to the project's SIP Settings default cipher list. You can unset the custom cipher list and use the project's SIP Settings default cipher list by sending an empty array.

    Example: ["AEAD_AES_256_GCM_8","AES_256_CM_HMAC_SHA1_80","AES_CM_128_HMAC_SHA1_80","AES_256_CM_HMAC_SHA1_32","AES_CM_128_HMAC_SHA1_32"]
    codecs string[]

    A list of codecs this endpoint will support.

    Currently supported values are: OPUS, G722, PCMU, PCMA, VP8, H264.

    Defaults to the project's SIP Settings default codec list. You can unset the custom codec list and use the project's SIP Settings default codec list by sending an empty array.

    Example: ["OPUS","G722","PCMU","PCMA","VP8","H264"]
    encryption string

    A string representing whether connections to this endpoint require encryption or if encryption is optional. Encryption will always be used if possible.

    Possible values are default, required, optional.

    Defaults to the project's SIP Settings default.

    Example: required
    call_handler string

    What type of handler you want to run on inbound calls. Possible values are: relay_context, relay_topic, relay_script, laml_webhooks, laml_application, dialogflow, video_room.

    Example: ai_agent
    call_request_url string

    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.

    Example: null
    call_request_method string

    A string representing the HTTP method to use with call_request_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_fallback_url string

    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.

    Example: null
    call_fallback_method string

    A string representing the HTTP method to use with call_fallback_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_status_callback_url string

    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.

    Example: null
    call_status_callback_method string

    A string representing the HTTP method to use with call_status_callback_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_laml_application_id string

    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.

    Example:
    call_relay_topic string

    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. Alias of call_relay_application. If both are sent, call_relay_application takes precedence.

    Example: office
    call_relay_topic_status_callback_url string

    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.

    Example: https://myapplication/handle_relay_callbacks
    call_relay_context string

    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. Alias of call_relay_application. If both are sent, call_relay_application takes precedence.

    Example: office
    call_relay_context_status_callback_url string

    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.

    Example: https://myapplication/handle_relay_callbacks
    call_video_room_id 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.

    Example:
    call_flow_id uuid

    A string representing the ID of the Call Flow to forward incoming calls to. This is only used (and required) when call_handler is set to call_flow.

    Example:
    call_ai_agent_id uuid

    A string representing the ID of the Ai Agent to forward incoming calls to. This is only used (and required) when call_handler is set to ai_agent.

    Example:
    call_relay_script_url string

    A string representing a URL of a SWML script to response incoming calls. This is only used (and required) when call_handler is set to relay_script.

    Example: https://dev.signalwire.com/relay-bins/f9d13f68-f71e-4042-95bb-b07b9e2f2f92

Responses

CREATED

Schema

    id string

    The unique identifier of the SIP Endpoint on SignalWire. This can be used to update or delete the endpoint programmatically.

    Example: 67075301-69b2-4fc3-8a2c-c95a69a5665e
    username stringrequired

    String representing the username portion of the endpoint. Must be unique across your project and must not container white space characters or @.

    Example: c3p0
    caller_id string

    Friendly Caller ID used as the CNAM when dialing a phone number or the From when dialing another SIP Endpoint.

    Example: C-3P0
    send_as string

    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.

    Defaults to the project's SIP Settings default send as number.

    Example: random
    ciphers string[]

    A list of encryption ciphers this endpoint will support.

    Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32.

    Defaults to the project's SIP Settings default cipher list. You can unset the custom cipher list and use the project's SIP Settings default cipher list by sending an empty array.

    Example: ["AEAD_AES_256_GCM_8","AES_256_CM_HMAC_SHA1_80","AES_CM_128_HMAC_SHA1_80","AES_256_CM_HMAC_SHA1_32","AES_CM_128_HMAC_SHA1_32"]
    codecs string[]

    A list of codecs this endpoint will support.

    Currently supported values are: OPUS, G722, PCMU, PCMA, VP8, H264.

    Defaults to the project's SIP Settings default codec list. You can unset the custom codec list and use the project's SIP Settings default codec list by sending an empty array.

    Example: ["OPUS","G722","PCMU","PCMA","VP8","H264"]
    encryption string

    A string representing whether connections to this endpoint require encryption or if encryption is optional. Encryption will always be used if possible.

    Possible values are default, required, optional.

    Defaults to the project's SIP Settings default.

    Example: required
    call_handler string

    What type of handler you want to run on inbound calls. Possible values are: relay_context, relay_topic, relay_script, laml_webhooks, laml_application, dialogflow, video_room.

    Example: ai_agent
    call_request_url string

    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.

    Example: null
    call_request_method string

    A string representing the HTTP method to use with call_request_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_fallback_url string

    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.

    Example: null
    call_fallback_method string

    A string representing the HTTP method to use with call_fallback_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_status_callback_url string

    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.

    Example: null
    call_status_callback_method string

    A string representing the HTTP method to use with call_status_callback_url. Valid values are GET and POST. This is only used (and required) when call_handler is set to laml_webhooks.

    Example: POST
    call_laml_application_id string

    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.

    Example:
    call_relay_topic string

    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. Alias of call_relay_application. If both are sent, call_relay_application takes precedence.

    Example: office
    call_relay_topic_status_callback_url string

    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.

    Example: https://myapplication/handle_relay_callbacks
    call_relay_context string

    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. Alias of call_relay_application. If both are sent, call_relay_application takes precedence.

    Example: office
    call_relay_context_status_callback_url string

    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.

    Example: https://myapplication/handle_relay_callbacks
    call_video_room_id 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.

    Example:
    call_flow_id uuid

    A string representing the ID of the Call Flow to forward incoming calls to. This is only used (and required) when call_handler is set to call_flow.

    Example:
    call_ai_agent_id uuid

    A string representing the ID of the Ai Agent to forward incoming calls to. This is only used (and required) when call_handler is set to ai_agent.

    Example:
    call_relay_script_url string

    A string representing a URL of a SWML script to response incoming calls. This is only used (and required) when call_handler is set to relay_script.

    Example: https://dev.signalwire.com/relay-bins/f9d13f68-f71e-4042-95bb-b07b9e2f2f92