SmartCall

Contents

SmartCall is the logical combination between the functionality of ClicktoCall and QuickCall. Based on the phone numbers supplied in the json schema SmartCall will automatically determine if the a-leg should be placed to the device assigned to a user, or routed externally like a more traditional ClicktoCall.

Additionally we also simplified and factored down the required actions to create a call event into a single POST.

If the phone number provided in the extension key is assigned to a callflow and that callflow has a user assigned to it, smartcall will process a call to the devices assigned to that user. If the number is not part of a callflow and is not assigned to the account invoked in the API call than we use the number to invoke the ClicktoCall logic, first by dialing the number supplied in the extension key, and then by calling the number in the contact key, very similar to your standard ClicktoCall method.


Schema

KeyDescriptionTypeDefaultRequired
caller_id_numberExplicitly set caller id numberstring()true
extensionThe extension to connect to when the smartcall is invokedstring()true
nameA friendly name for the click to callstring(1..128)true
outbound_callee_id_nameCallee ID Name of the device calling out to the contact numberstring()true
outbound_callee_id_numberCallee ID Number of the device calling out to the contact numberstring()true
contactNumber of the b-leg party you would like contactedstring()true

Please note: that if the number in the extension key is assigned to a callflow with a user, than the user’s Caller ID details are used, and the outbound_callee_id_name and outbound_callee_id_number keys are ignored.

Create

POST /v2/accounts/{ACCOUNT_ID}/smartcall

This API call will create the whole call action using the JSON DATA Schema noted Above and based on the data provided will connect the caller to the contact supplied.

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:{PORT}/v2/accounts/{ACCOUNT_ID}/smartcall \
    -d '{"data":{"caller_id_number":"15705551212","name":"Bill's Call","outbound_callee_id_name":"Bill Williams","outbound_callee_id_number":"12125551212","contact":"18005551000"}}'
Updated on June 22, 2021

Was this article helpful?

Related Articles