From b518de66627960933302e9c6a5eed9933cd47c8a Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 27 May 2011 00:26:54 +0000 Subject: [PATCH] Added webphone_auto_answer option git-svn-id: svn://192.168.202.10@1665 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../trunk/extras/MySQL_AST_CREATE_tables.sql | 3 +- agc_2-X/trunk/extras/upgrade_2.4.sql | 3 + .../TO_BE_TRANSLATED_2.4.txt | 2 + agc_2-X/trunk/www/agc/phone_only.php | 10 +- agc_2-X/trunk/www/agc/vicidial.php | 207 ++++++++++-------- agc_2-X/trunk/www/agc/webphone/zoiperweb.php | 13 +- agc_2-X/trunk/www/vicidial/admin.php | 21 +- .../trunk/www/vicidial/realtime_report.php | 11 +- 8 files changed, 161 insertions(+), 109 deletions(-) diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index ca9bef7e..c4d887df 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -79,6 +79,7 @@ codecs_list VARCHAR(100) default '', codecs_with_template ENUM('0','1') default '0', webphone_dialpad ENUM('Y','N','TOGGLE','TOGGLE_OFF') default 'Y', on_hook_agent ENUM('Y','N') default 'N', +webphone_auto_answer ENUM('Y','N') default 'Y', index (server_ip), unique index extenserver (extension, server_ip) ); @@ -2495,7 +2496,7 @@ ALTER TABLE vicidial_closer_log_archive MODIFY closecallid INT(9) UNSIGNED NOT N CREATE TABLE vicidial_outbound_ivr_log_archive LIKE vicidial_outbound_ivr_log; -UPDATE system_settings SET db_schema_version='1276',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1277',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/upgrade_2.4.sql b/agc_2-X/trunk/extras/upgrade_2.4.sql index 61854aeb..242c9235 100644 --- a/agc_2-X/trunk/extras/upgrade_2.4.sql +++ b/agc_2-X/trunk/extras/upgrade_2.4.sql @@ -801,3 +801,6 @@ ALTER TABLE vicidial_call_menu ADD dtmf_log ENUM('0','1') default '0'; UPDATE system_settings SET db_schema_version='1276',db_schema_update_date=NOW() where db_schema_version < 1276; +ALTER TABLE phones ADD webphone_auto_answer ENUM('Y','N') default 'Y'; + +UPDATE system_settings SET db_schema_version='1277',db_schema_update_date=NOW() where db_schema_version < 1277; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 7d48d1dd..29506b8d 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -589,6 +589,8 @@ Log Key Press|| This option if enabled will log the DTMF key press by the caller in this Call Menu. Default is 0 for disabled|| No DTMF Logging|| DTMF Logging Enabled|| +Webphone Auto-Answer|| +This setting allows the web phone to be set to automatically answer calls that come in by setting it to Y, or to have calls ring by setting it to N. Default is Y|| admin_campaign_multi_alt.php diff --git a/agc_2-X/trunk/www/agc/phone_only.php b/agc_2-X/trunk/www/agc/phone_only.php index 8d6bcfbf..dbc3cefc 100644 --- a/agc_2-X/trunk/www/agc/phone_only.php +++ b/agc_2-X/trunk/www/agc/phone_only.php @@ -5,10 +5,11 @@ # # CHANGELOG # 110511-1336 - First Build +# 110526-1757 - Added webphone_auto_answer option # -$version = '2.4-1p'; -$build = '110511-1336'; +$version = '2.4-2p'; +$build = '110526-1757'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=72; $one_mysql_log=0; @@ -502,7 +503,7 @@ else echo "\n"; } echo "Phone web client\n"; - $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,phone_ring_timeout,on_hook_agent from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; + $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,phone_ring_timeout,on_hook_agent,webphone_auto_answer from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'09015',$VD_login,$server_ip,$session_name,$one_mysql_log);} @@ -576,6 +577,7 @@ else $webphone_dialpad=$row[76]; $phone_ring_timeout=$row[77]; $on_hook_agent=$row[78]; + $webphone_auto_answer=$row[79]; $no_empty_session_warnings=0; if ( ($phone_login == 'nophone') or ($on_hook_agent == 'Y') ) @@ -692,6 +694,8 @@ else if ($webphone_dialpad == 'N') {$webphone_options .= "--DIALPAD_N";} if ($webphone_dialpad == 'TOGGLE') {$webphone_options .= "--DIALPAD_TOGGLE";} if ($webphone_dialpad == 'TOGGLE_OFF') {$webphone_options .= "--DIALPAD_OFF_TOGGLE";} + if ($webphone_auto_answer == 'Y') {$webphone_options .= "--AUTOANSWER_Y";} + if ($webphone_auto_answer == 'N') {$webphone_options .= "--AUTOANSWER_N";} ### base64 encode variables $b64_phone_login = base64_encode($extension); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 5a5426b8..42bc838c 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -350,10 +350,11 @@ # 110430-1924 - Added post_phone_time_diff_alert campaign feature # 110506-1612 - Added custom_3way_button_transfer button feature # 110510-1637 - Added number validation to custom_3way_button_transfer function +# 110526-1723 - Added webphone_auto_answer option # -$version = '2.4-327c'; -$build = '110510-1637'; +$version = '2.4-328c'; +$build = '110526-1723'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=72; $one_mysql_log=0; @@ -1969,7 +1970,7 @@ else echo "\n"; } echo "Agent web client\n"; - $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,phone_ring_timeout,on_hook_agent from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; + $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,phone_ring_timeout,on_hook_agent,webphone_auto_answer from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01025',$VD_login,$server_ip,$session_name,$one_mysql_log);} @@ -2043,6 +2044,7 @@ else $webphone_dialpad=$row[76]; $phone_ring_timeout=$row[77]; $on_hook_agent=$row[78]; + $webphone_auto_answer=$row[79]; $no_empty_session_warnings=0; if ( ($phone_login == 'nophone') or ($on_hook_agent == 'Y') ) @@ -2343,6 +2345,8 @@ else if ($webphone_dialpad == 'N') {$webphone_options .= "--DIALPAD_N";} if ($webphone_dialpad == 'TOGGLE') {$webphone_options .= "--DIALPAD_TOGGLE";} if ($webphone_dialpad == 'TOGGLE_OFF') {$webphone_options .= "--DIALPAD_OFF_TOGGLE";} + if ($webphone_auto_answer == 'Y') {$webphone_options .= "--AUTOANSWER_Y";} + if ($webphone_auto_answer == 'N') {$webphone_options .= "--AUTOANSWER_N";} ### base64 encode variables $b64_phone_login = base64_encode($extension); @@ -2738,6 +2742,8 @@ $Cyear = $CdayARY['year']; $CTODAY = date("Y-m"); $CTODAYmday = date("j"); $CINC=0; +$live_days=0; +$limit_days=999; $Cmonths = Array('January','February','March','April','May','June', 'July','August','September','October','November','December'); @@ -2748,106 +2754,117 @@ $CCAL_OUT = ''; $CCAL_OUT .= ""; while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= "";} -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(11,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); + if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) + {$CCAL_OUT .= "
"; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; + $CCAL_OUT .= ""; -} - -for( $Ccount=0;$Ccount<(6*7);$Ccount++) -{ - $Cdayarray = getdate($Cstart); - if((($Ccount) % 7) == 0) - { - if($Cdayarray['mon'] != $CfirstdayARY['mon']) - break; - $CCAL_OUT .= ""; - } - if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) - { - $CCAL_OUT .= ""; - } - else - { - if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) + $CYyear = $Cyear; + $Cmonth= ($Cmon + $CINC); + if ($Cmonth > 12) { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="$MAIN_COLOR"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; + $Cmonth = ($Cmonth - 12); + $CYyear++; } + $Cstart= mktime(11,0,0,$Cmonth,1,$CYyear); + $CfirstdayARY = getdate($Cstart); + #echo "|$Cmon|$Cmonth|$CINC|\n"; + $CPRNTDAY = date("Y-m", $Cstart); - $CCAL_OUT .= ""; + $CCAL_OUT .= ""; -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} + foreach($Cdays as $Cday) + { + $CDCLR="#ffffff"; + $CCAL_OUT .= ""; + } + + for( $Ccount=0;$Ccount<(6*7);$Ccount++) + { + $Cdayarray = getdate($Cstart); + if((($Ccount) % 7) == 0) + { + if($Cdayarray['mon'] != $CfirstdayARY['mon']) + break; + $CCAL_OUT .= ""; + } + if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) + { + $CCAL_OUT .= ""; + } + else + { + if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) + { + $CPRNTmday = $Cdayarray['mday']; + if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} + if ($limit_days > $live_days) + { + $CBL = ""; + $CEL = ""; + } + else + {$CBL=''; $CEL='';} + $CCAL_OUT .= ""; + $Cstart += ADAY; + $live_days++; + } + else + { + $CDCLR="#ffffff"; + if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) + { + $CDCLR="$MAIN_COLOR"; + $CBL = ''; + $CEL = ''; + } + else + { + $CPRNTmday = $Cdayarray['mday']; + if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} + if ($limit_days > $live_days) + { + $CBL = ""; + $CEL = ""; + } + else + {$CBL=''; $CEL='';} + $live_days++; + } + + $CCAL_OUT .= ""; + $Cstart += ADAY; + } + } + } + $CCAL_OUT .= ""; + $CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -foreach($Cdays as $Cday) -{ - $CDCLR="#ffffff"; -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$Cday"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
 "; - $CCAL_OUT .= "
"; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
"; - $CCAL_OUT .= "
"; - $CCAL_OUT .= "
"; - $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; - $CCAL_OUT .= "
"; + $CCAL_OUT .= ""; + $CCAL_OUT .= ""; + $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; + $CCAL_OUT .= "
"; $CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$Cday"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
 "; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= ""; + + if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) + {$CCAL_OUT .= "";} + $CINC++; + } $CCAL_OUT .= ""; diff --git a/agc_2-X/trunk/www/agc/webphone/zoiperweb.php b/agc_2-X/trunk/www/agc/webphone/zoiperweb.php index e39b9ecb..d19e55af 100644 --- a/agc_2-X/trunk/www/agc/webphone/zoiperweb.php +++ b/agc_2-X/trunk/www/agc/webphone/zoiperweb.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2011 Matt Florell LICENSE: AGPLv2 # # variables sent to this script: # $phone_login - phone login @@ -10,6 +10,7 @@ # $callerid - the callerid number # $protocol - IAX or SIP # $codecs - list of codecs to use +# $options - optional webphone settings # $system_key - key optionally used by the webphone service to validate the user # # CHANGELOG @@ -17,6 +18,7 @@ # 100424-2102 - Added codecs option and updated zoiperweb code reference # 100827-1417 - Added system_key variable # 101227-1313 - Added DIALPLAN_OFF_TOGGLE option +# 110526-1726 - Added AUTOANSWER option # if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -191,8 +193,13 @@ function OnZoiperCallReject(call) function OnZoiperCallIncoming(call) { Status(call.Phone + " incoming"); - call.Accept(); - ActiveCall = call; + + } function OnZoiperAccountRegister(account) { diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 1b751b19..aad05be6 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1550,6 +1550,8 @@ if (isset($_GET["safe_harbor_menu_id"])) {$safe_harbor_menu_id=$_GET["safe_har elseif (isset($_POST["safe_harbor_menu_id"])) {$safe_harbor_menu_id=$_POST["safe_harbor_menu_id"];} if (isset($_GET["dtmf_log"])) {$dtmf_log=$_GET["dtmf_log"];} elseif (isset($_POST["dtmf_log"])) {$dtmf_log=$_POST["dtmf_log"];} +if (isset($_GET["webphone_auto_answer"])) {$webphone_auto_answer=$_GET["webphone_auto_answer"];} + elseif (isset($_POST["webphone_auto_answer"])) {$webphone_auto_answer=$_POST["webphone_auto_answer"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -1882,6 +1884,7 @@ if ($non_latin < 1) $on_hook_agent = ereg_replace("[^NY]","",$on_hook_agent); $auto_pause_precall = ereg_replace("[^NY]","",$auto_pause_precall); $auto_resume_precall = ereg_replace("[^NY]","",$auto_resume_precall); + $webphone_auto_answer = ereg_replace("[^NY]","",$webphone_auto_answer); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); $active = ereg_replace("[^0-9NY]","",$active); @@ -2720,12 +2723,13 @@ else # 110514-1351 - Added dial level and available only tally threshold campaign settings, and time zone list setting # 110524-1401 - Small help text fix, issue #486 # 110525-2109 - Added safe_harbor_audio, safe_harbor_menu_id campaign options and dtmf_log call menu option +# 110526-1715 - Added webphone_auto_answer option # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.4-313a'; -$build = '110525-2109'; +$admin_version = '2.4-314a'; +$build = '110526-1715'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6488,6 +6492,11 @@ if ($ADD==99999)
Webphone Dialpad - This setting allows you to activate or deactivate the dialpad for this webphone. Default is Y for enabled. TOGGLE will allow the user to view and hide the dialpad by clicking a link. This feature is not available on all webphone versions. TOGGLE_OFF will default to not show the dialpad on first load, but will allow the user to show the dialpad by clicking on the dialpad link. +
+ +
+ Webphone Auto-Answer - This setting allows the web phone to be set to automatically answer calls that come in by setting it to Y, or to have calls ring by setting it to N. Default is Y. +

@@ -15055,7 +15064,7 @@ if ($ADD==41111111111) { echo "
PHONE MODIFIED: $extension\n"; - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent' where extension='$old_extension' and server_ip='$old_server_ip';"; + $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent',webphone_auto_answer='$webphone_auto_answer' where extension='$old_extension' and server_ip='$old_server_ip';"; $rslt=mysql_query($stmt, $link); $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; @@ -25191,7 +25200,7 @@ if ($ADD==31111111111) echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -29351,11 +29361,14 @@ if ($ADD==999994) if ( ($LOGuser_level >= 9) and ( (preg_match("/Administration Change Log/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) ) { + echo "\n
 \n"; } echo "
\n"; echo ""; - $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent from phones where extension='$extension' and server_ip='$server_ip';"; + $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent,webphone_auto_answer from phones where extension='$extension' and server_ip='$server_ip';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -25219,6 +25228,7 @@ if ($ADD==31111111111) echo "
Registration Password: $NWB#phones-conf_secret$NWE     Strength:
Set As Webphone: $NWB#phones-is_webphone$NWE
Webphone Dialpad: $NWB#phones-webphone_dialpad$NWE
Webphone Auto-Answer: $NWB#phones-webphone_auto_answer$NWE
Use External Server IP: $NWB#phones-use_external_server_ip$NWE
Status: $NWB#phones-status$NWE
Active Account: $NWB#phones-active$NWE
\n"; diff --git a/agc_2-X/trunk/www/vicidial/realtime_report.php b/agc_2-X/trunk/www/vicidial/realtime_report.php index cc18f7b2..ab42c581 100644 --- a/agc_2-X/trunk/www/vicidial/realtime_report.php +++ b/agc_2-X/trunk/www/vicidial/realtime_report.php @@ -18,10 +18,11 @@ # 110303-2124 - Added agent on-hook phone indication and RING status and color # 110316-2216 - Added Agent, Carrier and Preset options.php settings # 110516-2128 - IE fix +# 110526-1807 - Added webphone_auto_answer option # -$version = '2.4-7'; -$build = '110516-2128'; +$version = '2.4-8'; +$build = '110526-1807'; header ("Content-type: text/html; charset=utf-8"); @@ -568,7 +569,7 @@ $open_list = "< if (strlen($monitor_phone)>1) { - $stmt="SELECT extension,dialplan_number,server_ip,login,pass,protocol,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,outbound_cid from phones where login='$monitor_phone' and active = 'Y';"; + $stmt="SELECT extension,dialplan_number,server_ip,login,pass,protocol,conf_secret,is_webphone,use_external_server_ip,codecs_list,webphone_dialpad,outbound_cid,webphone_auto_answer from phones where login='$monitor_phone' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $Mph_ct = mysql_num_rows($rslt); @@ -587,6 +588,7 @@ if (strlen($monitor_phone)>1) $codecs_list = $row[9]; $webphone_dialpad = $row[10]; $outbound_cid = $row[11]; + $webphone_auto_answer = $row[12]; if ($is_webphone == 'Y') { @@ -645,6 +647,9 @@ if (strlen($monitor_phone)>1) if ($webphone_dialpad == 'N') {$webphone_options .= "--DIALPAD_N";} if ($webphone_dialpad == 'TOGGLE') {$webphone_options .= "--DIALPAD_TOGGLE";} if ($webphone_dialpad == 'TOGGLE_OFF') {$webphone_options .= "--DIALPAD_OFF_TOGGLE";} + if ($webphone_auto_answer == 'Y') {$webphone_options .= "--AUTOANSWER_Y";} + if ($webphone_auto_answer == 'N') {$webphone_options .= "--AUTOANSWER_N";} + $session_name='RTS01234561234567890'; ### base64 encode variables