Inhaltsverzeichnis

 [hide

Click-to-Call API

Click-to-call allows you to create URLs that can be POSTed to with a phone number or SIP URI and create a phone call from the provided contact information to a destination you have pre-determined.

URI

v1/accounts/{account_id}/clicktocall

or

v2/accounts/{account_id}/clicktocall

Resource Parameters

PropertyDescriptionValidationModifiableRequired
nameHuman-friendly name to help identify a particular click-to-callnon_empty_string()yesyes
extensionThe number or user to call when this click-to-call is activatedSIP URI or DID or Internal Extensionyesyes
realmThe SIP realm the extension belongs to (defaults to the current account’s)FQDN or IPyes
auth_requiredDoes activating the click-to-call require an authenticated user?If false (the default), authentication is bypassed for the activation request (useful for embedding a form on a public-facing website)boolean()yes
whitelistList of regular expressions that a provided number from the end user mustmatch before the origination will proceed[] (defaults to [])yes
throttleNumber of active requests allowed for this click-to-call, 0 for no limit (default)integer()yes

 

Operations

Resource Parameters

VerbAcceptedReturnedDescription
GET id, name, extension, realmFetches a summary of click-to-calls
PUTANYALLCreate a new click-to-call

 

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 415, 500, 503, 504


Click-to-call

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}

 

Resource Parameters

PropertyDescriptionValidationModifiableRequired
nameHuman-friendly name to help identify a particular click-to-callnon_empty_string()yesyes
extensionThe number or user to call when this click-to-call is activatedSIP URI or DID or Internal Extensionyesyes
realmThe SIP realm the extension belongs to (defaults to the current account’s)FQDN or IPyes
auth_requiredDoes activating the click-to-call require an authenticated user?If false, authentication is bypassed for the activation request (useful for embedding a form on a public-facing website)boolean()yes
whitelistList of regular expressions that a provided number from the end user mustmatch before the origination will proceed[] (defaults to [])yes
throttleNumber of active requests allowed for this click-to-call, 0 for no limit (default)integer()yes
history_itemsNumber of history items storedinteger()no

 

Operations

VerbAcceptedReturnedDescription
GET ALLFetch the details of a click-to-call
POSTANYALLUpdate the parameters of a click-to-call
DELETE  Delete a click-to-call

 

Response Codes

Normal Response Code(s): 200, 201

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504 Activating a Click-to-call

 

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}/connect

Resource Parameters

PropertyDescriptionValidationModifiable
contactThe number or user to call when this click-to-call is activatedSIP URI or DIDyes

 

Operations

VerbAcceptedReturnedDescription
POSTALLALLStart the call

 

Response Codes

Normal Response Code(s): 200, 201

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504

 

Click-to-call History

URI

v1/accounts/{account_id}/clicktocall/{clicktocall_id}/history

 

Resource Parameters

PropertyDescriptionValidationModifiable
historyList of past activations for this click-to-calljson_objects()no

 

History

PropertyDescription
contactWho did we try to call
timestampWhen did the click-to-call get activated
call_idCall ID of the leg out to the contact
cdr_idCDR of the leg

 

Operations

VerbAcceptedReturnedDescription
GET ALLList of History objects

 

Response Codes

Normal Response Code(s): 200

Error Response Code(s): 400, 401, 404, 415, 500, 503, 504