Redirecting the calls into your CRM-system

If the CRM system allows taking the calls within it — set up the call routing using webhooks. Once installed, the call routing via webhooks enables Ringostat to send HTTP(S)-requests to a CRM system and get a phone number or a SIP login as a reply. Then the system redirects the call to this location. At the end of the path, the agent can answer the incoming call right in the CRM-system account.

The call parameters come in three ways:

  • HTTP(S) titles;

  • JSON-format;

  • JSON-RPC.

First, create the scheme and set the name for it. Then click on the “Edit” button and enter the following details:

  • URL;

  • HTTP request method;

  • Data submission type;

  • Data import type;

  • Name in response for destination (for JSON);

  • JSON-RPC method — required if you JSON-RPC type in the "Data import type*";

  • A timeout of the call to a forwarding phone number, in seconds;

URL is an address of your CRM system or another source to which you will send the request for the call direction information.

There are several sending methods you can use:

  • GET;

  • POST;

  • PUT;

  • DELETE.

Please note: use the method your CRM system or the source requires.

For the Data submission type and Data import type, enter HTTP(S)- or JSON-types.

Please note: the system automatically sets POST as a sending method for the JSON format.

In the Name in response field for the destination (for JSON), enter the name of the location parameter. The call will be redirected to this location according to this parameter and its value.

Set the max timeout for waiting for a response from our server (in seconds).

Add Webhook parameters according to the CRM-system configurations and save.

Example of request: method — POST, data type — JSON URL

POST /api/addnumber/ HTTP/1.1
Host: api.asterisk
Origin: api.asterisk
User-Agent: ringostat HTTP Client v1.1
Content-Type: application/json
Content-Length: 128
Connection: close
{"call_id":"pkv","step_forward":"webhookNumber%3A120","uuid":"842d921d-5334-4eca-812d-9a478dc8c884","google_id":"UA-38222689-2"}

Examples of response JSON type:

HTTP/1.1 200 OK
Server: nginx/1.6.3
Date: Wed, 09 Dec 2015 14:47:44 GMT
Content-Type: application/json
Content-Length: 25
Connection: close
X-Powered-By: PHP/5.5.29
Set-Cookie: PHPSESSID=olhduanaf84n192tmnbg6iea94; path=/
Pragma: no-cache
Expires: 0
Cache-Control: must-revalidate
{"number_01":"3 80123456789"}

Examples of response HTTP type:

HTTP/1.1 200 OK
Server: nginx/1.6.3
Date: Wed, 09 Dec 2015 14:34:46 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 9
Connection: close
X-Powered-By: PHP/5.5.29
Set-Cookie: PHPSESSID=b3f9mfs1eg3bkflrbprqk4qmd5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
380123456789
Did this answer your question?