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.
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.
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
orYAML
for creating SignalWire applications.- Use the
connect
method to connect a call to a sip endpoint
- Use the
- Call Flow Builder - A visual tool for creating SignalWire Call applications.
- Use the
Forward to Phone
node to connect a call to a sip endpoint
- Use the
- 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.
- Use the
connectSip
method to connect an existing call to a sip endpoint. - Use the
dialSip
method to create a new call to a sip endpoint.
- Use the
- CXML Scripts/Applications - Compatible CXML scripts for creating SignalWire applications.
Great for users looking to migrate from a TwiML-based application.
- Use the
Sip
noun to dial a SIP endpoint from an XML Bin.
- Use the
- REST API - A RESTful API for creating SignalWire applications. You can host your own webhook server to
use these REST APIs.
- SignalWire REST API to create a call to your SIP endpoint.
- Compatibility REST API to create a call to your SIP endpoint.