SignalWire

The SignalWire modules allow you to watch, create, update, retrieve, and delete the calls, and messages in your SignalWire account.

Getting Started with SignalWire

Prerequisites

  • A SignalWire account

In order to use SignalWire with Make, it is necessary to have a SignalWire account. If you do not have one, you can create a SignalWire account at signalwire.com.

Note

The module dialog fields that are displayed in bold (in the Make scenario, not in this documentation article) are mandatory!

To connect your SignalWire account to Make you need to obtain the API Key from your SignalWire account and insert it in the Create a connection dialog in the Make module.

1. Log in to your SignalWire account.

2. In the left menu, click API > Create a Token.

3. Enter a name for the token, select the permissions, and click Save.

61f279c9711d2.gif

4. Copy the Project ID, Space URL, click Show and copy the token to a safe place.

61f279cca2e0a.png

5. Go toMake and open the SignalWire module's Create a connection dialog.

61f279ce032f2.gif

6. In the Connection name field, enter a name for the connection.

7. In the Space Name, enter your SignalWire account's space name. For example, if your account's space URL is xyz.signalwire.com then your space name is xyz.

8. In the Project ID, and Auth Token fields, enter the project ID and token details copied in step 4, and click Continue.

The connection has been established.

See Setting Up the SignalWire Webhook to add the webhooks in your SignalWire account.

Watch New Calls

Triggers when a new call comes in.

Watch Calls

Triggers when a new call is created.

Search Calls

Searches for calls or lists them all.

Connection

Establish a connection to your SignalWire account.

Start Time Type

Select the call start time option to search the calls:

  • Started At

  • Started Before

  • Started After

Start Time

Enter the date and time to search the calls that were started at the specified time. See the list of supported date and time formats.

End Time

Enter the date and time to search the calls that were ended at the specified time. See the list of supported date and time formats.

From

Select the phone number to search for the calls from the specified number.

To

Select the phone number to search for the calls made to the specified number.

Parent Call SID

Enter the call SID details to search the calls that created the leg of the call.

Status

Select the status of the calls you want to search:

  • The call is ready and waiting in line.

  • The call is ringing.

  • The call was picked and is in progress.

  • The call was terminated when ringing or queued.

  • The call was picked up and terminated with no issues.

  • The call received a busy signal

  • The call was not completed because of failure.

Limit

Set the maximum number of calls Make should return during one scenario execution cycle.

Get a Call

Gets a call by ID.

Connection

Establish a connection to your SignalWire account.

Call SID

Select the Call SID whose details you want to retrieve.

Create a Call

Creates a new call.

Connection

Establish a connection to your SignalWire account.

Call Identifier

Select the option to choose the application from which the call is made from:

  • Application SID

  • Call URL

Application SID

Select or map the application SID used to handle the call. You can create an application SID at Dashboard > LaML > Apps.

ipvc7lkrbd.png

Call URL

Enter the URL address of the call.

From

Enter the phone number from which the call is being made.

To

Enter the phone number to which the call is made.

Caller ID

Enter the Caller ID number in E.164 format or identifier of the caller.

Fallback Method

Select the fallback method for the call. The request to FallbackUrl is a GET or a POST. The default value is POST. Ignore this parameter if ApplicationSid is present.

Fallback URL

Enter the URL address SignalWire will request if any errors occur when fetching the URL. Ignore this parameter if ApplicationSid is present.

Machine Detection

Select whether a human or a machine has picked up the call:

  • Enable

  • Detect Message End

  • None

Machine Detection Timeout

Enter the time in seconds for which SignalWire will wait for machine detection before timing out.

Method

Select whether the request to URL is a GET or a POST. Ignore if ApplicationSid is present.

Record

Select whether to record the call.

Recording Channels

Select the number of recording channels:

  • Mono

  • Dual

Recording Status Callback

Enter the URL address to request when recording is available.

Recording Status Callback Event

Select the recording status for recording callback event:

  • Completed

  • In Progress

  • Absent

Recording Status Callback Method

Select whether the request to RecordingStatusCallback URL is a GET or a POST.

SIP Auth Username

Enter the username to authenticate the caller when making outbound SIP calls.

SIP Auth Password

Enter the password to authenticate the caller when making outbound SIP calls.

Send Digits

The digits to press after a call is connected. Possible values are (0-9), #, *, and w. Each w gives a 0.5-second pause before moving on to the next instruction. It must match pattern, /^([0-9]|#|\*|w)?$/.

Status Callback

Enter the URL address that SignalWire will send webhooks to on every requested StatusCallbackEvent event.

Status Callback Event

The status events that trigger a SignalWire webhook.

Status Callback Method

Select whether the request to StatusCallback URL is a GET or a POST. Ignored if ApplicationSid is present.

Timeout

Enter the time in seconds SignalWire will wait before assuming the call has no answer.

Trim

Select whether leading and trailing silence is trimmed from a recording:

  • Trim Silence

  • Do Not Trim

Update a Call

Updates a call by ID.

Connection

Establish a connection to your SignalWire account.

Call SID

Select or map the call SID whose details you want to update.

Call Identifier

Select the option to choose the application from which the call is made from:

  • Application SID

  • Call URL

Application SID

Select or map the application SID used to handle the call. ou can create an application SID at Dashboard > LaML > Apps.

61f279d07364a.png

Call URL

Enter the URL address of the call.

From

Enter the phone number from which the call is being made.

To

Enter the phone number to which the call is made.

Caller ID

Enter the Caller ID number in E.164 format or identifier of the caller.

Fallback Method

Select the fallback method for the call. The request to FallbackUrl is a GET or a POST. The default value is POST. Ignore this parameter if ApplicationSid is present.

Fallback URL

Enter the URL address SignalWire will request if any errors occur when fetching the URL. Ignore this parameter if ApplicationSid is present.

Machine Detection

Select whether a human or a machine has picked up the call:

  • Enable

  • Detect Message End

  • None

Machine Detection Timeout

Enter the time in seconds for which SignalWire waits for the machine detection before timing out.

Method

Select whether the request to URL is a GET or a POST. Ignore if ApplicationSid is present.

Record

Select whether to record the call.

Recording Channels

Select the number of recording channels:

  • Mono

  • Dual

Recording Status Callback

Enter the URL address to request when recording is available.

Recording Status Callback Event

Select the recording status for recording callback event:

  • Completed

  • In Progress

  • Absent

Recording Status Callback Method

Select whether the request to RecordingStatusCallback URL is a GET or a POST.

SIP Auth Username

Enter the username to authenticate the caller when making outbound SIP calls.

SIP Auth Password

Enter the password to authenticate the caller when making outbound SIP calls.

Send Digits

The digits to press after a call is connected. Possible values are (0-9), #, *, and w. Each w gives a 0.5-second pause before moving on to the next instruction. The pattern must of the /^([0-9]|#|\*|w)?$/.

Status Callback

Enter the URL address that SignalWire will send webhooks to on every requested StatusCallbackEvent event.

Status Callback Event

The status events that trigger a SignalWire webhook.

Status Callback Method

Select whether the request to StatusCallback URL is a GET or a POST. Ignored if ApplicationSid is present.

Timeout

Enter the time in seconds SignalWire will wait before assuming the call has no answer.

Trim

Select whether leading and trailing silence is trimmed from a recording:

  • Trim Silence

  • Do Not Trim

Delete a Call

Deletes a call by ID.

Connection

Establish a connection to your SignalWire account.

Call SID

Select or map the call SID you want to delete.

See Setting Up the SignalWire Webhook to add the webhooks in your SignalWire account.

Watch New Messages

Triggers when a new message comes in.

Webhook Name

Enter a name for the webhook.

Connection

Establish a connection to your SignalWire account.

Watch Messages

Triggers when a new message arrives.

Connection

Establish a connection to your SignalWire account.

Limit

Set the maximum number of messages Make should return during one execution cycle.

Search Messages

Searches for messages or lists them all.

Connection

Establish a connection to your SignalWire account.

Date Sent Type

Select the option for choosing the date. For example, sent at, sent before, sent after.

Date Sent

Enter the date to search the message sent on the specified date.

From

Enter the phone number to search the messages sent to the specified number.

To

Enter the phone number to search the messages sent to the specified number.

Status

Select or map the status of the message you are searching for:

  • Queued

  • Sending

  • Sent

  • Delivered

  • Undelivered

  • Failed

  • Receiving

  • Received

Limit

Set the maximum number of messages Make should return during one execution cycle.

Get a Messages

Gets a message by ID.

Connection

Establish a connection to your SignalWire account.

Message SID

Select or map the message SID whose details you want to retrieve.

Create a Message

Creates a new message.

Connection

Establish a connection to your SignalWire account.

To

Enter the phone number to which you want to send the message.

From

Enter the phone number from which you want to send the message.

Content Type

Select or map the message content-type:

  • Body

  • Media URL

Body

Enter the message text.

Media URL

Enter the URL address of the media you wish to attach and send with the message. For example, image, video.

Application SID

Enter the SID of a SignalWire LaML application used to configure the message's MessageStatusCallback attribute.

Max Price

Enter the maximum price in USD applicable for the message to be sent. Once your message is queued, the cost to send the message is calculated, and if it is greater than MaxPrice, the message will be set as failed and not sent. You will not be charged. If the MaxPrice is not set, all messages will be sent. The price can have a maximum of four decimal places. For example, 0.0075.

Status Callback

Enter an URL address as an endpoint to receive callbacks each time the status of the message changes from queued, failed, sent, delivered, or undelivered.

Validity Period

Enter the number of seconds a message will allow to be queued before canceling. When a sending a high volume of messages, messages can sit in your sending queue. It is not recommended to set a validity period of less than 5 seconds.

Message Service SID

Enter message service SID of a SignalWire number group to be used to automatically choose the best number from the number group to improve deliverability and optimize throughput. If MessagingServiceSid is set, it will take precedence over any value of From.

Clear a Message

Clears the body of the existing message.

Connection

Establish a connection to your SignalWire account.

Message SID

Select or map the message SID you want to clear.

Delete a Message

Deletes a message by ID.

Connection

Establish a connection to your SignalWire account.

Message SID

Select or map the message SID you want to delete.

Make an API Call

Performs an arbitrary authorized API call.

Connection

Establish a connection to your SignalWire account.

URL

Enter a path relative to https://your-space-name.signalwire.com. For example: /api/relay/rest/number_groups

Note

For the list of available endpoints, refer to the SignalWire API Documentation.

Method

Select the HTTP method you want to use:

GET to retrieve information for an entry.

POST to create a new entry.

PUT to update/replace an existing entry.

PATCH to make a partial entry update.

DELETE to delete an entry.

Headers

Enter the desired request headers. You don't have to add authorization headers; we already did that for you.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - List Phone Numbers

The following API call returns all the phone numbers from your SignalWire account:

URL: /api/relay/rest/phone_numbers

Method: GET

61f279d1b68f0.png

Matches of the search can be found in the module's Output under Bundle > Body > data. In our example, 2 phone numbers were returned:

61f279d309d75.png

1. Open any Watch module, establish a connection, click Save, and copy the URL address to your clipboard. Click OK and Save the trigger.

61f279d471393.gif

2. Log in to your SignalWire account.

3. Click Phone Numbers > Edit. Select the webhook option, and the type of call or messages you want to watch.

4. In the ACCEPT INCOMING CALLS AS field, select the option to accept the incoming call as voice calls or fax.

5. In the HANDLE CALLS USING field, choose the webhook you want to add:

Note

We recommend Make users choose the LaML Webhooks option.

  • Relay

  • LaML Webhooks

  • a LaML Application

  • a Dialogflow Agent

  • a SIP Endpoint

  • a Verto/WebRTC Webhook

  • a FreeSwitch Connector

  • an Agora Connector

6. In the Events field, enter the URL address field copied in step 1 for which you want to receive the triggers and click Save.

61f279d76bccc.gif

You have successfully added the webhook to your SignalWire account.

Go to Make and run the scenario to receive triggers when the specified event occurs.