Setting up SMS Web Service

If you need to set up a custom web service for SMS in Groudwire, select Settings > Accounts > a desired account > Advanced Settings > Web Services, and then enter the URL in the Custom SMS Sender section.

Groudwire is hardcoded with Short Message Service (SMS) service for certain SIP and VoIP providers. However, for providers not covered or if you want to override the hardcoded setup, you need to set up your own web service to enable SMS functionality.

Note

This section applies to Groundwire only.

For the Cloud Softphone project owners, include the web service URL in the Provisioning options when building your softphone application on the Cloud Softphone portal.

  1. Toggle the SIMPLE switch to enable, if disabled.
    • Android devices - Select Android Settings icon > Settings > Accounts > the desired SIP account > Advanced Settings > SIMPLE.

    • iOS devices - Open the Keypad tab, select iOS Setting icon > SIP Accounts or Accounts > the desired SIP account > Advanced Settings > SIMPLE.

  2. To open the Web Services screen:

    • Android devices - Select Android Settings icon > Settings > Accounts > the desired SIP account > Advanced Settings > Web Services.

    • iOS devices - Open the Keypad tab, select iOS Setting icon > SIP Accounts or Accounts > the desired SIP account > Advanced Settings > Web Services.

  3. Go to the Custom SMS Sender section, and enter the URL of your web service.
    Use either the GET or POST method to send parameters to your web service:
    • To use the GET method, enter the parameters in the query string.
    • To use the POST method, enter your parameters in the POST field.
  4. Select a check icon or Done.

Parameters Considerations

Here are some requirements for the URL of your web service:

  • Use dynamic parameters in the URL query string or POST data.
    For example, %sms_to% is replaced by the destination phone number, and %sms_body% is replaced by the text of the message.
  • Use account-specific parameters. 
    For example, %account[username]% is replaced by the actual username, and %account[password]% is replaced by the actual password.
Important: The password can only be passed when using a secure protocol, such as the URL begins with https://. Or else, asterisks (*) are used as a placeholder, which is not working. As an alternative to insecure protocols, pass the SHA-1 hash of your password using the syntax %sha1(%account[password]%)%.

Example URLs for Web Callbacks Using GET

  • Secure protocol:
https://my.web.com/sms.php?u=%account[username]%&p=%account[password]%&msg=%sms_body%&to=%sms_to%&from=%account[userCallerId]%
  • Insecure protocol:
http://my.web.com/sms.php?u=%account[username]%&p=%sha1(%account[password]%)%&msg=%sms_body%&to=%sms_to%&from=%account[userCallerId]%
  • Or, simply:
https://my.web.com/sms.php?u=johndoe%&p=secret&msg=%sms_body%&to=%sms_to%from=1800123456%

Return Format

The return format for the SMS sender is a simple XML. The <response> elements indicate the success or failure of the SMS-sending process.

Examples:

  •  Successful:
<response>

<error>0</error>

  <description>Success</description>

</response>
  • Error:
<response>

  <error>400</error>

  <description>Invalid parameters</description>

</response>

Note

Refer to doc.acrobits.net/api/client/send_message.html for more information.