Use cases

Dynamic forwarding of SMS and phone calls

Learn how to use webhooks to control incoming SMS and phone calls, as well as learn how this can be configured using plain JSON.

You can use our API service to control incoming SMS and phone calls that you receive to virtual phone numbers. For example to forward to a regular mobile phone.

Very useful for your main company phone number. Show it on your web site and control what is going to happen when someone calls or sends an SMS text message to the number.

Use sms_url for control over incoming SMS and when it comes to phone calls the right setting to use is voice_start.

You find these for your virtual phone number in our dashboard and the URL you specifiy at either field will receive an HTTP webhook for each incoming SMS or phone call. The JSON reply from your backend can then use forward to forward incoming SMS and connect for connecting phone calls to your selected destination.

Read more in our documentation about these commands.

Is it mandatory to have a backend to do this?

No! It is actually possible to configure static forwarding directly in our dashboard without building your own backend or using a service like Zapier. You do this simply by setting sms_url and voice_start to a JSON string instead of a URL.

For example, if you want to forward/connect to +46766861004:

Configure sms_url to {"forward":"+46766861004"} and then you configure the other field voice_start to {"connect":"+46766861004"}.

For phone calls it is also possible to play an audio message before connecting the call to the selected destination. First upload a WAV- or MP3-file to your web server and then use the following JSON:

{
  "play": "https://46elks.com/download/DummySupportIVR.wav",
  "next": {
    "connect": "+46766861004"
  }
}

For SMS text messages you can prepend your own custom text before the actual received SMS text message so that you know this was sent to your company number.

Do this with the prefix field, like this:

{
  "forward": "+46766861004",
  "prefix": "To my company: "
}

It is possible to use these options directly in the dashboard as well. Simply construct a long text string without any line breaks:

{"forward": "+46766861004", "prefix": "To my company: "}

{"play":"https://yourserver/ljudfil.wav","next":{"connect": "+46766861004"}}

Enjoy these features!

And don't hesistate contacting our support at 076-686 10 04 if you have questions.