From e021960a96455b8285c2db3f9abfaf60848d281f Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 11 Dec 2015 14:56:18 +0000 Subject: [PATCH] Added option in NVA agi script to search for a lead by phone number, log the lead_id of the phone call and send a per-phone URL at the start of the phone call. git-svn-id: svn://192.168.202.10@2427 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 4 + agi/agi-NVA_recording.agi | 140 ++++++++++++++++++ docs/conf_examples/extensions.conf.sample | 3 + docs/conf_examples/extensions.conf.sample-1.4 | 3 + docs/conf_examples/extensions.conf.sample-1.8 | 2 + docs/conf_examples/voicemail.conf.sample-1.8 | 2 +- extras/MySQL_AST_CREATE_tables.sql | 5 +- extras/upgrade_2.12.sql | 6 + www/vicidial/AST_url_log_report.php | 5 +- www/vicidial/admin.php | 23 ++- www/vicidial/help.php | 16 ++ 11 files changed, 201 insertions(+), 8 deletions(-) diff --git a/UPGRADE b/UPGRADE index ef6bf20d..15b8979d 100644 --- a/UPGRADE +++ b/UPGRADE @@ -202,6 +202,10 @@ OTHER CHANGES: 49. Added phone options to have call go to dialplan extension instead of voicemail if phone not answered. +50. Added option in NVA agi script to search for a lead by phone number, log the + lead_id of the phone call and send a per-phone URL at the start of the + phone call. + diff --git a/agi/agi-NVA_recording.agi b/agi/agi-NVA_recording.agi index 7e100c1f..07fd0f53 100644 --- a/agi/agi-NVA_recording.agi +++ b/agi/agi-NVA_recording.agi @@ -13,6 +13,10 @@ # ; 6. double-log this call in call_log (Y|N) default N, ONLY NEEDED FOR INBOUND CALLMENU FORWARDED CALLS!!! # ; 7. play the recording ID of this call before recording starts # ; 8. include the recording ID in the filename +# ; 9. search vicidial_list for phone number dialed (Y|N) default N, assumes 10 digit phone numbers +# ; 10. if 9 is Y, this is search method (ALLLISTS|PHONE) default ALLLISTS, search all lists, use phone setting, CURRENTLY DOES NOTHING +# ; 11. error out and end call if phone number is not found (Y|N) default N +# ; 12. run the phone entry's NVA Call URL (Y|N) default N # # ;custom dialplan entry example: (similar to the defaultlog Call Menu) #exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---N---Y---N---N---N) @@ -30,6 +34,9 @@ # ; example of using as Call Menu prompt to record with playing of recording id #agi-NVA_recording.agi,BOTH------Y---N---Y---N---Y---Y # +# ; example of using as Call Menu prompt to record, search for phone number, run NVA call URL and error if not found +#agi-NVA_recording.agi,BOTH------Y---N---Y---N---N---N---Y---ALLLISTS---Y---Y +# # Copyright (C) 2015 Matt Florell LICENSE: AGPLv2 # # CHANGELOG @@ -40,6 +47,7 @@ # 130326-1510 - Added lead_id and user logging from vicidial values # 141124-2309 - Fixed Fhour variable bug # 150915-1824 - Added recording ID play and filename options +# 151211-0932 - Added phone search and phone NVA URL features # &get_time_now; @@ -143,6 +151,10 @@ if (length($ARGV[0])>1) $double_log = $ARGV_vars[5]; $play_recid = $ARGV_vars[6]; $file_recid = $ARGV_vars[7]; + $search_phone = $ARGV_vars[8]; + $search_method = $ARGV_vars[9]; + $search_error = $ARGV_vars[10]; + $phone_url = $ARGV_vars[11]; if ($AGI_output =~ /STDERR/) {$AGILOG = '1';} if ($AGI_output =~ /FILE/) {$AGILOG = '2';} @@ -247,6 +259,133 @@ else if (length($user) > 0) {$accountcode = $user;} + +if ( ($search_phone =~ /Y/) || ($phone_url =~ /Y/) ) + { + ### Grab phone NVA values from the database phones table + $stmtA = "SELECT nva_call_url,nva_search_method,nva_error_filename FROM phones where extension='$accountcode' and server_ip = '$VARserver_ip';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $nva_call_url = $aryA[0]; + $nva_search_method = $aryA[1]; + $nva_error_filename = $aryA[2]; + } + $sthA->finish(); + } + +$temp_phone = $extension; +$search_lead_id = 'NOTFOUND'; +if ($search_phone =~ /Y/) + { + while (length($temp_phone) > 10) + {$temp_phone =~ s/^.//gi;} + $stmtA = "SELECT lead_id FROM vicidial_list where phone_number='$temp_phone' order by entry_date desc limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $search_lead_id = $aryA[0]; + } + else + { + if ($search_error =~ /Y/) + { + $temp_error_filename = 'invalid'; + if (length($nva_error_filename) > 0 ) + {$temp_error_filename = $nva_error_filename;} + $AGI->stream_file('sip-silence'); + $AGI->stream_file('sip-silence'); + $AGI->stream_file('silence'); + $AGI->stream_file("$temp_error_filename"); + + sleep(3); + $AGI->hangup(); + + exit; + } + } + $sthA->finish(); + } + +if ( ( (length($lead_id)<1) || ($lead_id < 1) ) && ($search_lead_id !~ /NOTFOUND/) ) + {$lead_id = $search_lead_id;} + +if ( ($phone_url =~ /Y/) && (length($nva_call_url) > 8) ) + { + ### first, find curl binary + $curlbin = ''; + if ( -e ('/bin/curl')) {$curlbin = '/bin/curl';} + else + { + if ( -e ('/usr/bin/curl')) {$curlbin = '/usr/bin/curl';} + else + { + if ( -e ('/usr/local/bin/curl')) {$curlbin = '/usr/local/bin/curl';} + else + { + if ($AGILOG) {$agi_string = "ERROR: cannot do nva URL, curl binary not found"; &agi_output;} + } + } + } + if ( (length($curlbin) > 4) && ($nva_call_url =~ /http/i) ) + { + $nva_call_url =~ s/^VAR|^ //gi; + $nva_call_url =~ s/--A--phone_number--B--/$temp_phone/gi; + $nva_call_url =~ s/--A--uniqueid--B--/$unique_id/gi; + $nva_call_url =~ s/--A--lead_id--B--/$search_lead_id/gi; + $nva_call_url =~ s/--A--extension--B--/$accountcode/gi; + $nva_call_url =~ s/--A--channel--B--/$channel/gi; + $nva_call_url =~ s/--A--server_ip--B--/$VARserver_ip/gi; + $nva_call_url =~ s/&/\\&/gi; + $nva_call_url =~ s/ /+/gi; + + ### insert a new url log entry + $SQL_log = "$nva_call_url"; + $SQL_log =~ s/;|\||\\//gi; + $stmtA = "INSERT INTO vicidial_url_log SET uniqueid='$unique_id',url_date=NOW(),url_type='nva_phone',url='$SQL_log',url_response='';"; + $affected_rows = $dbhA->do($stmtA); + $stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;"; + $sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $url_id = $aryA[0]; + } + $sthA->finish(); + my $secW = time(); + + @curl_output = `$curlbin $nva_call_url`; + + my $secY = time(); + my $response_sec = ($secY - $secW); + + $k=0; + $full_output=''; + foreach (@curl_output) + { + $full_output_raw .= $curl_output[$k]; + $k++; + } + $full_output = $full_output_raw; + $full_output =~ s/\D//gi; + ### update url log entry + $full_output_raw =~ s/;|\||\\//gi; + $stmtA = "UPDATE vicidial_url_log SET url_response='$full_output_raw|$full_output',response_sec='$response_sec' where url_log_id='$url_id';"; + $affected_rows = $dbhA->do($stmtA); + + if ($AGILOG) {$agi_string = "phone NVA URL response: |$search_lead_id|$full_output|$nva_call_url|$affected_rows|"; &agi_output;} + } + } + + ### if set to record this call, start recording ### if ($record_call =~ /Y/) { @@ -292,6 +431,7 @@ if ($record_call =~ /Y/) } + ### if set to user log this call, insert user_call_log entry ### if ($log_user_call =~ /Y/) { diff --git a/docs/conf_examples/extensions.conf.sample b/docs/conf_examples/extensions.conf.sample index e15434c4..b9f60b94 100644 --- a/docs/conf_examples/extensions.conf.sample +++ b/docs/conf_examples/extensions.conf.sample @@ -18,6 +18,9 @@ SIPtrunk=SIP/1234:PASSWORD@sip.provider.net ; SIP trunk ; exten => _XXXXXXXXXX,1,AGI(agi-DID_route.agi) ; use this one instead of the one below if you are having delay issues, and match to number of received digits exten => _X.,1,AGI(agi-DID_route.agi) +; If you have DIDs that arrive with a plus and 1 at the beginning that you want to filter out, then uncomment +;exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1) + ; FastAGI for VICIDIAL/astGUIclient call logging exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME}) diff --git a/docs/conf_examples/extensions.conf.sample-1.4 b/docs/conf_examples/extensions.conf.sample-1.4 index 2f731f13..949e1658 100644 --- a/docs/conf_examples/extensions.conf.sample-1.4 +++ b/docs/conf_examples/extensions.conf.sample-1.4 @@ -21,6 +21,9 @@ exten => _X.,1,AGI(agi-DID_route.agi) ; If you have DIDs that arrive with a plus sign at the beginning then uncomment ;exten => _+X.,1,AGI(agi-DID_route.agi) +; If you have DIDs that arrive with a plus and 1 at the beginning that you want to filter out, then uncomment +;exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1) + ; FastAGI for VICIDIAL/astGUIclient call logging exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME}) diff --git a/docs/conf_examples/extensions.conf.sample-1.8 b/docs/conf_examples/extensions.conf.sample-1.8 index 8ddc11d2..75b72c16 100644 --- a/docs/conf_examples/extensions.conf.sample-1.8 +++ b/docs/conf_examples/extensions.conf.sample-1.8 @@ -21,6 +21,8 @@ exten => _X.,n,Hangup() ; If you have DIDs that arrive with a plus sign at the beginning then uncomment ;exten => _+X.,1,AGI(agi-DID_route.agi) ;exten => _+X.,n,Hangup() +; If you have DIDs that arrive with a plus and 1 at the beginning that you want to filter out, then uncomment +;exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1) ; FastAGI for VICIDIAL/astGUIclient call logging exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME}) diff --git a/docs/conf_examples/voicemail.conf.sample-1.8 b/docs/conf_examples/voicemail.conf.sample-1.8 index 9dc3e837..5a116da3 100644 --- a/docs/conf_examples/voicemail.conf.sample-1.8 +++ b/docs/conf_examples/voicemail.conf.sample-1.8 @@ -12,7 +12,7 @@ maxsilence=10 silencethreshold=128 maxlogins=3 maxmsg=500 -maxsec=300 +maxsecs=300 emailbody=Dear ${VM_NAME}:\n\n\tJust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CIDNAME} ${VM_CIDNUM}, on ${VM_DATE}, so you might\nwant to check it when you get a chance. Thanks!\n\n\t\t\t\t--PBX\n [zonemessages] diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index debad868..6ad8a66f 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -89,6 +89,9 @@ voicemail_instructions ENUM('Y','N') default 'Y', on_login_report enum('Y','N') NOT NULL default 'N', unavail_dialplan_fwd_exten VARCHAR(40) default '', unavail_dialplan_fwd_context VARCHAR(100) default '', +nva_call_url TEXT, +nva_search_method VARCHAR(40) default 'NONE', +nva_error_filename VARCHAR(255) default '', index (server_ip), index (voicemail_id), index (dialplan_number), @@ -3646,4 +3649,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version'; UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1439',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1440',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.12.sql b/extras/upgrade_2.12.sql index d580af3b..e459f90f 100644 --- a/extras/upgrade_2.12.sql +++ b/extras/upgrade_2.12.sql @@ -400,3 +400,9 @@ ALTER TABLE phones ADD unavail_dialplan_fwd_exten VARCHAR(40) default ''; ALTER TABLE phones ADD unavail_dialplan_fwd_context VARCHAR(100) default ''; UPDATE system_settings SET db_schema_version='1439',db_schema_update_date=NOW() where db_schema_version < 1439; + +ALTER TABLE phones ADD nva_call_url TEXT; +ALTER TABLE phones ADD nva_search_method VARCHAR(40) default 'NONE'; +ALTER TABLE phones ADD nva_error_filename VARCHAR(255) default ''; + +UPDATE system_settings SET db_schema_version='1440',db_schema_update_date=NOW() where db_schema_version < 1440; diff --git a/www/vicidial/AST_url_log_report.php b/www/vicidial/AST_url_log_report.php index 41a61a67..426c19ec 100644 --- a/www/vicidial/AST_url_log_report.php +++ b/www/vicidial/AST_url_log_report.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2015 Joe Johnson, Matt Florell LICENSE: AGPLv2 # # CHANGES # 130620-0806 - First build @@ -9,6 +9,7 @@ # 140108-0732 - Added webserver and hostname to report logging # 141114-0713 - Finalized adding QXZ translation to all admin files # 141230-1415 - Added code for on-the-fly language translations display +# 151211-0950 - Added missing url types # $startMS = microtime(); @@ -206,7 +207,7 @@ while($i < $url_type_ct) $i++; } -$LISTurltypes=array("add_lead", "custom", "dispo", "na_callurl", "non-agent", "other", "qm_socket", "start", "start_ra"); +$LISTurltypes=array("add_lead", "custom", "dispo", "na_callurl", "non-agent", "other", "qm_socket", "start", "start_ra","nva_phone","DID_FILTER","park_ivr_c"); $url_types_to_print=count($LISTurltypes); $i=0; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 036c8757..bb62b7de 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -2004,6 +2004,12 @@ if (isset($_GET["unavail_dialplan_fwd_exten"])) {$unavail_dialplan_fwd_exten elseif (isset($_POST["unavail_dialplan_fwd_exten"])) {$unavail_dialplan_fwd_exten=$_POST["unavail_dialplan_fwd_exten"];} if (isset($_GET["unavail_dialplan_fwd_context"])) {$unavail_dialplan_fwd_context=$_GET["unavail_dialplan_fwd_context"];} elseif (isset($_POST["unavail_dialplan_fwd_context"])) {$unavail_dialplan_fwd_context=$_POST["unavail_dialplan_fwd_context"];} +if (isset($_GET["nva_call_url"])) {$nva_call_url=$_GET["nva_call_url"];} + elseif (isset($_POST["nva_call_url"])) {$nva_call_url=$_POST["nva_call_url"];} +if (isset($_GET["nva_search_method"])) {$nva_search_method=$_GET["nva_search_method"];} + elseif (isset($_POST["nva_search_method"])) {$nva_search_method=$_POST["nva_search_method"];} +if (isset($_GET["nva_error_filename"])) {$nva_error_filename=$_GET["nva_error_filename"];} + elseif (isset($_POST["nva_error_filename"])) {$nva_error_filename=$_POST["nva_error_filename"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -2812,6 +2818,7 @@ if ($non_latin < 1) $status_group_id = preg_replace('/[^-_0-9a-zA-Z]/','',$status_group_id); $unavail_dialplan_fwd_exten = preg_replace('/[^-_0-9a-zA-Z]/','',$unavail_dialplan_fwd_exten); $unavail_dialplan_fwd_context = preg_replace('/[^-_0-9a-zA-Z]/','',$unavail_dialplan_fwd_context); + $nva_search_method = preg_replace('/[^-_0-9a-zA-Z]/','',$nva_search_method); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_timeout_prompt); @@ -2857,6 +2864,7 @@ if ($non_latin < 1) $old_voicemail_greeting = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$old_voicemail_greeting); $meetme_enter_login_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$meetme_enter_login_filename); $meetme_enter_leave3way_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$meetme_enter_leave3way_filename); + $nva_error_filename = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$nva_error_filename); ### ALPHA-NUMERIC and underscore and dash and slash and dot and comma $menu_prompt = preg_replace('/[^-\/\|\,\._0-9a-zA-Z]/','',$menu_prompt); @@ -3090,6 +3098,7 @@ if ($non_latin < 1) # $na_call_url # $web_form_address_three # $container_entry + # $nva_call_url ### VARIABLES not filtered at all ### # $script_text @@ -3642,12 +3651,13 @@ else # 151125-0010 - Added oldest_logs_date display field to system settings # 151203-2142 - Added links to search page from called counts within this list table of list modify page # 151204-0615 - Added phone options to have call go to dialplan extension instead of voicemail if phone not answered +# 151211-0940 - Added phone options for NVA recording agi script # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.12-522a'; -$build = '151204-0615'; +$admin_version = '2.12-523a'; +$build = '151211-0940'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -14638,7 +14648,7 @@ if ($ADD==41111111111) if ( ($voicemail_greeting == '') and (strlen($old_voicemail_greeting) > 0) ) {$voicemail_greeting = '---DELETE---';} - $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='" . mysqli_real_escape_string($link, $local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysqli_real_escape_string($link, $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',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',voicemail_instructions='$voicemail_instructions',on_login_report='$show_vm_on_summary',unavail_dialplan_fwd_exten='$unavail_dialplan_fwd_exten',unavail_dialplan_fwd_context='$unavail_dialplan_fwd_context' 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='" . mysqli_real_escape_string($link, $local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysqli_real_escape_string($link, $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',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',voicemail_instructions='$voicemail_instructions',on_login_report='$show_vm_on_summary',unavail_dialplan_fwd_exten='$unavail_dialplan_fwd_exten',unavail_dialplan_fwd_context='$unavail_dialplan_fwd_context', nva_call_url='" . mysqli_real_escape_string($link, $nva_call_url) . "', nva_search_method='$nva_search_method', nva_error_filename='$nva_error_filename' where extension='$old_extension' and server_ip='$old_server_ip';"; $rslt=mysql_to_mysqli($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';"; @@ -29908,7 +29918,7 @@ if ($ADD==31111111111) echo "\n"; echo "\n"; echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; diff --git a/www/vicidial/help.php b/www/vicidial/help.php index d48fc818..31c8e191 100644 --- a/www/vicidial/help.php +++ b/www/vicidial/help.php @@ -68,6 +68,7 @@ # 151104-1541 - Added am_message_wildcards entry # 151121-1144 - Added cache_carrier_stats_realtime # 151204-0635 - Added phones-unavail_dialplan_fwd_exten +# 151209-1437 - Added phones-nva entries # @@ -4057,6 +4058,21 @@ if ($SSoutbound_autodial_active > 0)
- +
+ +
+ - + +
+
+
+ - + +
+
+
+ - +

\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,webphone_auto_answer,voicemail_timezone,voicemail_options,user_group,voicemail_greeting,voicemail_dump_exten_no_inst,voicemail_instructions,on_login_report,unavail_dialplan_fwd_exten,unavail_dialplan_fwd_context from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; + $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,voicemail_timezone,voicemail_options,user_group,voicemail_greeting,voicemail_dump_exten_no_inst,voicemail_instructions,on_login_report,unavail_dialplan_fwd_exten,unavail_dialplan_fwd_context,nva_call_url,nva_search_method,nva_error_filename from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); @@ -30012,6 +30022,11 @@ if ($ADD==31111111111) echo "
"._QXZ("Outbound Call Group").": $NWB#phones-call_out_number_group$NWE
"._QXZ("CallerID URL").": $NWB#phones-local_web_callerID_URL$NWE
"._QXZ("Agent Default URL").": $NWB#phones-agent_web_URL$NWE
"._QXZ("NVA Call URL").": $NWB#phones-nva_call_url$NWE
"._QXZ("NVA Search Method").": $NWB#phones-nva_search_method$NWE
"._QXZ("NVA Error Filename").": "._QXZ("audio chooser")." $NWB#phones-nva_error_filename$NWE
"._QXZ("Call Logging").": $NWB#phones-AGI_call_logging_enabled$NWE
"._QXZ("User Switching").": $NWB#phones-user_switching_enabled$NWE
"._QXZ("Conferencing").": $NWB#phones-conferencing_enabled$NWE