Documentation

voximplant.callback.start

Scope: catalog Permissions to execute: for all

This method is available to the user with granted access permissions for Manage numbers - Edit - Any.

Callback algorithm looks as follows:

    0. Client launches a form on a website and specifies his/her number.

    1. After the form is filled out, a third party application launches the REST API method.

    2. The system executes an inbound call to the line, specified in FROM_LINE parameter, in accordance with settings of the line and waits until connection with manager is established. Inbound follows all the processing rules, i. e. if, for example, call redirecting to mobile phone is enabled on the line - the call will go to the mobile phone.

    3. After a manager answers the phone, the system will voiceover to the manager the text, specified in TEXT_TO_PRONOUNCE parameter, via the voice, specified in the VOICE parameter. It's necessary, so that the manager could identify that this call is a callback and not the usual inbound call.

    4. System makes an outbound call to the number, specified in the TO_NUMBER parameter, and after the client answers the call, the system connects him/her with the manager.

To access this method, the app shall request the Call access permission. The access permission is specified during registration of the application.

Function parameters

ParamaterDescription
FROM_LINE ID of the line, from which the call will be made. The list of accessible lines can be received via the voximplant.line.get method.
TO_NUMBER Number, to which the is made.
TEXT_TO_PRONOUNCE Text that is voiced over to the manager prior to start of the call.
VOICE Voice, with which this text is to be voiced over (optional). List of voices can be retrieved by the voximplant.tts.voices.get method.

Example

BX24.callMethod(
	'voximplant.callback.start',
	{
		"FROM_LINE": "reg1332",
		"TO_NUMBER": "7911xxxxxxx",
		"TEXT_TO_PRONOUNCE": "You have a callback request, connecting with the client now.",
		"VOICE": "ruinternalfemale"
	},
	function(result)
	{
		if(result.error())
			console.error(result.error());
		else
			console.info(result.data());
	}
);


© «Bitrix24», 2001-2024
Up