Note that the use of webcall interface v2 needs to Interface authentication

1.Interface Introduction

The third-party system initiates an outbound call by sending an HTTP POST request, and sends the call to the specified process. In this process, customers can implement a series of functions such as voice broadcast, access to agents, two-way callback, and private calls.

2.Interface request

  • HTTP request method:POST

  • Request url:{HOST}/v20160818/webCall/webCall/ACCOUNTID?sig=SIG

  • When requesting, please replace {HOST} with connection data queryDomain name,ACCOUNTID is replaced with the account number, SIG is generated according to the authentication rules, please see the authentication document to see the specific generation rules.

  • Authentication method: Interface Authentication

  • Request frequency limit: 200 times / minute

3.The interface parameters are as follows: (red is a required parameter)

parameter name description
Action Webcall(stable)
ServiceNo Virtual service number provided by C7 Malaysia Technology. Each type corresponds to a fixed service number. The default number is 0102527.
Exten Called phone number (Exten is the calling number in the two-way callback scenario, and the phoneNum passed in the custom parameter is the called number)
WebCallType The type of interface that calls WebCall (synchronous and asynchronous). When passing this value, an asynchronous interface is used. For example: WebCallType = asynchronous
CallBackUrl Need to pass parameters when calling asynchronous, callback address, for example:CallBackUrl=https://www.google.com/
CallBackType Callback method get or post, for example: CallBackType = post (default is get)
Variable Custom variables negotiated with C7 Malaysia Technology are passed as key-value pairs through this field. Multiple variables are separated by commas, such as var1: value1, var2: value2. Common business scenarios: Voice transmission scenarios: Variable = text: "Mr. Zhang, hello", C7 Malaysia can directly broadcast the corresponding content of text. In private calls and two-way call back scenarios, Variable = phoneNum: "183xxxxxxxx" , C7 Malaysia can directly use the value of phoneNum as the called number to dial
ActionID The unique identifier of the calling interface, this field will be returned in response. In the external event push, the secondary field is pushed, but the parameter name is: WebcallActionID. This parameter cannot pass duplicate values, it must be unique
Timeout This field is used to control the called time of the incoming number in Exten. The length of the interface call called unit is second. The value ranges from 20 to 60, and the duration includes the time period for the called party to start ringing after the interface is called. If the called party responds, the interface returns immediately. If the called party does not answer, the interface does not return until the timeout period. (This field is optional. The default timeout period is 20 seconds.)
MaxCallTime (This field is only for two-way callback scenarios.) This field is used to set the maximum call duration in two-way callback scenarios. The timing starts when both parties are connected, and the time is automatically cut off. The unit is second. (This field is not required, you only need to control the call duration. For example: MaxCallTime: 60)
ChatingIvrPrompt (This field is only for two-way call back scenarios.) During two-way call back, the two parties play prompt IVR. Generally used in conjunction with the MaxCallTime field to indicate how long the call duration is left between the caller and the caller.
Field value example: second-service number-variable

Precautions:

a.Timed reminders can be configured with multiple reminders, separated by semicolons in English.

b.Multiple reminders can be passed each time. Multiple variables are separated by commas. Examples of variables are var1: value1, var2: value2 ……. Variables do not need to be reported in the IVR process.

c.In C7 Malaysia system, the starting point of an IVR process is the service number. Before playing the IVR process, please add the service number process in the call configuration in advance.

d.Asynchronous callback post method, push parameter is json string

Example of a real scenario: The call between two parties is required to be 60 seconds, and a reminder voice is played at 30 and 50 seconds after the call starts.

MaxCallTime=60&ChatingIvrPrompt=30-01056332288-notice:30;50-01056332288

4.The system returns:

Detailed description of the return value of the synchronization interface:

If the interface is a synchronous interface, the response will not return until the called number responds. The default timeout time is 20 seconds (can be set by the parameter Timeout).

The response returned by the interface is a json format string containing the following fields:

parameter name value Description
Command Response Fixed value
Response WebCall Fixed value
ActionID random number Same as the ActionID passed when calling the interface. If no ActionID is passed when calling the interface, the value is Webcall + random number.
Succeed true/false Whether the interface call was successful.
Message number a)Message:4 The callee has answered
b)Message:0 or 8 line is busy / abnormal (in some cases, it may also be called by the called party to be rejected / ringing missed / busy / off / idling)
c)Message:3 Callee rejected / ring missed / busy / shutdown / idle
d)Message:5 Generally, the balance is insufficient. Please check the account fees first. (In a few cases, it may be an abnormal line)

Common errors:

message return value meaning
500 Server error Server error, please contact after sales
502 Account cc product not found Account is not open for cloud customer service products
401 PBX not found Call server not found
505 Service no can not fond Service number not found
416 dialoutLine didnum id disable Service number does not exist, please contact business colleagues to view service number
415 call is limit Concurrency restrictions, please contact business colleagues
501 Account not found Account number passed incorrectly, please check that ACCOUNTID passed correctly

[Note]: Affected by the environment of American communication network, because the webcall service passes through multiple layers of routing, the meaning of the message encoding has no practical meaning, and it may have a different meaning in one or more layers . So you only need to pay attention to 4 is answering, others are not answering.

5.Response example:


{"Command":"Response","Succeed":true,"Message":"4",
"ActionID":"Webcall1382293010856915711","Response":"Webcall"}

Detailed explanation of the asynchronous interface return value:

If the interface is asynchronous, after the response returns immediately, the corresponding interface will be pushed after the called number responds (see Asynchronous Calls for details).

The response returned by the interface is a json format string containing the following fields:

parameter name value Description
Command Response Fixed value
Response WebCall Fixed value
ActionID random number The random number is the same as the ActionID passed when calling the interface. If no ActionID is passed when calling the interface, the value is Webcall + random number. 【 Note that the ActionID must be unique, otherwise it will affect the return of WebcallActionID in external event push
Succeed true/false Whether the interface call was successful.
Response example:

{"Command":"Response","Succeed":true,"ActionID":"Webcall1382293010856915711",
"Response":"Webcall"}

Asynchronous call:

url:https://www.google.com/callback
1.get example: Interface example:https://www.google.com/callback?actionid=Webcall1382293010856915711&Message=4
2.post example: "{"actionid":"abcdefg","Message":"3"}"

parameter name value Description
Message number Message:4 The callee has answered
b)Message:0或8 The line is busy / abnormal (in some cases, it may also be called by the called party to be rejected / ringing missed / busy / off / idling)
c)Message:3 Callee rejected / ring missed / busy / shutdown / idle
d)Message:5 Generally, the balance is insufficient. Please check the account fees first. (In a few cases, it may be an abnormal line)