Child pages
  • Service - Click-to-call(en)
Skip to end of metadata
Go to start of metadata


This API make a call between an Endpoint/Extension and a Destination phone number.

Diagram Operation

You can Integrate the Click-to-Call API using our Cloud Services as well as your own Asterisk based PBX with our local connector installed.

Cloud Integration

This integration is the better way when you have a Cloud System and/or have no access to your PBX IP Address or just don't want open it to the internet.

Primary Server

Secondary Server

Integração Local

When you have a local network and a single system, maybe you prefer point your API to the local PBX IP Address.

Your Local Asterisk PBX


Endpoint to this Request

/callMake a new call


The Authentication is through your TOKEN. If you is not a Q-Manager user yet, you can get yours with our Customer Success Team.

Yu can send the token on the Request in two different ways: in the Body as a key of the JSON object or in the Header.

In the Body you will send as a key/value like other parameters. The special key name for the it is token:

	"token": String,


In the Header as an Authorization:

Authorization: Bearer YOUR_TOKEN



The Request can be POST, as an JSON Object in the Body, or GET, with url parameters.

For the POST Request you need keep the content-type Header set to application/json.


The parameters are:

POST /call HTTP/1.1
Authorization: Bearer YourTokenComesHere
Accept: application/json
User-Agent: Http/2.2
	"token": String,
	"from": String,
	"to": Number,
	"timeout": Number(seconds)(optional),
	"force_from": (yes|no)(optional),
	"returnurl": String(optional)


Method POST with the Token in BODY:

curl -H "content-type: application/json" -d '{"token":"5d104f0c46bd400cca89818333eff3b3","from":"1105","to":"4899991010"}'

Method POST with Token in HEADER:

curl -H "content-type: application/json" -H "Authorization: Bearer 5d104f0c46bd400cca89818333eff3b3" -d '{"from":"1105","to":"4899991010"}'


Method GET:

curl -d 'token=5d104f0c46bd400cca89818333eff3b3&from=1105&to=4899991010'




The API address. In case you have a SNEP Server installed into your company, you need to do a Register into Opens Cloud enabling this service.

fromStringrequiredThe Agent Code ou Extension that are requesting the call.
toStringrequiredNumber to be called.
returnurlStringoptionalCallback URL to get back the call status. After the hangup the system will return it status in JSON format in the Body of the request using POST method.
timeoutInt(in seconds)optionalThis parameter indicate the time to try to connect with the number from, by default this time is 12 seconds. If the number from don't get the call, the API will return a event called lost-call to the callback url (returnurl).
force_fromyes | nooptional

By default the call is realized differentiating a manual call from the click-to-call call adding 0000 prefix on the from key, changing the source of the call inside the asterisk to 0000XXXX, where XXXX is the original caller.

This parameter fix the source of request to the exact number, not adding 0000 as prefix.


Request Reply

	"message":"Call in Progress",


Call Status Reply

If you informed the returnurl parameter, you will receive a API reply in the end of the call, like this:

	"mainchannel":"Local/[email protected]",




 The Event type. In this case, "hangup", the call end.


The source for this call. In this case, "click-to-call", made from other system.
callidUnique ID for the call. Used for call status and billing.
uniqueidInternal ID for the main channel for this call.
linkedidInternal ID for the linked channel for this call.
audio_fileAudio filename for the recorded call.


URL for the Audio Filename. This path need be completed by audio_url + audio_file
billsecConversation time for the call (in seconds).


Call duration time (in seconds).


Destination data


The Caller data


The caller endpoint/extention.
callflowThe complete call flow inside of the PBX
hangupdateEnd call Date and time