Click to Call
Click to Call
Retrieve current agent information
/api/v0alpha/p3api/getcurrentagentThis endpoint is used to query information about the current agent. Request Response Store the response values for
{}
{
"agentSid": "2098765",
"clientSid": "2000123",
"agentProfileSid": "1234567",
"webLogin": "operagent1",
"addDate": "2024-01-01T16:00:00.000000Z",
"modifyDate": "2024-01-01T16:00:00.000000Z",
"huntGroupSid": "1045678",
"partnerAgentId": "",
"lastPasswordChangeDate": "2024-01-01T16:00:00.000000Z"
}
clientSid
, agentSid
, and huntGroupSid
. clientSid
and agentSid
are static values. The huntGroupSid
is variable and can be changed during the session.Retrieve hunt group agent settings
/api/v0alpha/p3api/gethuntgroupagentsettings
This endpoint returns information for the selected hunt group, this includes caller id, as well as compliance settings.Request Response Store the values for
This endpoint returns information for the selected hunt group, this includes caller id, as well as compliance settings.
{
"huntGroupSid": "{{huntGroupSid}}"
}
{
<snip>
"manualDial": {
"enabled": true,
"showOutboundPhoneBook": false,
"showCallerIdPhoneBook": true,
"hasCustomCallerId": true,
"defaultCallerId": "8667451900",
"defaultCountrySid": "1",
"showCountrySelector": true,
"timezoneRestrictions": true,
"scrubCellPhones": false,
"callRecording": true,
"agentOverrideCell": false,
"agentOverrideCcr": false,
"agentOverrideDncl": false,
"agentOverrideTimezone": false,
"useWhiteList": false,
"useRandomCallerId": false,
"randomCallerIdBucket": "-1",
"defaultCallerIdCountrySid": "1",
"displayCallerIdCountrySelect": true,
"useCallerIdBucket": false,
"agentOverrideNaturalCompliance": false,
"naturalComplianceRuleSetName": "Default Compliance Ruleset",
"complianceMetadata": [
{
"name": "Account Number",
"required": true
}
],
"enableMetadata": true,
"useTimezoneValidationZip": "TRUE",
"enableRejectOptionForApprovers": false,
"enableSipAddress": true,
"maskManualDialCallerId": false,
"enableManualDialDataDip": "",
"manualDialDataDipConfig": "0",
"manualDialDataDipResultHandling": "NONE",
"dataDipManualDialIntegration": {},
"dataDipManualDialIntegrationHandling": "NONE"
},
<snip>
}
defaultCallerIdCountrySid
, defaultCallerId
, defaultCountrySid
, naturalComplianceRuleSetName
, scrubCellPhones
, timezoneRestrictions
, and callRecording
Retrieve current agent's sessionSid
/api/v1alpha1/asm/asmapi/getcurrentsession
This returns the agent's currentRequest Response Store
This returns the agent's current
acd
and asm
session values.{}
{
"asmSessionSid": "20003456",
"asmSessionStart": "2025-01-01T16:00:00.000000Z",
"voiceSession": {
"voiceSessionSid": "50006789",
"voiceSessionStart": "2025-01-01T16:00:00.000000Z"
}
}
sessionSid
and asmSessionSid
Retrieve list of countries allowed for the organization
/api/v0alpha/org/countries/list/getRequest Response Returns an object of countries allowed to be called by the organization. Attempting calls to a country not in the this list will cause a failure.
{}
"countries": [
{
"countryId": "",
"countrySid": "1",
"countryName": "United States / Canada",
"phoneDigits": "7",
"regionDigits": "3",
"totalDigits": "10",
"countryCode": "1",
"regionCodes": [
"US",
"AG",
"AI",
"AS",
"BB",
"BM",
"BS",
"CA",
"DM",
"DO",
"GD",
"GU",
"JM",
"KN",
"KY",
"LC",
"MP",
"MS",
"PR",
"SX",
"TC",
"TT",
"VC",
"VG",
"VI"
],
"country": "COUNTRY_UNITED_STATES_OF_AMERICA"
}
]
}
Check agent status
/api/v0alpha/acd/agentgetstatusReturns the agent's current status.
It is important to verify that the agent is in Request Response
It is important to verify that the agent is in
READY
status before placing a manual dial call.{
"sessionSid": "{{sessionSid}}"
}
{
"status": "1",
"statusDesc": "READY",
"paused": false,
"queue": "2000123",
"currentSessionId": "50006789",
"lastStatusChange": "1704150000000",
"monitoring": false,
"callsCount": "0",
"lastSipCode": "0",
"agentPeerIsLostCall": false,
"disabled": false,
"keepAliveSucceeded": true,
"transferMembers": [],
"agentIsMuted": false
}
Place agent in the manual dial state
Re-verify the agent state
/api/v0alpha/acd/agentgetstatus
Verify the agent is now inRequest Response
Verify the agent is now in
MANUAL_DIAL_PREPARED
status{}
{
"status": "2",
"statusDesc": "MANUAL_DIAL_PREPARED",
"paused": false,
"queue": "2000123",
"currentSessionId": "50006789",
"lastStatusChange": "1704150300000",
"monitoring": false,
"callsCount": "0",
"lastSipCode": "0",
"agentPeerIsLostCall": false,
"disabled": false,
"keepAliveSucceeded": true,
"transferMembers": [],
"agentIsMuted": false
}
Process call against NLC ruleset
CallQueue_ProcessManualDialCall
Validate the call against an NLC (National List Call) rule set to ensure compliance with regulations such as cell scrubbing and other compliance requirements.Request Response Check the If If
Validate the call against an NLC (National List Call) rule set to ensure compliance with regulations such as cell scrubbing and other compliance requirements.
{
"call": {
"clientSid": "{{clientSid}}",
"countrySid": "{{defaultCountrySid}}",
"agentSid": "{{agentSid}}",
"startTime": "{{startTime}}",
"callerId": "{{callerId}}",
"phoneNumber": "4355551234",
"countryCode": "1",
"doRecord": "{{callRecording}}",
"useGlobalTimeZoneScrub": "{{timezoneRestrictions}}",
"doCellPhoneScrub": "{{scrubCellPhones}}",
"doDnclScrub": true,
"callDataType": "manual",
"callerIdCountryCode": "{{callerIdCountryCode}}",
"callerIdCountrySid": "{{callerIdCountrySid}}",
"ruleSetName": "{{naturalComplianceRuleSetName}}",
"simpleMetaData": [
{
"key": "Account",
"value": "ABC1234"
},
{
"key": "Zip Code",
"value": "84770"
}
]
}
}
{
"scrubbedCall": {
"taskSid": "0",
"callSid": "234567890",
"taskGroupSid": "765432",
"clientSid": "2000123",
"countrySid": "1",
"agentSid": "2098765",
"startTime": "1704150360",
"callerId": "8667451900",
"phoneNumber": "4355551234",
"countryCode": "1",
"deliveryDuration": 0,
"linkCallDuration": 0,
"result": "CALL_RESULT_UNKNOWN",
"sipCode": 0,
"doRecord": true,
"recordingFileName": "",
"isDialValidationOk": true,
"isTimeZoneScrubOk": true,
"isCellPhoneScrubOk": true,
"isCustomCallingRulesScrubOk": true,
"isDnclScrubOk": true,
"useGlobalTimeZoneScrub": true,
"doCellPhoneScrub": false,
"doDnclScrub": true,
"callDataType": "Manual",
"callerIdCountryCode": "1",
"callerIdCountrySid": "1",
"zipCode": "",
"isPreviewByRecord": false,
"ruleSetName": "Default Compliance Ruleset",
"isNaturalComplianceOk": true,
"simpleMetaData": [
{
"key": "Account",
"value": "ABC1234"
},
{
"key": "Zip Code",
"value": "84770"
}
],
"simpleResultMetaData": []
}
}
isDialValidationOk
flag in the response:isDialValidationOk
is false
, the call should be canceled.isDialValidationOk
is true
, store the callSid
and taskGroupSid
and proceed to start the call.Cancel Call
/api/v0alpha/acd/dialmanualcancel
IfRequest Response
If
isDialValidationOk
is false
in the compliance process response, cancel the call.{
"sessionSid": "{{sessionSid}}"
}
{}
Place call
/api/v0alpha/p3api/manualdialstart
IfRequest
If
isDialValidationOk
is true
in the compliance process response, place the outbound call.{
"simpleCallData": {
// "taskSid": "<string>",
"callSid": "{{callSid}}",
"taskGroupSid": "{{taskGroupSid}}",
"clientSid": "{{clientSid}}",
"countrySid": "{{defaultCountrySid}}",
"agentSid": "{{agentSid}}",
"startTime": "{{startTime}}",
"callerId": "{{callerId}}",
"phoneNumber": "4355551234",
"countryCode": "1",
"doRecord": "{{callRecording}}",
// "recordingFileName": "<string>",
// "isDialValidationOk": "<boolean>",
// "isTimeZoneScrubOk": "<boolean>",
// "isCellPhoneScrubOk": "<boolean>",
// "isCustomCallingRulesScrubOk": "<boolean>",
// "isDnclScrubOk": "<boolean>",
// "useGlobalTimeZoneScrub": "<boolean>",
// "doCellPhoneScrub": "<boolean>",
// "doDnclScrub": "<boolean>",
"callDataType": "manual",
"callerIdCountryCode": "{{callerIdCountryCode}}",
"callerIdCountrySid": "{{callerIdCountrySid}}",
"ruleSetName": "{{naturalComplianceRuleSetName}}",
// "isNaturalComplianceOk": "<boolean>",
"simpleMetaData": [
{
"key": "Account",
"value": "ABC1234"
},
{
"key": "Zip Code",
"value": "84770"
}
]
},
"huntGroupSid": "{{huntGroupSid}}",
"agentSessionSid": "{{sessionSid}}",
}