By using the Aculab site, you agree with our use of cookies.
right  Talk To Us!

Starting Outbound Services

This describes how to use a web service to start outbound services on Aculab Cloud and how to query for inbound and outbound application status.

An Inbound Service is invoked when a call is made to its telephone number or SIP address.
An Outbound Service is invoked by calling the 'service_start' web service with its Outbound Service Name.

The application status for both inbound and outbound services can be queried using the Application Status web service.

Call prefixes

When specifying telephone numbers and sip addresses Aculab Cloud will treat anything containing only digits, optionally separated by a single '-', as a telephone number and everything else as a SIP address.

One of the following prefixes can be used to declare a specific type of number/address.

Prefix Description Example
tel a telephone or cell (mobile) number tel:441908273800
sip a SIP username@address sip:contact@example.com
loc an inbound service hosted on the same cloud region loc:my_inbound_service
webrtc a WebRTC client identified by the supplied client ID webrtc:clientId
wss a secure websocket URL wss://www.example.com/mywsapp
con a conference room name con:MyConferenceRoom

When using the tel prefix for a call destination, the full international number must be supplied. This must not contain any leading '0'. The leading '+' is optional. The call will be placed with Aculab's default providers. Aculab Cloud does not support calling premium rate numbers via our outbound provider.

 This is a low level API. For information on higher level APIs see the Web Services Language Wrappers
  • Service Start (REST)

    This invokes an outbound service that makes an outbound call and starts an outbound REST application to handle that call.

    Authorisation

    This API uses basic authentication, using a combination of the cloud id, your cloud account username and the name of the service you are starting and this service's outbound password.

    Username : cloudID/username/service_name (e.g. 1-2-0/bob@example.com/MyOutboundService)
    Password : Outbound Service Password

    Request:

    Url:https://ws.aculabcloud.net/service_start
    Methods:GET, POST

    Parameter Value Description
    rest_calls string A JSON formatted string containing either a single object specifying where to call or, for Production and Premium accounts only, a list of these objects. An outbound service will be started for each object.
    outbound_parameters string A legacy alias for rest_calls.
    unique_id string (optional) If supplied this is a unique identifier for a request. This acts to ensure that duplicate requests to the service_start API are idempotent. A duplicate request will return the list of service references previously started by the original request. A duplicate identifier with different parameters will result in an error.

    The JSON objects contain the following parameters:

    Property Required/Optional Description
    to required A string containing the destination for the outbound call. This can be a phone number, SIP address, inbound service address, webRTC client, or conference room name (see Call Prefixes).
    from required only if to is a telephone number A string containing the caller ID (a telephone number or SIP username) for the call. If to is a telephone number, then this needs to be a validated Caller ID).
    token optional A string containing a user-defined token of up to 5000 characters that will be passed transparently to the Web App in the token property of the instance_info argument to the page request.
    outbound_parameters optional A string containing user-defined data that will be passed transparently to the Web App in the this_call.outbound_parameters property of the instance_info argument to the page request.
    extra_sip_headers optional A list of SIP header objects. These represent additional headers to include in the request to initiate the outbound call.

    Returns:

    A JSON array of unique service invocation reference IDs.

    Example:

    https://ws.aculabcloud.net/service_start?rest_calls= [ { "to" : "441908283800", "from" : "441908283801", "token" : "token1", "outbound_parameters" : "some user data" }, { "to" : "sip:bob@acompany.com", "token" : "token2", "extra_sip_headers": [ { "name": "X-AccountInfo", "value": "bob/123456789" } ] } ]

    Response:

      [
        "2e891aea_0.1366641192.77832",
        "2e891aea_0.1366641192.77833"
      ]