Added Agent API function 'vm_message' allowing you to set the VM message to be played to a customer when the agent clicks on the VM button in the agent screen.

git-svn-id: svn://192.168.202.10@3323 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-11-13 03:16:47 +00:00
parent ccf42d6c24
commit 28258bed5f
5 changed files with 153 additions and 7 deletions
+4
View File
@@ -546,6 +546,10 @@ OTHER CHANGES:
154. Added Campaign setting for Hopper Drop-Run triggering. Forcing the one-time 154. Added Campaign setting for Hopper Drop-Run triggering. Forcing the one-time
hopper insertion of DROP status leads instead of standard hopper loading hopper insertion of DROP status leads instead of standard hopper loading
155. Added Agent API function 'vm_message' allowing you to set the VM message to
be played to a customer when the agent clicks on the VM button in the
agent screen.
+34 -1
View File
@@ -1,4 +1,4 @@
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2020-05-22 AGENT API DOCUMENT Started: 2008-07-03 Updated: 2020-11-12
This document describes the functions of an API(Application Programming Interface) This document describes the functions of an API(Application Programming Interface)
for the VICIDIAL Agent screen. This functionality will be rather limited at first for the VICIDIAL Agent screen. This functionality will be rather limited at first
@@ -39,6 +39,7 @@ switch_lead - for inbound calls, switches lead_id of live inbound call on agent
calls_in_queue_count - display a count of the calls waiting in queue for the specific agent calls_in_queue_count - display a count of the calls waiting in queue for the specific agent
force_fronter_leave_3way - will send a command to fronter agent to leave-3way call that executing agent is on force_fronter_leave_3way - will send a command to fronter agent to leave-3way call that executing agent is on
force_fronter_audio_stop - will send a command to fronter agent session to stop any audio_playback playing on it force_fronter_audio_stop - will send a command to fronter agent session to stop any audio_playback playing on it
vm_message - set a custom voicemail message to be played when agent clicks the VM button on the agent screen
New scripts: New scripts:
@@ -875,6 +876,38 @@ SUCCESS: switch_lead function set - 6666|12345|1234567890|TESTCAMP|12346
--------------------------------------------------------------------------------
vm_message -
IMPORTANT NOTES:
- Set the campaign "Answering Machine Message" setting to 'LTTagent' for this to work.
- There are some other campaign settings that can override this function, so you will want to disable 'AM Message Wildcards' and 'VM Message Groups'.
DESCRIPTION:
Set a custom voicemail message to be played when agent clicks the VM button on the agent screen
VALUES:
value -
REQUIRED, One audio file or multiple audio files(separated by pipes) to play when the call is sent to VM by the agent
lead_id -
OPTIONAL, The lead_id of the call that the agent is currently on, if populated it will validate that is the lead the agent is talking to
EXAMPLE URLS:
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=vm_message&lead_id=12345&value=EXship01|EXship02|EXship03
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=vm_message&lead_id=12345&value=appointment_reminder2
RESPONSES:
ERROR: vm_message not valid - ||6666
ERROR: no user found - 6666
ERROR: agent_user is not logged in - 6666
ERROR: current call does not match lead_id submitted - 6666
ERROR: agent_user does not have a live call - 6666
SUCCESS: vm_message function set - 6666|12345|EXship01|EXship02|EXship03
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
pause_code - pause_code -
+1 -1
View File
@@ -233,7 +233,7 @@ else
# VARhttp://127.0.0.1/agc/vdc_LTT_generate.php?lead_id=--A--lead_id--B--&user=--A--user--B--&address3=--A--address3--B--&vendor_lead_code=--A--vendor_lead_code--B--&owner=--A--owner--B--&province=--A--province--B--&security_phrase=--A--security_phrase--B--&alt_phone=--A--alt_phone--B-- # VARhttp://127.0.0.1/agc/vdc_LTT_generate.php?lead_id=--A--lead_id--B--&user=--A--user--B--&address3=--A--address3--B--&vendor_lead_code=--A--vendor_lead_code--B--&owner=--A--owner--B--&province=--A--province--B--&security_phrase=--A--security_phrase--B--&alt_phone=--A--alt_phone--B--
# #
# NOTES: # NOTES:
# After this page loads, the agent will just need to open the transfer panel and click on the 'VM' button to send the call to the customized message(or use a properly-configured HotKey to do so). Keep in mind that there are many campaign settings that can override this function, so you will want to disable 'AM Message Wildcards' and 'VM Message Groups', and also set the 'Answering Machine Message' to 'LTTagent' for this to work. # After this page loads, the agent will just need to open the transfer panel and click on the 'VM' button to send the call to the customized message(or use a properly-configured HotKey to do so). Keep in mind that there are some campaign settings that can override this function, so you will want to disable 'AM Message Wildcards' and 'VM Message Groups', and also set the 'Answering Machine Message' to 'LTTagent' for this to work.
# #
if ($address3 == 'ACME Shipping') {$EXship01a = 'EXshipACME.wav';} if ($address3 == 'ACME Shipping') {$EXship01a = 'EXshipACME.wav';}
+112 -3
View File
@@ -100,10 +100,11 @@
# 190222-1152 - Added force_fronter_audio_stop function # 190222-1152 - Added force_fronter_audio_stop function
# 190901-0952 - Added cid_choice option to transfer_conference function # 190901-0952 - Added cid_choice option to transfer_conference function
# 200403-1510 - Added outbound_cid option to external_dial function # 200403-1510 - Added outbound_cid option to external_dial function
# 201112-2053 - Added vm_message function
# #
$version = '2.14-66'; $version = '2.14-67';
$build = '200403-1510'; $build = '201112-2053';
$startMS = microtime(); $startMS = microtime();
@@ -303,7 +304,7 @@ if ($non_latin < 1)
$pass=preg_replace("/[^-_0-9a-zA-Z]/","",$pass); $pass=preg_replace("/[^-_0-9a-zA-Z]/","",$pass);
$agent_user=preg_replace("/[^0-9a-zA-Z]/","",$agent_user); $agent_user=preg_replace("/[^0-9a-zA-Z]/","",$agent_user);
$function = preg_replace("/[^-\_0-9a-zA-Z]/","",$function); $function = preg_replace("/[^-\_0-9a-zA-Z]/","",$function);
$value = preg_replace("/[^-\_0-9a-zA-Z]/","",$value); $value = preg_replace("/[^-\|\_0-9a-zA-Z]/","",$value);
$focus = preg_replace("/[^-\_0-9a-zA-Z]/","",$focus); $focus = preg_replace("/[^-\_0-9a-zA-Z]/","",$focus);
$preview = preg_replace("/[^-\_0-9a-zA-Z]/","",$preview); $preview = preg_replace("/[^-\_0-9a-zA-Z]/","",$preview);
$notes = preg_replace("/\+/"," ",$notes); $notes = preg_replace("/\+/"," ",$notes);
@@ -4040,6 +4041,114 @@ if ($function == 'switch_lead')
################################################################################
### BEGIN - vm_message - set a custom voicemail message to be played when agent clicks the VM button on the agent screen
################################################################################
if ($function == 'vm_message')
{
if ( ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) or (strlen($value)<1) )
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("vm_message not valid");
echo "$result: $result_reason - $lead_id|$value|$agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
if ( (!preg_match("/ $function /",$VUapi_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$VUapi_allowed_functions)) )
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION");
echo "$result: $result_reason - $lead_id|$user|$function|$VUuser_group\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
$processed=0;
$SUCCESS=0;
if (strlen($alt_user)>1)
{
$stmt = "select count(*) from vicidial_users where custom_three='$alt_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$agent_user = $row[0];
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("no user found");
echo "$result: $result_reason - $alt_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select lead_id,callerid,campaign_id from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$current_lead_id = $row[0];
$callerid = $row[1];
$campaign_id = $row[2];
if ( ($current_lead_id > 0) and (strlen($callerid)>15) )
{
if (strlen($lead_id) < 1) {$lead_id = $current_lead_id;}
if ($current_lead_id == $lead_id)
{
$stmt="INSERT INTO vicidial_lead_messages (lead_id,call_date,user,message_entry) values('$lead_id',NOW(),'$user','$value');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
$result = _QXZ("SUCCESS");
$result_reason = _QXZ("vm_message function set");
$data = "$lead_id|$value";
echo "$result: $result_reason - $agent_user|$data|\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("current call does not match lead_id submitted");
$data = "$lead_id|$current_lead_id";
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("agent_user does not have a live call");
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("agent_user is not logged in");
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
}
################################################################################
### END - vm_message
################################################################################
################################################################################ ################################################################################
### BEGIN - pause_code - set a pause code for an agent that is already paused ### BEGIN - pause_code - set a pause code for an agent that is already paused
################################################################################ ################################################################################
@@ -1,4 +1,4 @@
# version: 20201112100401 # version: 20201112221501
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ> users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ> users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ> users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
@@ -166,7 +166,7 @@ campaigns-auto_alt_dial Auto Alt-Number Dialing <QXZ>This setting is used to aut
campaigns-dial_timeout Dial Timeout <QXZ>If defined, calls that would normally hang up after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve.</QXZ> campaigns-dial_timeout Dial Timeout <QXZ>If defined, calls that would normally hang up after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve.</QXZ>
campaigns-dial_timeout_lead_container Dial Timeout Lead Container <QXZ>This option allows you to select a Settings Container of the DIAL_TIMEOUTS type that will allow you to override the campaign dial timeouts on a per lead basis using a lead field value defined in the container. You can enable manual dialing and auto dialing overrides separately by defining which lead field is to be looked at for a dial timeout key value. If you wanted to use the -comments- lead field for manual dial timeouts, you would define manual_dial_field => comments. If you wanted to use the -comments- lead field for auto dial timeouts, you would define auto_dial_field => comments. after either or both of these are defined, you will need to define the key and value pairs for the dial timeouts. For example, if a key of -A- in the comments field should trigger a 50 second dial timeout override for the lead, you would define A => 50. You can define multiple key and value pairs in the settings container. Lead field names should be in lower case letters only. You must define the Lead Field Name above any Field Values that you define. Field value matching is case sensitive. We recommend not matching to field values that have spaces or special characters in them.</QXZ> campaigns-dial_timeout_lead_container Dial Timeout Lead Container <QXZ>This option allows you to select a Settings Container of the DIAL_TIMEOUTS type that will allow you to override the campaign dial timeouts on a per lead basis using a lead field value defined in the container. You can enable manual dialing and auto dialing overrides separately by defining which lead field is to be looked at for a dial timeout key value. If you wanted to use the -comments- lead field for manual dial timeouts, you would define manual_dial_field => comments. If you wanted to use the -comments- lead field for auto dial timeouts, you would define auto_dial_field => comments. after either or both of these are defined, you will need to define the key and value pairs for the dial timeouts. For example, if a key of -A- in the comments field should trigger a 50 second dial timeout override for the lead, you would define A => 50. You can define multiple key and value pairs in the settings container. Lead field names should be in lower case letters only. You must define the Lead Field Name above any Field Values that you define. Field value matching is case sensitive. We recommend not matching to field values that have spaces or special characters in them.</QXZ>
campaigns-campaign_vdad_exten Routing Extension <QXZ>This field allows for a custom outbound routing extension. This allows you to use different call handling methods depending upon how you want to route calls through your outbound campaign. Formerly called Campaign VDAD extension.</QXZ><BR>- <QXZ>8364 - same as 8368</QXZ><BR>- <QXZ>8365 - Will send the call only to an agent on the same server as the call is placed on</QXZ><BR>- <QXZ>8366 - Used for press-1, broadcast and survey campaigns</QXZ><BR>- <QXZ>8367 - Will try to first send the call to an agent on the local server, then it will look on other servers</QXZ><BR>- <QXZ>8368 - DEFAULT - Will send the call to the next available agent no matter what server they are on</QXZ><BR>- <QXZ>8369 - Used for Answering Machine Detection after that, same behavior as 8368</QXZ><BR>- <QXZ>8373 - Used for Answering Machine Detection after that same behavior as 8366</QXZ><BR>- <QXZ>8374 - Used for press-1, broadcast and survey campaigns with Cepstral Text-to-speech</QXZ><BR>- <QXZ>8375 - Used for Answering Machine Detection then press-1, broadcast and survey campaigns with Cepstral Text-to-speech</QXZ> campaigns-campaign_vdad_exten Routing Extension <QXZ>This field allows for a custom outbound routing extension. This allows you to use different call handling methods depending upon how you want to route calls through your outbound campaign. Formerly called Campaign VDAD extension.</QXZ><BR>- <QXZ>8364 - same as 8368</QXZ><BR>- <QXZ>8365 - Will send the call only to an agent on the same server as the call is placed on</QXZ><BR>- <QXZ>8366 - Used for press-1, broadcast and survey campaigns</QXZ><BR>- <QXZ>8367 - Will try to first send the call to an agent on the local server, then it will look on other servers</QXZ><BR>- <QXZ>8368 - DEFAULT - Will send the call to the next available agent no matter what server they are on</QXZ><BR>- <QXZ>8369 - Used for Answering Machine Detection after that, same behavior as 8368</QXZ><BR>- <QXZ>8373 - Used for Answering Machine Detection after that same behavior as 8366</QXZ><BR>- <QXZ>8374 - Used for press-1, broadcast and survey campaigns with Cepstral Text-to-speech</QXZ><BR>- <QXZ>8375 - Used for Answering Machine Detection then press-1, broadcast and survey campaigns with Cepstral Text-to-speech</QXZ>
campaigns-am_message_exten Answering Machine Message <QXZ>This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system. You can also use lead fields to generate audio filenames using the DYN flag, for instance using DYN--A--user--B-- for agent 1234 would look for a file named 1234.wav in your audio store to play. If you need more space to build your message with files, you can put them into a Settings Container and the use STC and then the container ID to use that settings container as your answering machine message. Another advanced option is LTT, if you have custom programming on your system to construct answering maching messages on a per-call basis.</QXZ> campaigns-am_message_exten Answering Machine Message <QXZ>This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system. You can also use lead fields to generate audio filenames using the DYN flag, for instance using DYN--A--user--B-- for agent 1234 would look for a file named 1234.wav in your audio store to play. If you need more space to build your message with files, you can put them into a Settings Container and the use STC and then the container ID to use that settings container as your answering machine message. Another advanced option is LTT, if you have custom programming on your system to construct answering maching messages on a per-call basis. If you will be using the Agent API function vm_message, you will want to put LTTagent in this field.</QXZ>
campaigns-vmm_daily_limit Voicemail Message Daily Limit <QXZ>This option allows you to limit the number of times a voicemail message plays to a lead for a single day. After the defined limit is reached, the call will be hung up instead of playing a message. If this feature is active then it will be in effect for all calls sent to play a voicemail message, even if an agent manually sends a call to a VM message. The default is 0, for disabled.</QXZ> campaigns-vmm_daily_limit Voicemail Message Daily Limit <QXZ>This option allows you to limit the number of times a voicemail message plays to a lead for a single day. After the defined limit is reached, the call will be hung up instead of playing a message. If this feature is active then it will be in effect for all calls sent to play a voicemail message, even if an agent manually sends a call to a VM message. The default is 0, for disabled.</QXZ>
campaigns-waitforsilence_options WaitForSilence Options <QXZ>If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are three settings separated by a comma, the first option is how long to detect silence in milliseconds, the second option is for how many times to detect that before playing the message, the third is the maximum number of seconds to wait before timing out and playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2,30</QXZ> campaigns-waitforsilence_options WaitForSilence Options <QXZ>If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are three settings separated by a comma, the first option is how long to detect silence in milliseconds, the second option is for how many times to detect that before playing the message, the third is the maximum number of seconds to wait before timing out and playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2,30</QXZ>
campaigns-am_message_wildcards AM Message Wildcards <QXZ>This option, if enabled, allows you to go to the AM Message Wildcard administration page where you can define wildcards that can match data in a default lead field and can play a different message based upon the data in a specific lead. Default is N for disabled.</QXZ> campaigns-am_message_wildcards AM Message Wildcards <QXZ>This option, if enabled, allows you to go to the AM Message Wildcard administration page where you can define wildcards that can match data in a default lead field and can play a different message based upon the data in a specific lead. Default is N for disabled.</QXZ>