Skip to main content

Setting Up a SIP Endpoint

Create a SIP Endpoint

You can create a SIP endpoint manually within your SignalWire Space or programmatically through the Create A SIP Endpoint API.

If you want to create a SIP endpoint in your SignalWire Space, visit the SIP tab and click Create a Sip Endpoint.

A screenshot of the SIP page of a SignalWire Space. The Endpoints tab is selected, and a blue button is labeled 'Create a SIP Endpoint'.

Create a SIP Endpoint

You will need to set a few things; the username you will register your SIP endpoint as, a password to authenticate your endpoint when registering, which SignalWire or verified phone number you would like to show when dialing a PSTN number (if left blank, a random number from your purchased numbers will be chosen), encryption status, an outbound call policy (whether to allow calls to PSTN), and the default codecs/ciphers you would like to use.

You can create a SIP endpoint programmatically by making a POST request to the SIP Endpoint resource. The following request will use default advanced settings.

curl https://your-space.signalwire.com/api/relay/rest/endpoints/sip \
-X POST \
-u 'YourProjectID:YourAuthToken' \
-H 'Content-Type: application/json' \
-d '{
"username" : "c3p0",
"password" : "yavinOrBust",
"caller_id" : "C-3P0"
}'

Register SIP Endpoint to a SignalWire Phone Number

After creating a SIP Endpoint, you can register it to a phone number in the Space for calls to function properly. Navigate to the Phone Numbers tab, click the phone number that you would like to register, and then click Edit Settings button. From here, in the Handle Incoming Calls section, select a SIP Endpoint from the dropdown and choose the SIP endpoint you created.

A screenshot of the edit pane for a phone number in the Phone Numbers tab of a SignalWire Space. The number is titled 'SIP Endpoint' and it is set to accept incoming calls as 'Voice Calls' and handle calls using 'a SIP Endpoint'. The SIP username is indicated in the field labeled 'When a Call Comes In, Forward the Call to'.

Register SIP Endpoint to a SignalWire Phone Number

Click Save, and you are ready to make a call to your SIP endpoint!

Dial a SIP Endpoint Using one of SignalWires Products

SignalWire offers a number of products that are capable of dialing a SIP endpoint.

Instead of setting your phone number to a SIP ENDPOINT underneath the Handle Calls Using section, you can set it to one of the above products to dial your SIP endpoint.

SignalWire offers this capability through the following products:

  • SWML Scripts - A simple markup language written in either JSON or YAML for creating SignalWire applications.
  • Call Flow Builder - A visual tool for creating SignalWire Call applications.
  • Relay Browser Applications - A JavaScript SDK for creating SignalWire applications in the browser utilizing SignalWires WebSocket APIs.
  • Use the dial method to dial a resource address that's linked to a SIP endpoint.
  • Relay Server Applications - A Node.js SDK for creating SignalWire applications on the server utilizing SignalWires WebSocket APIs.
  • CXML Scripts/Applications - Compatible CXML scripts for creating SignalWire applications. Great for users looking to migrate from a TwiML-based application.
  • REST API - A RESTful API for creating SignalWire applications. You can host your own webhook server to use these REST APIs.