0. About

Allows external service connections to SignalWire telecommunications provider via integrations, formerly known as connectors. See the official connector product description for more info.  

Enabled by default in modules.conf.xml for vanilla installations.

Supported services:

1. Capabilities

Enables several valuable functions that will automate configuration and connect services. Without any additional configuration in the FreeSWITCH instance, FreeSWITCH can be connected to SignalWire CLOUD. When doing so the FreeSWITCH configuration will be automagically modified based on what CLOUD services are assembled under the Integration.

2. Components

2.1 mod_signalwire

This is official SignalWire module is part of FreeSWITCH v1.8.3 and later (check Release Notes) and STACK v 20.18.2 which can be obtained from SignalWire STACK repositories. Contact SignalWire Sales (sales@signalwire.com) for more information. mod_signalwire installs as part of the default package and windows installs, and will loaded by default on new installs. See below for installation / loading instructions on existing installations.

2.2 SignalWire CLOUD Resources

The CLOUD APIs and dashboard can be used together to enable a FreeSWITCH Integration for voice. The intuitive dashboard will allow users to create the Integration that is associated with your FreeSWITCH instance. APIs take it to another level and allow for quite a bit of flexibility.

2.3 CLOUD APIs

SignalWire Cloud APIs are defined here: https://docs.signalwire.com/

RELAY APIs can be found here: https://docs.signalwire.com/relay-rest/

2.4 CLOUD Integration UI/UX

Go to Integrations in your SignalWire Dashboard.

3. Connect to SignalWire by creating a new Integration/Connector

You will need to be running at least FreeSWITCH 1.8.3, or STACK 20.18.2 in order to load the SignalWire module.

Summary of the steps below

Step 0. Load mod_signalwire .

Step 1. Get a connection token.

Step 2. Connect your instance to SignalWire (using the Dashboard).

Step 3. OUTBOUND CALLS: set up a purchased phone number to be used with your integration/connector.

Step 4. INCOMING CALLS: associate a connector with a purchased number to handle incoming calls.

If Step 4. is omitted, any calls to the purchased number(s) will disconnect with busy signal.

Step 0. Load mod_signalwire

mod_signalwire is enabled by default on new installations, but to check:

freeswitch@vm> module_exists mod_signalwire
true



  1. Add (or uncomment) the line to your modules.conf.xml configuration file: 

    <load module="mod_signalwire"/>


  2. Use load mod_signalwire on fs_cli

    freeswitch@vm> load mod_signalwire 


Step 1. Get a connection token

Issue the command signalwire token on fs_cli  or, if the module had to be loaded, it is automatically generated by load mod_signalwire .

freeswitch@vm> signalwire token
     _____ _                   ___       ___
    / ___/(_)___ _____  ____ _/ / |     / (_)_______
    \__ \/ / __ `/ __ \/ __ `/ /| | /| / / / ___/ _ \
   ___/ / / /_/ / / / / /_/ / / | |/ |/ / / /  /  __/
  /____/_/\__, /_/ /_/\__,_/_/  |__/|__/_/_/   \___/
         /____/

 /=====================================================================\
| Connection Token: abcdef12-1234-abcd-ef56-abcdef123456               |
 \=====================================================================/
 Go to https://signalwire.com to set up your Connector now!

Step 2. Connect your instance to SignalWire (using the Dashboard)

  1. Click on Integrations, and then to Connect to FreeSwitch

  2. Fill out the form by adding a name and pasting the connection token from Step 1.

Step 3. OUTBOUND CALLS: set up a purchased phone number to be used with your integration/connector

Click on your newly created connector, specify your caller ID, and enter the one of your purchased phone numbers. (I had to copy-paste it for now from Purchased Numbers menu.)

Step 4. INCOMING CALLS: associate a connector with a purchased number to handle incoming calls

Click Edit on the purchased phone number,

and, depending on your use case, choose "Voice Calls" or "Fax" at "HANDLE INCOMING CALLS AS", select "a FreeSwitch Connector" at "HANDLE CALLS USING", and finally, select the connector that you desire.

4. Dialplan sample

    <extension name="SignalWire INTEGRATIONS incoming call">
      <condition field="destination_number" expression="^(\+18005551212)$"> <!-- the number you assigned in your dashboard -->
        <action application="bridge" data="user/1000"/>
      </condition>
    </extension>

    <extension name="signalwire INTEGRATIONS outgoing call">
      <condition field="destination_number" expression="^(\+?\d{11})$">
        <action application="answer"/>
        <action application="bridge" data="sofia/gateway/signalwire/$1"/>
      </condition>
    </extension>

5. Location of mod_signalwire configuration

mod_signalwire configuration settings are saved in memory of the FreeSWITCH instance, but they are also cached in the storage directory, in case it can't connect to SignalWire CLOUD on restart.

To find the storage directory, use one of the following:

$ fs_cli -x 'eval $${db_dir}'


freeswitch@vm> eval $${db_dir}

For vanilla installations, the location is  /var/lib/freeswitch/db/sofia_reg_signalwire.db

Manage Connectors/Integrations

The images still have Connectors on them, but the principles are the same.

Settings & Caller ID

Once the setup is complete, you can now enter the outbound Caller ID for this Integration which DID / Phone Number you would like to send calls as.

Associating Phone Numbers with Integrations

Pricing and Fees


SignalWire Cloud fees are based on what our customers consume. There is no cost associated with the mod_signalwire module itself.

https://signalwire.com/disruptive-pricing

Support


API Documentation

https://docs.signalwire.com/relay-rest


Slack Community

https://slack.signalwire.community


instructions for setting up mod_signalwire on FreeSWITCH and creating a CLOUD Integration (private)

https://freeswitch.org/confluence/display/FREESWITCH/mod_signalwire


Wiki (private)

https://github.com/signalwire/mod_gcloud/wiki