From 3716a7fea9f1eb705d5d45f578ff5d4108340ad7 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 7 Jul 2006 15:40:37 +0000 Subject: [PATCH] cleanup of LANG git-svn-id: svn://192.168.202.10@16 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../LANG_agc/agc/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc/astguiclient.php | 2874 ---------- .../LANG_agc/agc/call_log_display.php | 181 - .../LANG_agc/agc/conf_exten_check.php | 213 - .../trunk/LANG_agc/LANG_agc/agc/dbconnect.php | 15 - .../agc/images/agc_check_voicemail_BLINK.gif | Bin 2627 -> 0 bytes .../images/agc_check_voicemail_BLINK_e.gif | Bin 780 -> 0 bytes .../agc/images/agc_check_voicemail_OFF.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_OFF_es.gif | Bin 785 -> 0 bytes .../agc/images/agc_check_voicemail_ON.gif | Bin 919 -> 0 bytes .../agc/images/agc_check_voicemail_ON_es.gif | Bin 781 -> 0 bytes .../LANG_agc/agc/images/agc_live_call_OFF.gif | Bin 541 -> 0 bytes .../agc/images/agc_live_call_OFF_es.gif | Bin 513 -> 0 bytes .../LANG_agc/agc/images/agc_live_call_ON.gif | Bin 793 -> 0 bytes .../agc/images/agc_live_call_ON_es.gif | Bin 871 -> 0 bytes .../agc/images/agc_tab_active_lines.gif | Bin 886 -> 0 bytes .../agc/images/agc_tab_active_lines_es.gif | Bin 704 -> 0 bytes .../agc/images/agc_tab_astguiclient.gif | Bin 1092 -> 0 bytes .../agc/images/agc_tab_conferences.gif | Bin 928 -> 0 bytes .../agc/images/agc_tab_conferences_es.gif | Bin 718 -> 0 bytes .../LANG_agc/agc/images/agc_tab_main.gif | Bin 596 -> 0 bytes .../LANG_agc/agc/images/agc_tab_main_es.gif | Bin 541 -> 0 bytes .../LANG_agc/LANG_agc/agc/images/blank.gif | Bin 43 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/de.gif | Bin 162 -> 0 bytes .../LANG_agc/LANG_agc/agc/images/down.gif | Bin 169 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/el.gif | Bin 245 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/en.gif | Bin 322 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/es.gif | Bin 222 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/fr.gif | Bin 217 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/it.gif | Bin 198 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/pt.gif | Bin 208 -> 0 bytes .../LANG_agc/LANG_agc/agc/images/remove.gif | Bin 176 -> 0 bytes .../trunk/LANG_agc/LANG_agc/agc/images/up.gif | Bin 169 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber.gif | Bin 831 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_OFF.gif | Bin 827 -> 0 bytes .../images/vdc_LB_dialnextnumber_OFF_es.gif | Bin 914 -> 0 bytes .../agc/images/vdc_LB_dialnextnumber_es.gif | Bin 914 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall.gif | Bin 804 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_OFF.gif | Bin 802 -> 0 bytes .../images/vdc_LB_grabparkedcall_OFF_es.gif | Bin 827 -> 0 bytes .../agc/images/vdc_LB_grabparkedcall_es.gif | Bin 826 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer.gif | Bin 803 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_LB_hangupcustomer_OFF_es.gif | Bin 693 -> 0 bytes .../agc/images/vdc_LB_hangupcustomer_es.gif | Bin 697 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_parkcall.gif | Bin 601 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF.gif | Bin 607 -> 0 bytes .../agc/images/vdc_LB_parkcall_OFF_es.gif | Bin 644 -> 0 bytes .../agc/images/vdc_LB_parkcall_es.gif | Bin 646 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause.gif | Bin 483 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause_OFF.gif | Bin 483 -> 0 bytes .../agc/images/vdc_LB_pause_OFF_es.gif | Bin 404 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_pause_es.gif | Bin 410 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume.gif | Bin 535 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume_OFF.gif | Bin 533 -> 0 bytes .../agc/images/vdc_LB_resume_OFF_es.gif | Bin 495 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_resume_es.gif | Bin 500 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_senddtmf.gif | Bin 567 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_OFF_es.gif | Bin 563 -> 0 bytes .../agc/images/vdc_LB_senddtmf_es.gif | Bin 564 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_spacer.gif | Bin 90 -> 0 bytes .../agc/images/vdc_LB_startrecording.gif | Bin 778 -> 0 bytes .../agc/images/vdc_LB_startrecording_OFF.gif | Bin 778 -> 0 bytes .../images/vdc_LB_startrecording_OFF_es.gif | Bin 788 -> 0 bytes .../agc/images/vdc_LB_startrecording_es.gif | Bin 788 -> 0 bytes .../agc/images/vdc_LB_stoprecording.gif | Bin 758 -> 0 bytes .../agc/images/vdc_LB_stoprecording_OFF.gif | Bin 757 -> 0 bytes .../images/vdc_LB_stoprecording_OFF_es.gif | Bin 701 -> 0 bytes .../agc/images/vdc_LB_stoprecording_es.gif | Bin 699 -> 0 bytes .../agc/images/vdc_LB_transferconf.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF.gif | Bin 732 -> 0 bytes .../agc/images/vdc_LB_transferconf_OFF_es.gif | Bin 712 -> 0 bytes .../agc/images/vdc_LB_transferconf_es.gif | Bin 714 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_webform.gif | Bin 542 -> 0 bytes .../agc/images/vdc_LB_webform_OFF.gif | Bin 615 -> 0 bytes .../agc/images/vdc_LB_webform_OFF_es.gif | Bin 661 -> 0 bytes .../LANG_agc/agc/images/vdc_LB_webform_es.gif | Bin 583 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_ammessage.gif | Bin 396 -> 0 bytes .../agc/images/vdc_XB_ammessage_OFF.gif | Bin 403 -> 0 bytes .../agc/images/vdc_XB_blindtransfer.gif | Bin 774 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_OFF.gif | Bin 774 -> 0 bytes .../images/vdc_XB_blindtransfer_OFF_es.gif | Bin 758 -> 0 bytes .../agc/images/vdc_XB_blindtransfer_es.gif | Bin 758 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_channel.gif | Bin 314 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_channel_es.gif | Bin 242 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_code.gif | Bin 247 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF.gif | Bin 881 -> 0 bytes .../images/vdc_XB_dialwithcustomer_OFF_es.gif | Bin 776 -> 0 bytes .../agc/images/vdc_XB_dialwithcustomer_es.gif | Bin 776 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines.gif | Bin 849 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_OFF.gif | Bin 849 -> 0 bytes .../images/vdc_XB_hangupbothlines_OFF_es.gif | Bin 809 -> 0 bytes .../agc/images/vdc_XB_hangupbothlines_es.gif | Bin 809 -> 0 bytes .../agc/images/vdc_XB_hangupxferline.gif | Bin 803 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_OFF.gif | Bin 803 -> 0 bytes .../images/vdc_XB_hangupxferline_OFF_es.gif | Bin 702 -> 0 bytes .../agc/images/vdc_XB_hangupxferline_es.gif | Bin 702 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_header.gif | Bin 884 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_header_es.gif | Bin 639 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive.gif | Bin 791 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_OFF.gif | Bin 786 -> 0 bytes .../vdc_XB_hotkeysactive_OFF_es-orig.gif | Bin 1231 -> 0 bytes .../images/vdc_XB_hotkeysactive_OFF_es.gif | Bin 1256 -> 0 bytes .../agc/images/vdc_XB_hotkeysactive_es.gif | Bin 1231 -> 0 bytes .../agc/images/vdc_XB_hotkeysinactive_es.gif | Bin 1256 -> 0 bytes .../agc/images/vdc_XB_internalcloser.gif | Bin 801 -> 0 bytes .../agc/images/vdc_XB_internalcloser_OFF.gif | Bin 801 -> 0 bytes .../images/vdc_XB_internalcloser_OFF_es.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_internalcloser_es.gif | Bin 640 -> 0 bytes .../agc/images/vdc_XB_leave3waycall.gif | Bin 816 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_OFF.gif | Bin 816 -> 0 bytes .../images/vdc_XB_leave3waycall_OFF_es.gif | Bin 834 -> 0 bytes .../agc/images/vdc_XB_leave3waycall_es.gif | Bin 834 -> 0 bytes .../agc/images/vdc_XB_localcloser.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF.gif | Bin 728 -> 0 bytes .../agc/images/vdc_XB_localcloser_OFF_es.gif | Bin 607 -> 0 bytes .../agc/images/vdc_XB_localcloser_es.gif | Bin 606 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_number.gif | Bin 480 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_number_es.gif | Bin 416 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF.gif | Bin 896 -> 0 bytes .../images/vdc_XB_parkcustomerdial_OFF_es.gif | Bin 661 -> 0 bytes .../agc/images/vdc_XB_parkcustomerdial_es.gif | Bin 659 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_seconds.gif | Bin 352 -> 0 bytes .../LANG_agc/agc/images/vdc_XB_seconds_es.gif | Bin 333 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_script.gif | Bin 825 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_script_es.gif | Bin 916 -> 0 bytes .../LANG_agc/agc/images/vdc_tab_vicidial.gif | Bin 866 -> 0 bytes .../LANG_agc/LANG_agc/agc/inbound_popup.php | 335 -- .../LANG_agc/agc/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc/manager_send.php | 882 ---- .../LANG_agc/agc/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc/vdc_db_query.php | 1289 ----- .../trunk/LANG_agc/LANG_agc/agc/vicidial.php | 4633 ----------------- .../LANG_agc/LANG_agc/agc/voicemail_check.php | 130 - .../LANG_agc/agc_de/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_de/astguiclient.php | 2874 ---------- .../LANG_agc/agc_de/call_log_display.php | 181 - .../LANG_agc/agc_de/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_de/dbconnect.php | 15 - .../LANG_agc/agc_de/inbound_popup.php | 335 -- .../LANG_agc/agc_de/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_de/manager_send.php | 882 ---- .../LANG_agc/agc_de/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_de/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_de/vicidial.php | 4633 ----------------- .../LANG_agc/agc_de/voicemail_check.php | 130 - .../LANG_agc/agc_el/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_el/astguiclient.php | 2874 ---------- .../LANG_agc/agc_el/call_log_display.php | 181 - .../LANG_agc/agc_el/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_el/dbconnect.php | 15 - .../LANG_agc/agc_el/inbound_popup.php | 335 -- .../LANG_agc/agc_el/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_el/manager_send.php | 882 ---- .../LANG_agc/agc_el/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_el/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_el/vicidial.php | 4633 ----------------- .../LANG_agc/agc_el/voicemail_check.php | 130 - .../LANG_agc/agc_en/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_en/astguiclient.php | 2874 ---------- .../LANG_agc/agc_en/call_log_display.php | 181 - .../LANG_agc/agc_en/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_en/dbconnect.php | 15 - .../LANG_agc/agc_en/inbound_popup.php | 335 -- .../LANG_agc/agc_en/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_en/manager_send.php | 882 ---- .../LANG_agc/agc_en/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_en/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_en/vicidial.php | 4633 ----------------- .../LANG_agc/agc_en/voicemail_check.php | 130 - .../LANG_agc/agc_es/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_es/astguiclient.php | 2874 ---------- .../LANG_agc/agc_es/call_log_display.php | 181 - .../LANG_agc/agc_es/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_es/dbconnect.php | 15 - .../LANG_agc/agc_es/inbound_popup.php | 335 -- .../LANG_agc/agc_es/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_es/manager_send.php | 882 ---- .../LANG_agc/agc_es/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_es/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_es/vicidial.php | 4633 ----------------- .../LANG_agc/agc_es/voicemail_check.php | 130 - .../LANG_agc/agc_fr/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_fr/astguiclient.php | 2874 ---------- .../LANG_agc/agc_fr/call_log_display.php | 181 - .../LANG_agc/agc_fr/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_fr/dbconnect.php | 15 - .../LANG_agc/LANG_agc/agc_fr/htglobalize.php | 23 - .../LANG_agc/agc_fr/inbound_popup.php | 335 -- .../LANG_agc/agc_fr/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_fr/manager_send.php | 882 ---- .../LANG_agc/agc_fr/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_fr/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_fr/vicidial.php | 4633 ----------------- .../LANG_agc/agc_fr/voicemail_check.php | 130 - .../LANG_agc/agc_it/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_it/astguiclient.php | 2874 ---------- .../LANG_agc/agc_it/call_log_display.php | 181 - .../LANG_agc/agc_it/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_it/dbconnect.php | 15 - .../LANG_agc/agc_it/inbound_popup.php | 335 -- .../LANG_agc/agc_it/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_it/manager_send.php | 882 ---- .../LANG_agc/agc_it/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_it/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_it/vicidial.php | 4633 ----------------- .../LANG_agc/agc_it/voicemail_check.php | 130 - .../LANG_agc/agc_pt/active_list_refresh.php | 446 -- .../LANG_agc/LANG_agc/agc_pt/astguiclient.php | 2874 ---------- .../LANG_agc/agc_pt/call_log_display.php | 181 - .../LANG_agc/agc_pt/conf_exten_check.php | 213 - .../LANG_agc/LANG_agc/agc_pt/dbconnect.php | 15 - .../LANG_agc/agc_pt/inbound_popup.php | 335 -- .../LANG_agc/agc_pt/live_exten_check.php | 263 - .../LANG_agc/LANG_agc/agc_pt/manager_send.php | 882 ---- .../LANG_agc/agc_pt/park_calls_display.php | 136 - .../LANG_agc/LANG_agc/agc_pt/vdc_db_query.php | 1289 ----- .../LANG_agc/LANG_agc/agc_pt/vicidial.php | 4633 ----------------- .../LANG_agc/agc_pt/voicemail_check.php | 130 - 222 files changed, 91199 deletions(-) delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_ON.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_ON_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_astguiclient.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_conferences.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_conferences_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_main.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_main_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/blank.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/de.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/down.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/el.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/en.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/fr.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/it.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/pt.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/remove.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/up.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_pause.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_pause_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_pause_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_pause_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_spacer.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_ammessage.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_ammessage_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_blindtransfer.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_blindtransfer_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_blindtransfer_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_blindtransfer_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_channel.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_channel_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_code.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysinactive_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_seconds.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_seconds_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_tab_script.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_tab_script_es.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_tab_vicidial.gif delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/htglobalize.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/voicemail_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/active_list_refresh.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/astguiclient.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/call_log_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/conf_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/dbconnect.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/inbound_popup.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/live_exten_check.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/manager_send.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/park_calls_display.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vdc_db_query.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vicidial.php delete mode 100644 agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/voicemail_check.php diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/active_list_refresh.php deleted file mode 100644 index 301e5ed7..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "List Display: "; -if ($ADD==1) {echo "Live Extensions";} -if ($ADD==2) {echo "Busy Extensions";} -if ($ADD==3) {echo "Outside Lines";} -if ($ADD==4) {echo "Local Extensions";} -if ($ADD==5) {echo "Conferences";} -if ($ADD==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/astguiclient.php deleted file mode 100644 index 5b1da59d..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "astGUIclient web client: Login\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login
 
User Login:
User Password:
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Phone Login
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Phone Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Phone Login
 
Sorry, your phone login and password are not active in this system, please try again:
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -LOGOUT
\n"; ?> -
Main PanelActive Lines PanelConferences PanelCheck VoicemailLive Call
-
- - -

Logout
-
- - -
TRUNK HANGUP

- Active Trunks Menu
- Hangup Trunk   |   - Hijack Trunk   |   - Listen Trunk   |   - Refresh   |   - Back to Main Window -
-
- - -
LOCAL HANGUP

- Active Local Menu
- Hangup Local   |   - Hijack Local   |   - Listen Local   |   - Refresh   |   - Back to Main Window -
-
- - - - - - - -
LIVE CALL TRANSFER
Channel to be transferred: Channel
Extensions:
Extensions Menu
-
- Send to selected extension

- Send to selected vmail box

- Send to this number:


- Refresh


- Back to Main Window

-
Conferences:
(click on a number below to send to a conference)
Send my channel too
Conferences Menu
-
- - - - - -
LOCAL Extensions Dial
Phone calling from: Channel
Extensions:
Extensions Menu
-
- Call selected extension

- Call selected vmail box

- Refresh


- Back to Main Window

-
-
- - -
PARKED CALLS:
- Back to Main Window

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NEW:     OLD:             MANUAL DIAL       DIAL
PARKED CALLS: 0                LOCAL DIAL EXTENSIONS
OUTBOUND CALLS:
INBOUND CALLS:
astGUIclient web-client VERSION: BUILD:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORITES       edit
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORITES

 
SUBMIT FAVORITES CHANGES - requires logout
BACK TO MAIN WINDOW - ignore changes made
-
- -
- - - - - - - - - - - - - -
-PAUSE | START     Refresh rate: 1000 ms Faster | Slower

-
Initializing..
-
Active Extensions
-REFRESH | -ORDER | -
Outside Lines
-REFRESH | -ORDER | -
Local Extensions
-REFRESH | -ORDER | -
- Data Goes Here

-
- Data Goes Here

Trunk Action -
- Data Goes Here

Local Action -
-
- - - - -
- - -Conferences List - - - -
-Click on a conference room number on the left for info on that conference -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/call_log_display.php deleted file mode 100644 index 79187564..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Call Log Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/conf_exten_check.php deleted file mode 100644 index 671d29ba..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ChannelA[$counter] ~"; - # echo "$ChannelA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid or Exten $exten is not valid\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conference $conf_exten has been registered to $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK.gif deleted file mode 100644 index 30703a781b7c0372eb9970cc001f1d8f0c5afba1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2627 zcmb`|dpr{g8^G~tqm7+%G8&ncgSL(eNulWCmRwSjQ)n)Qj@&kkp=}IfvY7k*Hfzdt z$EJ~6q+ANQU&7o*Zi&+6_3HFF?>V3M^Zxlhe?5Obe|$f`$M}NLNo_|qKmqU!2`Db^ z?R``g7x%o3{(Qb~xaEFEkR6?F=RPs?4v*)j`||AU=mRaIR#u)X!WBL~%G1jB)B0v} z&1iE;A3L(i)8<}#8Z$4rwkGFQrCX4jTcwkgXH#)6!>w}b&pEIqVPR-}<^0)8h8joI zfFb|@;J_wGR0DtnsBZ6o?`Hr+x5f|NcX7{hW0!a=JoQ$6g}eI}U$Pv$yj7p$ZK5g{ z*E$8M_t43H&BB>JzFs=uVM7OtbH>Z?W=F7l$GieNJoyh@H7}hh9bW!a6Z&fT%NCJz z4RQezEe<=SHLl6Srk`1e9}?hNK5tA_iOoCVNl^`){en?xj}H{(2!uqz|hE) z0ssOYgwl2mQ^yqYSEj+4fWc8=#pAVWC7EI&3InpLS37M^?iPS`%rqAz(LsygtS?C> z^17gxY8tEf-9(U2f$!G0;q|y2kjTN+@()DQf|k@hbi|tt!+j^oACyqY5P&bsd+E`pYl;02LrjX*emjI`3sHFjDtVX zEN|Yl9GHvk0VJ#F1{xL~J6IBR*G#02pPa8-Bso7P`^e_2GIfNea?%1(AH2Xj;B8LXq<}k^WuX-u3$F1`Mae zGJ~2T9x5nPzIx508kcuTMkd_RLC?0*Y#}ql|MNNUpPXUeIqw080;mAk zch39&!TBf?3isINyijqri@(j;dOf&~!JOoIgG-EC$YaKnO`>B!s7? zJA0eJ@UTd~IG~>t#y^$gN2{&kiSOb&HCG~`O`Kig2r0ji*2uWmoa)FL9!5Meh2K}? zSZZJX#4q1(*HATr&*jA@_bseQLFYT2`g*(ipuiPnf=mZOCkT`Pna7$WWcnw)Qv(A_ za^SwcI_B?)j>KblrZYXN2x8WD2l-A8=XsF4_dL?7V7AQp9HK7IX_M|;8heY{qVDQ#KM)q;swGE@bG^J4Qh&N;knDJV1LSi2 z#!ikZft35rW?g&MLbOV%QrGO+#ZXe4s!{OX5({$Owa;zWKd<%Es?lAu5$#aMde2u3 zVMg!US3taoJrN}1HckRKeP}lL6{@+I|L$bzI?VffC)f`N0 z>t{##B~U3iks2MOC>wXv!&uZy6v-?KXNuS{L0LsbC52_khe*Hjn?(sl zyE)7oBFw6?q`G1dzmn@+CS(6NrYXnc`XhEDv$S2ds}e^jQhdoS^P=_)YO>0@{}>(M z4|2m~Uo@>1FY)_J=HJ{kTAhe=ZR7eNUH)KCT^v>22pN4O!wQJSaF!iWKA*5J(6?z{0jO zM05)vn3rv6S@zsZ14dt) zd`i@b$6^^Xv$JKnf<(Q*;9vcb5lx75J%mGcDoN J{p~X8{u>&T{`3F< diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_BLINK_e.gif deleted file mode 100644 index 600cef8995d2783ac2eee7fbb1928ba1f98ca006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmV+n1M~bxNk%w1VX6Qg0J8u9>D1N1iHggcoV$I0hFV*kVq?&yrhQjfwsUpXu(6L_ zUdEAM)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH})(hUFe-fsslWFUI- zkS??8lI#Plog^f{XrNc6S8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT z83IhTWn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J`k{0fK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)Ed-l`IlwQ?4{GWq5o43Nb#2`QOh%*>7||fq9K#rL~=%I)vs_3GOHtOi3kVY!$ Kq?CRT0RTI6+hm;p diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_OFF.gif deleted file mode 100644 index 5b7e4c758bd5acee9357c1baab87a4c0c4f7b44f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v=jZ8=kd(N%y{xRU$;r&~^YpQ?w%gm??d|UQ`T4iE zyw%m%!^6j%oT0L^x8dRAudlR^kCKOnikX?6jEs-Jzr%}*j>yQ&m6e&#&(giU!G(o~ z&CSrIrK|t{|NsC0A^8LW0018VEC2ui0IC2U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9fZ*MONd@Audv}1~J`V^6 zbja{7m^*j?DL%9Z0A4_WkOu5y5DDMJij&a)iSj|pR6-Bj-XRERuY*Z?9st~;^)eq=#5NHO|y{;8v`T6*Yp~_AX)5dpVuPlB81IBLfVTX^@Ch zr^bA3t)gYBmaR;9<|57I=%GM|gnl6b7CZMVfwfMnO6$`pA#ge9^6*XglObe(2DUvCJcO+fs%S?7NBS)P( zFd!Dt?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{SV+09Pfz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2v{F)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veOz)SJyLY$NDTzO8GHED(a}Dej0&%qf|=42CTN~>Z`EED(kGY)@tjmxaK;m1QwhcgsQp*E9|hu7E3Iz t5d_h|s>U|!?6c6?DuDz_RBP=Nwb*8>?Y7)@>+QGThAZy4M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}<_V2CXU%BXZotyYrLA+6X`$Galz<85$YLV3QL|c!TGo<* ziro^*j49TbXG2b7-UyUMFCQK=yhPxF_%~=s7)V#%Wq5 z0RDk^@2;|lJV*{IfRMxDi;bWt2#qn?c*qut*ws)U z#|TnjkVF<)q>nB1aex9$HtFP(P(m3%08v(H<&{`wspXbjGRfR50Tdtr17wzI=9y@w zspgt&w&~`ZaK_1|03x~&=9qHkspp=2_Q@xmF^K8spoA7`Xq-AEs_3GOHtOi3kVY!$ Pq?A@_>7|%{5CH%?p}u%; diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_ON.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_check_voicemail_ON.gif deleted file mode 100644 index ad55916d60f2ee323295232f3b9982245ca11034..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmV;I18Dq5Nk%w1VX6Qg0K^{v*VpTah{Rc0h;nkcq@>a7>-Btmz2V{T!^7eA_4atT@p+OT*`E|ns;rRFxUd}r$;QBu z+^>?y*uIgVigl%s3JD(X9tp%6?-`Kq0MPL8`R)7i`aEP9aNym8Nd@AudxwDFJ`V>5 zbja{7m^*j?DL%9Z0A4_WkOu5?5DDMJij&a)iSj|pR6-Bj-W>>NuY*Z?9st~;^)e`pA#ge9^6*XglObe(2DUzv!cO+fs%S?7NBS)P( zI3O0#?M-}EXDerZ+9V|c@34DlW&O4X*{!F`VtA{S;{yp(fz-Y#t#GlL(;Z*e!QIT> zGo?S@8p(bK{2w8J)icGolTbb#K;{AeF$x$2pML-n7l~sF0OweOqFMHygpiaqpD9wk zWRHGfRriil=(UDZL^uUD$x<*~^G*T)Tog-YA+}bVNsj%tonyTf@CsHWnY80~9e6kj za*$LA&jK=TwckTc?gM3VOO+N0P8veuz)SJyLY$NDTzO8GHED(a}Dema4Cqf}bK2CTN~>Z`EED(kGY)@tjmxaK-*1QnbbgsQp*E9|hu7E3Iz t69mD)s>U|!?6c6?8bJg~RBP=Nwb*8>?Y7)@>+QGThAZy4VwNk%w1VX6Qg0J8u9)YR%(S%|N%*P5Elhlj&*a=3hay;W6xq@>YcV4hrD zk&uwbQBiKItJP>|v;Y79A^8LV00000EC2ui0IC2U000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3ycz!i}@BhG{a7Zi~kH}3xM%BXZotyYBo68xBR0C57SU%!A&SVtk+geDLF92gVX(Ln`J!zSe72ucDU3Me0R zO6iiMN|O{a1~ZV8(z1mP8qVsYETo`j%7S4`Nv-7rQ!;T1z|_ka$Zb*C4Fhm>WFUI- zkS??8lI#Plog@grh@e-cS8jhkWtc~n3tISyedEYitkSu0gGu;TRc293%K{(9DCib| zk;Dq0swPevW63y$Wek~=+1#LYq2auk*k~`mo}Ky>Y&5g6qMQU~P70e7D?t>fnhyDT zSpiJ7Wn(@Ktm5j_bRjvcrBebcdRtR>UZ|E{W{xS-J{YiefK=-exKA6jd7jMZkhfpn z-raT9kkA7o2d#W)tpb~aIlwQ?4{GWq5o43Ob#2`QOh%*>7||fq9K#- diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF.gif deleted file mode 100644 index 3752fb5ec4186f9563a250d45a9fb8e76187c5d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmZ?wbhEHb%w>>cI3mFC@#Du^w{HFT@#FI4%YXj-xpwW^lP6EkpFjWq|NqyoUw{4j z^}&M&@7}$;d-v}1=g-faIRg}DAO$G?WMO1r5Ma;&X#&~F!1`Z7r7tCOUdF0*Ij{E> z=$tRfyrP{#Hr_vwUI8lJNk*U9{O_hs% zPLDEc7n^cpyUGfa*%Mpa`&lCznfs^ zeh$}qflhuV4vrgD0+V-4xZZgG=+n0R6y?+W+)A7bVbxO`dj&2mzhu)*r?o19pn*<6H4i*TVpB1T;)-Yvv zar_F25Y47W+cIXEhN8Ch$*XFgNN8AL8jk;TOz#U%bKjn0f(l5Q!VEw0}F zaamovNZ?=TrB<%2Q^j)_d{VFLEWE~E%Oq;R-6*2Me#2*P@0Rb%5ll;hG&yEmWI5uH zB{(UhMnZ>kW9v=T=7OzZ_xIVDob_>XSi47KfpfQ<@2)K`FRut*9d~xu*4NkloER9a E0ZDk_tpET3 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_OFF_es.gif deleted file mode 100644 index 1ff376d80923153360849a7c35a2252adb5eb4fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 513 zcmV+c0{;C+Nk%w1VQl~&0J8u9@$vE6+S>T|`0MNI&(F`+*4Fj)_2lH_{QUgj;Nace z-R|!0)6>)E=jY7K%>V!YA^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&vb3yc&_h!@BhG+pwW;38i2>3A;1xv6Jl#P00A71YQs?sIFdIkSb}X` z16C{nu`L<^2n0ZIG)SoOCLl@I8-@!LOGp-C6lD)b4OI_x2ulJ(V}p~64roe5V;5Ig z2W<~tdkzI^aRgYUMP;B445(iZ2Uu8)6Na}A4-2#o2@hMPq_B3gv{eedXvVb}SFm1P zU(X8+Ujvt+To0_$I6ox!O&APSg*RW&Do=v;9?c2C*L;wIg Dj27oH diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON.gif deleted file mode 100644 index ed8ba2dd6e9d4cceed03fc567c6b3fbbb085561c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmV+!1LpikNk%w1VQl~&0K^{vva+&SSy|rR-U+KJ@$vEc`ub&MWe{y6A|fK9qN0?P zlloUFB{3p$$!F00QW=3Q;5y)`Vk0Rdl~*h`Nh~jusTfBoL4! zFwe63nk_3LcpqD4d~P}g4gnpD9RUtg5{#0I2o?sDn2ZwwN&*&{7k819695yE7ZC&k zql^-qI}E3!3;>z8xRMo60<#?r8X66ZilCSm7`B)IJP#Kg86F-P9TyJ@i_#t)2htmi z4cZMG+T|J@1`7lbiy9o|8^ep?+6Rmp-iuY)(u)c_4iG?-Mh$@jb{(`Wdgno2HxC0k zkSizcTmS|EJK&?};oG8z(jvCY*C7Hzg&iRO02CN)S_gwC`wev2VSqGy6Eg%0HcSG6 z3X5`TWN5FZw09itku=F~TgsI)3m$AbvLnBw5<_O#O09ze0;lL<!S`I+5a{3Jesfy|s6v$iW>fQALO0!2&}y;u6G!a^?Y>9?oU$ zxS_Mh1c5b@#DrNV(yAUMRYq_@!UM=NB-2za^H<1ssV8cdq+mhVql^X&$k2cuM|+5A z-*vU%hU^VoiQAQAlVR7*I(H5WARs}|$s0W!07)_8Mh?->X^U>ppmUZSGf!tkUfyPk z)U08679O6_X~8^{RDbK)0+o_zM{=bwO{5CQ-@9+^tj diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_live_call_ON_es.gif deleted file mode 100644 index 041d398fa52f1f7c533744eab7a60320c32633d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 871 zcmV-t1DO0rNk%w1VQl~&0J8u97#kQ5Qx9)%ZwiMB*x1-cNJh7}x5&uI`T6FEN+ z0+*MU^78Wj{{8^}0RR90A^8LV00000EC2ui0Brys000F4@X1N5y*TU5yZ>M)j$~<` zXu36Q>#EYb%5w`pETZo`&yua4?nlW95k#EvXe${RjD&Pbg))Y&tTu?SPN6%O4qCkm z$y6yAxovbB-6&yBug|~Mync^P*zsdget&9xc64}pK5iIrf&>Q#29uPOk%(!Tnskwt z2X|?6lAechQr+Lg1`$iK$Y)yLh|)8E^l1PND+6tA(<1@rXv-G;Dj7^&;LR8Nh)8q&o{5Kc?CCegF;%Sw8)aXo~a1(ExIrC{# z#y|lWj!byKTEvZQGOp;fspGhi9q_&ODFFh&2?Rf`Z1ZVX$vAHUohg>=+SjyOYtBg* z=;wVZYU;`A6roza%zQN1akR&4)8rlEGQspuhX@J%)01oUBLpKOeQ2+?MR33#4y zjkyRHNj&oQp;G;chvbV3viMkoG0OK21JKwvPfazAR6v$)Npx417J<1XPf3OKrI}j- zuoGTt0%Xf4S12S$G!2ny=bd=wsVABJ$QY+fRf?0*poA7`=%I-AS=w_nJ~K)_kVY!$ zq?A^QO=$^L;K(4wY~$&tpn|%KE}?2es;TO*)Ql2wNKwkGu*NFuthClzMK0ctg&XSs_7C(H0$gXv(QE>?X+Pid&9NZW~=SC+&&Ni06S$%ui^jz diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines.gif deleted file mode 100644 index 9f8eaf67dda1a9f7790905c84baa7002dceedefd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 886 zcmV-+1Bv`cNk%w1VT%AB0K^{v?)2)>;>P0b+t1;|(&NcDJTz^0XATby8y*^@vzxNQ zs9_z(X~=qPKlL)dxmuW{{BQuLHqst^7rr7=FR;5{NC%=-Rjod>eZH{j??7I z`TO?(007P4!vFvOA^8LW0018VEC2ui0E++~000I5;3tk`X`X1Ru59bRa4gSsZQppV z?>s$mz@TtQEER?)S$Uj7EjlKd22SU=)|T$E^h)4 zXz-u_SO*0jcxiCZfq}*b&lI@&hvtDRjK>`RXygS^pD%tdt(`OWN}$S>-Vk(fV2atT zL@ZRXG6#$ungqMji1er?UcP-gC8SwkPT7lH+Hfu<1JCf+$<4g^-NO_y{Uow;oTbSL_y*3z$9 z9Zy;;A?w zEkM$go<=Z{IA2EYsYv0Iym-*SHVj~7WHE2-X95OpB&ddCu%rXv8c9;Qq6Z^BHjO)P zTB(bhGt$_VJ3+crU>g{iV8H-x+_hFmN8N+KpM4%!XJBhM7o(lI;Atb80`VE7I_6;L z#sC)ZcnC=KiDK#;q#zb%2^pN~>Z^QYK*FG~)@th;ppMYvt-SUs<_E3zDy*%ticrC@ M$i7;E2q6FfJ5czjNB{r; diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_active_lines_es.gif deleted file mode 100644 index bdefd01514c2e122ca1b6017d3b8deb994f4fc03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmV;x0zdsnNk%w1VT%AB0J8u9GdM9!Q%L;%{L2xt zXVc`$`TO?(00960|IOgSA^8LV00000EC2ui0E++~000F4(8)=wy*TU5yZ>M)j$~<` zXsWI(DKKy>&vb3yc&_jKE{KA{Vn{3+kI1BQ$!t2G&cZJ=cv!F4tai)odcWYXI6M#; z#^|(q%^n*W7uV)KXyME92mOp2Gf`fZ+9&u<23WSV}4|pC`SPBgQTmTJ=j$Hu_ z4Q!N_eSaK*la*Wz0h?X~o~vOB1e&3Ph8u{dqFIWpU6h^#Vwjo_#eI+)lDb^Sw8vJ8 z(8j&I)tsuH)6!U&0kl`p*WA|A52P8U%v!Y%#ID*`@D0Mzp7+J`s$JThu=4k2xx4qN z7NvT|_H`miiy%TQw=m>d#|za!0sv%L#FUYv6<6Q?FnxO9PmwEg2NRC8!chSxVHzK^?_)Sb-&+WinGZm+^pAGDlU~QKH@4W?h@`pRoY&J_h^7C1M2x%`6sWsaLIB zhAJyfef%&SL4x*tUP-HX=}E@)L;}3$_X+|G0)!4#jJ9!2y!He>m>Lc6zAPdyyCqtU z^Dci~_o{s>dhC=62Y$_!*3hWyku`N%Y6ol)0NJo->(v^3s#Djy$^=Nj#YnS7dQNLp*fVCnhzG@u(-R63-qp zS0aMAT1vH6M4yeuEmR$2&D`QB5~Pl*3fa2slst2fJY+lr0-g%|Qk$?9nD z^7FpsNy*Bt;&5(yYi)6N@oz;*UhU-Y>YJkz0DxMpe%7<}ul%oB9Yg->vG4fq6M(4+ zT&6qL?3bb1cnRaH%JKRH@`I3v(k9l(b~5+62L^{q^?mdtd^iRJe?HZq=Z&}^)`XNopyzNh*?A0a zr4-0OF-E3QwS!aI?;Uim3oi6}_IJUTq~B4$Xcl&8a>wb`w&P)cByJ-YK4l8C?nQg@ zk0bF+bM_DRa0gS7xS%HwXGT`7Dzn(vk+J1-3Em#<-kQch+TcpCQ5!jFV0i(Xv&5Lo zy=@NpoNhMox-{C<*Rn87h9_tancNJk<65g5m)R&vObF7rgzpDrj_{;Bw@+~ zR%A@0*s+N$h+ZcDZS@ULZt8n8+vMFx?7kJbPh3O##gC ziUHi`02JxaVv=O;Hia7-28yr$mS?1dX`8uC=w^(n74TBQXZQG$D@w& zsK;>R3jSOX%{192%n(6A8(ia&7Gn&po%1K^=)W#Ohbquk=5!*9e-S2*?@h}QFwi@A zI&~wsx->30EIyQmLnU%Sr~%rKA06<)%UoZUbsE$yO3aA~p9l&9H7FW4^X>BIJ{m|X zK*&&Y3ReOlZ3J457Rfz7al2kt%8!&p!_`h*(BNOE0PFA|ZLn2-`LgKP{8ZycbRq-mdg92{?o zEsSdh3LPB^25JZova_{mvJhzo9km>}#Aw912gbw-5u?M$!5+^EX$KvuXt1)h)zBSj z4!PWHlP#8N;m5lk4bTp}9SgtF&&SHg$sXSF(%!UFfHDq=K>v(Q*GU=rJc zo4E2NV&Mv02cZZ$G@#b*U7Du%_yPMTRE;b*SG!SdQ!k(gnjXR-RZ0yk8(9b-9;lk8 zoQiW=ZNVFrFyFQgzNYqLs|@S6r}U0;oyGC%HN)#P3T*SU0fe-08m4$ya`4|Y&y)d^ zr+1iwwQEsA!zR&yfe5o=dP6g8ZHIthQ@S}=Fk!9;*xIl{5dgy)*=#ba5so$%gwCVy z5hHy}LCby!_fCs_xDD-G>$K%s$OZ!?6a>yzUn3lI)~lP5FEDMoV@i{dC8F*?ci2mk zdksIJo_ozsn6^OhKr9xyK|l%vu+dKcVh%9ZA24=(gFq}lZ6%&xXrQJ5WUURB%rif! zvLHIxm}LtG+#wL68w2p>+ZsWoVG}6rc!kDKPGz-HV0?Lmp$9fO)nRagc`)B$F+wB@ zC?=Z6k51#Q;oS-0d6H2A?eK#UP=)z;V@5;%c1=%x*{0fkC*=oZE~+qaWtLF#1Yc6G zrL_`dZ5(Jqf^86#%X93w15X-TS}108S!onYK=lywVUZr-Qk|c&Ja-+N9_*Nljcv48 z!UP4pq1^)9X++RCWqxU>RjYYvW~0ccx#oDIa(5|kenx<28wE^ILX~ic5(-_VWFqVy zsqFfOo+I#C?6c7J;i(9qMr-XIwQ}@20n$400`Tp)-2yNI1>~k1Ed?Kh002A3 CNw=W@ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_conferences_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/agc_tab_conferences_es.gif deleted file mode 100644 index 14ab7171317548a3c3dc8cac47235b0569bbf9c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 718 zcmV;<0x|tZNk%w1VT%AB0J8u9m4k6>UQzhv)BE%4{{8#(*}nDN#M)j$~<` zXsWI(Nic9M&vb3yc&_jKPKX47VL>b!kI1BQ$!t2G(56A~3oRbltai)odcWYXcuXEI zM1!(=&2GEPgOK1&uiNiiL8yT5`~P4CAZdVwhJJA#b8QC)ca4XUTzVdSYX}XQ4G44r znF*3xnSg>Fgle9enVfA3pRA!+qkxGUi)F5x4+;shYzGaXv09LTlpB_1p2EAq3RnsN z2mr*63e(V-2?x*72#(O)(%sVFyW9`sTHfZxy9m?I(9#IxhTsxrayUz4CTpty8c-us3&X84AHDQSfM6w-fEP0< z04Q)-OOX#hfwD;u;j4`=gQapbYvs*@o&p@uR^}LnWGEY$Bj#*ZFGsx`UiB$VCfA(I zyaEH2@L55!!LYO>+5n5RifOZ&wI>GO1$|McW`UT+6Q`{YwvOcr4^vydgyD@E{1sC_ zS#9UV1Z6nbNH`fz?$g!Rk>kC(01Hm*QBzJ==fR zWVpixkn0GkhJO4FqvVobIHe(zP)6B>jW|kah0?E(a7U%XLpv4q&74>8yX&ZbcPNM z5B~oCqnoo*PFlXT(TIVSL_tfjsKQ@cY1Pf<{QUjk+U)%M{m{qaDJL!E-|ykv?b6ER z`1kt&007Lw;Q#;sA^8LW0018VEC2ui08;=S000I5;3tk`X`X1Ru59bRa4gSsZIc$K z?|kq7z@QLliCHp}jdICsI-k&})H%r%VH=Nj%k6r<;IJ6Hi3P^!w0a$YY1Z&~T=QBG zr~n~$B4l3b%-gDQoMuMb-duU@W|30}LNnYy-Mi7Ja;st1n^Te8;AT-(gF zqTI}o3|qTir7EbYj|UJP3R(=0xXvK`6JupZ2m_gJ0t((A-8dj~Le5GLVKgn`?V zDFkOu9KCJWJPhm-?Zg5AU#dOqfK3*ybMxTQWqY(w%QAWn04CeW1%N3N1He@CfB{}g z2^zV1AQs7h(RcUw-Rhu8m4cN0zzjekKxaFD?H(Bj+Hd5mO2S-PWU8fMhn_;e2=E9p zOjSQ%rt31OS9(95jm}PuM)j$~<4 z!lJHh>%MR-!$K$wO0MsG@BhHyZ%_j%9>}C}$!t2GP^Thfh+41MtN}F0dcWTRC;%>- zoq`2uJ3DAAq?tF)?(Id2v z(1UVFSY0@<5I#7NjETc}(typwh$K@=B^)Uo zjF{`0L6Hy6Q6OLv(Jf!|B&u^6G)YWss@N6aHxtzZ0v7}@Y&eR^%akmezU+0hqEA4H zLPkt-pa=zJ%&JNXidC&KiyPm??c+|CTyE=bjx}e2XU`^ASGrX-2wt9k2LB;|cI}V7 z!%dk$MKP5sV77vhYGP+_u0(b+zYPk6bEH`ZXy-inX;m9*U{0Z&^Q-#IOE!}oNUhE0 f_L;I0QuFqbYuA}Kw1+GIGWp2z=UJvWhyVaP^xXZL diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/blank.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/blank.gif deleted file mode 100644 index 3a46969559121702f82e857181bf431069555d91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7uXkcJCaNs~11B2pE7Dfgj&;b!383raM7e)qa0KNkTq5uE@ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/de.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/de.gif deleted file mode 100644 index 4dd34f6a6bbfdbdbfdfb23f49aad444b14ca1981..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmZ?wbhEHblw%NK*v!E2jDg|*d4^{@7@oy2{J+ca>d996FAK}<=@NL!p2OG?M^s0|PGm%)EXME#b2@8WY E04O>?s{jB1 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/down.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/down.gif deleted file mode 100644 index 32d0a007e39335e82e173fc5d1045ef81eb224d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4)$AGUsXRvwvJPL$185tD~8M&*HX)Vh&S;OpkRMD6}##SOWmv2robY diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/el.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/el.gif deleted file mode 100644 index 9e79d8bfee73ff55997a1643470b07bf73d5c23c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmVs;j1#u1!_3va__Z0Askhy1Tp#9Sgw0!o$SH3K0N1P<3y8 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/en.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/en.gif deleted file mode 100644 index cb45f5f4e26b8b9f4bb93784217f944c8bb92198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0lof5Nk%w1VIBY!0J8u9Ra%|T4-e#-oCE}9-&a-Y)Y;CulsiDHs6cf)3 z3;pr&|K{V%007JY0RR90A^8LV00000EC2ui03HAo000EfF4pFeUM1`-7j0Pkn6e`vWm23rLv)bU6+f_1DUj;S<8Idce%XnH9 z3{YC3X9d0haQK>#Jfs-{`f3~3EdC1y3kM4fe+&Ub1%D5O27-Va36qqSCLJ9CmYWIBhGT_NHR-64$boy3Ny;>2Ya##uJ6{KZqyPW_ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/es.gif deleted file mode 100644 index 308ea3cb1fed4dc419f0fbb49c051ded44e42fef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmZ?wbhEHblw%NK*v!E2I8o}wRL)Ot_+HOVzI%`H%i+LBC9|KO5#6#|=fnlY|8)$v z85r&}F#Jzr_zxuiGbsLKVE_Rg5CJlSfu*}(qwDIuKh8bf^*=$wFDbL`$;vjK3wsK5 z&YL*cRIGbn<9}y2ixT4-N%{SE84s{<^c`E`C&0kMcOm1WV=e;^^Fia)lZ)7|H8RF1 zOz&=LTx7W7`d!Q7KMNAfxN<8zqB&~nI60e|tvJj%*_k@JSQxmbO`kDy)@%kD?fJ5r W3$zz4Ru|@3xoY*Awd=SA8LR5;2;kGE}IHDpba>c-5LnxOg`M> z^8Whz05F{ZF`V8Z5dZ)GA^8LV00000EC2ui03HAo000Dr@UTW}G3x29S3*uGhEio= z9Or?fSenh1rQO%M6D-p;d%va~Z*?Q(f~cXb2t3VbMCQ@SdqjUziV(WQ!eU9TuhrCs zQ&(~p{6u%v->rK*DzmHU`dY4f>*HsAbU1)*f<+E?d>eT#0t}Fm0)dPl1echX00Eqx ToB#?7qNAb;2?MC9sSyA>Do$Bc diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/it.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/it.gif deleted file mode 100644 index 6c7b17921936a8feb27e9a0cf2c668f07732c6a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmZ?wbhEHblw%NK*v!Ci_1*R3Dn?h{0!hO&eDYV{UHkF=?J*UjBX;mDRX;}1?48FH%GSCwrkils5-`0E4O*Y=?XGf0{}SvQi1>g diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/pt.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/pt.gif deleted file mode 100644 index 646b76ac68792d5bb88a7ac96f94cbaccc4da1a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmZ?wbhEHblw%NK*v!CiOF>4aRsMFU-pwiV{TCZ-UE*+NiA&EO$14XfoUb=8uho2) zkZ}04|K`*08K%jMdj3txF;<0617+v zZcjQ=DAB1h($ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/remove.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/remove.gif deleted file mode 100644 index 89b0521ce1d802a03fc69a7a788f8b57b3d2475e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 176 zcmZ?wbhEHbIu<3BU=e;b?syLbQB z*Z)6%{(nZs|1~xLCr%>!PzOYU>||ioT_D)=B!k0Y)v~57>lzR6 ml&qEE3wiUWNQJ+t;D&{aQqvM4!>W}@e$!UC7_~4kSOWmeJT*-K diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/up.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/up.gif deleted file mode 100644 index 0d55544fb366ab4c9e91ee6b3b697504a7744326..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmZ?wbhEHb2HoM{iq4&&E7|i2jFi5{Dk=4*6vSihv5Z6<+@~y4TLK{nLt0=4^9fum%9x{xDtu diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber.gif deleted file mode 100644 index a5a080d6787aa49e59d18da261d38a105816b240..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 831 zcmV-F1Hk-8Nk%w1VUYk50K@rJbV{vSuh^`1%k6rj0s`YP5PZ()w0g~MyWjA*d`_>U z1CR*WZ14O3fPsK`dS!787l{`Z3Lgy@3}_Y?5@{C+ZHOIbj}0FQiir#p7Y1h?i;tm@ zmZoP3n24SqvY(V^3Zk}(60@rpo~sFsZG?Mq79I;13(5)=9u{Z_2p+Q^9v5xN4vo+i z9~aq*kqOZX)Dx=Jx@aEJXNe!l;PW2f;vS71@6zIm9uPDN7|IhtX4%{rGX#g;nPd#0 zN&CPr8KyG{*(8JaEu4on=nxoyhejNmcLKxzX>(`~pSVq+;F)}N51TeM89y{rnCDo- znjaK+Fd*@a1bqt}xVyO~nFN6y#Z{PEffzq!YG&d*>Te}bhl(&QNapX})CDP(QLU%8 zLI(s&i}hsqhNaD-9}q0~WDO%zHOVF*kP!8q;d*&Vmi)LTnmJNl>w#UgKxol?h9?>} zjB&GrYikzrsSETjJbsIgUd##jBiWi#sS?}R%@Sjrj6}*~Ihh{=eKO5fkcw@=T8zd= zM&em$v>TQciyrmtciTq=4yxh1jYcp6a~I=rcPA|w0`m}aW!rkp}* JfB_)@06V80bb9~* diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF.gif deleted file mode 100644 index 75bc0e8fed5acb00b66cc6e2319f3c2d499fafd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk50K@iHV7~x3}iz z=IiV0A0Hpv+uO3TvgqjOe}8{mTwKS;$L{X#VPRpYsHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP0|wB2~F z?|kq7z@TtQEanyp$6~>0I-k&}bV{vSuh^`1`}_b9i-+PvE}PHjw0g~MyWjA*yxed= z!sEGq&+q&Db$4QJ2p5JI76l&(7YJn*7ZGL`25N;JWQ++P28V_S5*Gqw9f*vcjgzBf z29<@IAFrH|WCfqIhY_%-7n`UCifVy)ZWbN~7YD}$6&@C41Oy(iA08KK#te$h6(1MY zhmHo$1alXxOww{rW^qQ?aF*h!|tEAYYXT9)%%92Q@fF@=vBLR#^MKM2kj73DDy)B z4+0*NiE!@#gLO2~7>n>vD+J4T>1IG5zgL=T^v8eLSR_H+B zs4$%g*`%B)^aFtdoTgPwdd8Rp0uh|D8!XRmNRb@TI2#vgtGup=4*V2qZ!pBcgDYZY zKn)GTJaT)|ZI=%bQHnPEattf;Y1CjCwM|M~GttL)DIw=WaPQ^V3QwyYKwEJ*NJlvZ zfnJkRqEMon_hRE%fPu7nw9EV@Fpi?T?CYKxBd`^d%9B42;PqWbXlm&0+o_zM{=bwNED(Iku=4k;1b4Gx{qKr1`=%bKED(R$@R%+>`m}c6j00M*n F06Sl0hfDwf diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_OFF_es.gif deleted file mode 100644 index 405ff336c759af317ff601d5142701ad7b3145a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmV;D18w|ANk%w1VUYk50K@#>QM+TrMsy>+9?0=H_c_YqGMke}8|uxw(3JdObZo)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL^000I5peBxFX`X1Ru59bR@VP}>ZQppV z?|kq7z@TuLgG43}2xrM`I-k&}bV{vSuh?w!BTzs9k&k#xE}PHjw0g~MyWj9}U_$wZ zB^Sb{ak(hsfD#g99S9x>3m*#?iEIiNZU>ELj|XCYV+4PIX>)a89~T}T9|xlroN#?( z3<(LM2#Sntk8KMcmS`3pkRKkX9~}=2sc4>dp`r^GqNoc57ad|29RwW=4$)#Ad5H%W z3VLJAz^h`W(h9f@77f7{-w~qxXlOKW2@{ ziK!<66|;h3j)Cffpo0W}s1l6w;LgLVMI#&k+!_^Y*MmXRMxru@?@+sQ>qd!0rEt}* zP$LtH4Cw3B$X+pD`QkYflF3mISniV^*FT&9>No0`@F0|X9yT{sMBmxT-n80>Nvb5~ixt9a2( zfQ?k$4|l7IL9iIEJFdwr5J(VMuLDB~QTb)1TIAF+BS#G;!=Rc61%7`n9qtoXZl_I4 z;Sv?}U@JqIkq`cvo0K_)vr+dE=7GU4bryETR`k0;0tK%v0K82mLE;Y5Xzr!_D>%u* zz6Oz=daGfgo{;zz+5!p~bX!(D=_g(PaUZxBOnkjKs7@lBY+fLQ=^KF#zH-;{tGv00Dd|`AHbX6naJj2T(S~0Vz6W=%bJdicF-Gnqi1ZidL$r8=e5b zK>!$pD(a}DmTKy$sHRG41qK*UfvT{^D(kGNHc$X60u%t>uDtf@>#x8DE9|hu7HjOW o$o6W%00kJ}KnBo8EA6z@R%`7Kwb*8>?Y7)@>#ei|5D)?YJGt|cMF0Q* diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_dialnextnumber_es.gif deleted file mode 100644 index ca92716e39e36f01ddbcf492b903cb4d500edf19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmV;D18w|ANk%w1VUYk50K@?X zC>8Q&a!Gt57Z(n7gcB2J9Sj}}4<8Q~jc^VZato1blM7~oX9i8{+x9;7k zldK%R`UMhY!;=MttwI^h<}6`BaZ*}&N-~LK{qTyf(IRV3G)+S z*nerE>1cQ2kYh+z0U$Ltiivy3Jb&6xQ(KVi5z(_#k1ByU)93_l3@Bm%v zp;6qK?p&beo4R?q2$;b@kiefzj#5T4h^`UA0{5M<0E@p6ljx+Bu14vlY$&o)qnLI| z$1)rgfWfGwmTKy$sHUpws-`|5fB+A$D(kGY*1GDVtRS$!e7yGR>#x8DE9|hu7HjOW o$R_J+dkYAlKnBo8EA6z@R%`7Kwb*8>?Y7)@>#ej2BoG1sJMyubQ~&?~ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall.gif deleted file mode 100644 index a6779255a93d90921769e3400414eb3e2211c1e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 804 zcmV+<1Ka#ZNk%w1VUYk30K@T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1L(4oO@t2@q!ve}4rXX$=<^X@!3Y3~GLbjAx3KXO4i84;Kz+ehD9hj-s7~4G(M% z1s4q!X%?<&erklOYq-AOd`b(7Ry;cry$Y?hG|6qo^e(nmO}^#T8@I)0L?#_0@D!W^`@LC zauq5VL#B-12L=c(AeA|BfdvZ*Jp8n|O_qlSNR`F}msDKKa=?t9Sy$+j%1juknzV+1 z!G&-B(xO4RW@oQ9XXTAsr)`0tnF%Uf`>R(T0!(Q2Vs#)@um{3Pd4m2JLo(oopTcv zwtz(MfdZn5h~T!(Spza~Oko&NCXZ8VK+pg%G%7Tej&T)M!Hd4>q#93l6lvsA+slxgOfXr`&=nryb|=9_TFDd(JL ijud7C804wvo_zM{=bwNED(Iku7Ha6BdlpbY2mm`eFn6Z_ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF.gif deleted file mode 100644 index 74b1f5a1369d2b352e85a76987e28dfbc797e2ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmV+-1Ks>bNk%w1VUYk30K@+9y`=IH3?+uPf+va)}Ff9~$?b8~a3sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPnDwB2~F z?|kq7z@TtQEan=HNTb1NI-k&}bV{vSuh^`1`}_bDjfdkyE}PHjw0g~MyWjA*ybOs* z!sGU$aJdu~WD0$K0v%=v7ZzrNeFX?-e1nQ)h?8WDevb?n3S@i*AA*dan}Z1qX$k@t z2^D4*tY&;?f~aYAcVcZF1RfU#9t5Zs9tM5At{)7+1ZKf~z!zs1z841`ipvDeWzWC9 z9~Iai3B`}Z#*N_~2YntM$z{Op@111Z9=0FUXTVWKz-s zVa1N+`+$JJg`zJZ9Lp9f50#9(d#vFFb~mfC-+&QNY)-XJp@{Eseo8)*e(kC7&QfSBkU%dm9t4$*ZV6Vwio4x(T26BWDddnu7C9s?4{!iM z223{T0+o_zM{=bwNED(Iku7MiC30)zknJ85fv2LJ#7 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_OFF_es.gif deleted file mode 100644 index 21991dd5746c7752dcf53417fbf89ab68d4fc87b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 827 zcmV-B1H}ACNk%w1VUYk30K@=H}+>>+64if3mW&=;-J@Jw2$XsCs&O)z#HhR8;Zt@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP--ZQppV z?|kq7z@TuLi$Erk2xrM`I-k&}bV{vSuh?w!BVa@*kdJswE}PHjw0g~MyWj9}U?Ta3 zKMsQDaB*7}ab_1D9~BjWf`o`134D4CYzvf&mV}0+rKn4zp~Tb{`$19}S?51Ro3)gB1@69tjH-fCva52n`7h76-`=%LpD0tEPv* z!WG)SuMZ!3e8R7Kc*qJJWDE!C&U(SAAD7kF*&Ym(9gGbtbOBi(c?vEZ`haWGB{B{? z5YS_xn6`q+230y$!2<#d3KCqLl%P+yLKPzaPNXzwrAQAK{vkm2;6O=hz4#nh_(2qb z1|F7qkQTI5t5+XFj?6fz!+~Ff_8^$|!RAy&4Z}RdBWA$@Z52J3OHe_UER=;3&|2{C zLQ_WGdVXao_AShw7COGw_Tj;T4hnb{>!?ue*=~*?;b9B&?IfEgJ?5k20Ulq5baL&g zRI|Z?z(B)}ElcSvS+ox-ymZU!q@m9hLhBm^lYs&PdMiUCgg`-qz@<7^u;Ad-;mKrD zuRc3T!8YV~HR`^cRg3~Y$igDfYq9ZAQPVseGA{pNG93F z0UvcTBpnoR5C8^LR%xY`0C;famRxq}<(FWFDdw1DZdrgM9soe40|pGhg#jJJDd(JX zG5`Rbc;>0+o_zM{=bwNEnx~x%%y~fp1_01N28=f9=%bKED(R$@R%+>`m}aV}qZ5Sy F06SRAboKxM diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_grabparkedcall_es.gif deleted file mode 100644 index 9acc363a85b980c650f992720c785e1b234646e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 826 zcmV-A1I7GDNk%w1VUYk30K@RL|vEA;z?#7SV z?|kq7z@TtQEE?P zCKR$ca_}fFauyDCY8M_K6%~Yqhl^;29v%&YZ5AFDXNGcjc?M-441awOa1NJ_nTLs} zsjOy(7Z(Z*ZkCvPw{V<#9j6}u+64;6+L5)2*;4i$q73m*#*3=kFy%Mr~B9ucpq zio(Pd+`zLEAANtsvwa^C$_*W84+`theZ#FEn%CLe9v)okfUFpz3(5f1Yj8o)hh3id zH98Z)!+|~)j&Vb{%n+tk6+A4k(15{4OAG-2eM3~C;>AmbUYhi9LEr*q5)`Dw_Un%V zhaXHGfZ(B-2WmxA#hUe@1ZK{w=kJ?fU0xzncxf0UJ7;8$bhqo%5PP-NU9QP#PTCo;qx?}xQCEBtYu)g;el zSAhz>+E>x>uVz>>)OVQJQVn!~7?P8>ebwplPDoR|gPkD{us5Cr5;*5TAF7e(P)Ijf z)0%oMO&HK@n9w8@L)|Ro&N06|f=x8#0+o_zM{=bwP$S?2?CUI0M?2tbg*qKr1`=%bKED(R$@R%+>`m}c7OMIitH EI~($RE&u=k diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer.gif deleted file mode 100644 index b4fdfae8fe0eb85e6efbb6b8b98210353b4aa749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@e zo12cQ7Y?hev8IKNt%aqzoo#u0W^WfBX~St29tsF)6&@ZIAI;DZ4;~G}9*)vz+sM}q z9)N1#57>^#l;|JB*U1ox7YgB+3-ayR(ayx{&d|xNrT$$2CvMFzKEn3#OY`6X0S~j9 zx!d;8(FX_$0By?$P2C4@YLG#@sO*DBbsir7pb=S2Ap(3P733RsDBQCT;n?Iv1Cq_b zU~YzOlE>}Y#%9$F-L%H2f>Vw~J9;2s;i1Zwp4Oc7aLAhj2D8u@L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)PyXDs9+Hf8wwaJ9-nDz6+&Vs+qNw5(Enl9w_Lbm~26lXPxIS=+0tXge%KRXYYPGJr+hA1S{^o*Y z4jd@Bo}B71;|t-2p9R(2Ce3|m`SXCF1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_beJ@+_DJ1JziQ7z7{EhaGCseAvK9+sHH9QmZXhP>0!-cE^xJ7HQ;>NB)uk z2L@!|0+o_zM{=bwNED(Iku7HX)T2p|vw06W$8bglpZ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF.gif deleted file mode 100644 index e5736ae0d003492fed8edc78dee85dea732dc9e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 803 zcmV+;1Kj*aNk%w1VUYk30K@X8Z8kPGN=nbq&)M18 zh=_>3zPgTX`X1Ru59bRa4ehCBM8%` z?|kq7z@TtQEE}Y#%9$F-L%H2f>Vw~J9=L&G!>S7}C{EzP)z zEL(8PeCk0MbY8rD6)POLDs9+Hf8wwaJ9-nDz6+&Vs+qNwQUePM7#!fBm~26lXPIS>nfdv*`%KRXYYPGJr+h9E4{w9KC z3lo}B71;|t-2p9R(2Ce3|m`NM#q1q@nHlQ_9ihsIB)v4NT~;9!^GMt?E#QcAKg z0!~U6c_g0$@+_D}0@YZPSOXu@haGCse5k-k+sHH9QmZXhP>0!-cE^xJ7HQ;>NB%;A z1_5;70+o_zM{=bwNED(Iku7HX)T1r!hh06V?Od?)|_ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_OFF_es.gif deleted file mode 100644 index 570a6e5ab1d915650a9360b2f4125dc32b3c006a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmV;m0!sZyNk%w1VUYk30K@k)K&eGD-!^6WVDJkCG-fL@XL_|boWo3_# zkAs7QmX?+d4h|a|8(&{vdU|@Xv9Y70qu1Bho}Qj@adB;JZ8kPGN=nbq&)M18 zzP`SQh=>3H0L;wHA^8LV00000EC2ui0FeL?000I5U?5^-X`X1Ru59bRa4egfU>IAj z?|kq7z@TtQEE?T zC>3&j&9OK<4Hj({9t?YL9v5j501X}v9cGCi7anwihi`Xz17(?Kl>io%4{U^npKFt6 z91RT*ejbsN5~y(qmZ@x;dZ`Q^rDh0%9E~0b5g(@?5Uvmx5X_Da63iD59?@nJe+}BJ zW`vO+5f`(H4~iVPuV&ZS)Xj+!5Pt>Ly1bpb%V_||*a|2sB;ipk3lTgNz@~^$0fc89 z1ac%v5vW{gCRO_I?*T4B9y|cRg+Sf~1qvZyVbRPrQ*;9tYFXMQcD z7#B?hR}UUI>WkMBE&$l>R^_?CU;zh&Q*qVBL9{_L#T+3UXh>ybo)P|BK+vEM=8Fz& zcJ_=*;kdu+LINP{R}s(#^!`9%Ih!RN2Co?W!{oiZc{jW?5a7VRz5Dm@`*uDB*+@R%qdc3@%^+01PAmKn5U& bDB_4DmT2OMD5j|5iY&J1qKF6}5CQ-@6hbN| diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_hangupcustomer_es.gif deleted file mode 100644 index 94d3e225bc9b2b045bd9a2cc6331acd7b9aee2e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 697 zcmV;q0!IBuNk%w1VUYk30K@ z?|kq7z@TtQEE_M76Bd)7H<|F4t{YS7i$y<4;}#>XpA2h9(IL_ad~@YoNAZ|7MKujhl!zW zmT40Y4-kPKl$HXja|D^IZk~L+4j!jy1ceij9t0F0sUH%s5*HHAkpTkE7Z4uPXaa%{ z+^uMblphoqwT%#s6S}cz+1l36i~;qeBrC zrU^hOQl&;|FtKW+F(3q8g*H3Pq%5 zLRJJwonl0ztz58>95YFB!1r3KrT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5U?FB?X`X1Ru59bRa4egf5d>SV z?|kq7z@TtQEE?T z8V_=PkG}XX2pwk;7Xy8N7Yh&{6c-F;3yEqB2p16vXakmLk!g*Od~|nt2W6pq9twU6 z9+(uV3TUZ*5*`;H2_A+K9ukXawG$T}9-toztQ2R%X}N}{a-(|Cbhc(4x*xm)#b?%L zwYa*xzG>Xg4hjfn47wf>%O1_y)NsZE*0|OJq5L5+RXJ*!gTI+JL@}MluuwM=p zK)4Xg3^O#&^1ZodO5+=1#1t56w;;hV2L)Bu5qp-)RxdRd&7l0?z*d3<-9E%LlhGp^ zjy^x$0tRwr!CMrNEy}eH=Ylji1$_v33un=xJHcgW6PdRySDAyxK}%xqep*4Ea>#>TR;vVVVnA0HnsE-qYLT(`Hk?(Xh$b92kf%RN0kR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VO-vwcU8G z?|kq7z@TtQEansmheE+=I-k&}bV{vSuh^`1`}_Wz}S~ zx4FB$XWPyV2Lxmbxg8S9%-GXz(WUcn9S{Kl5X20r|J0F@b%B;TT&p@HJ0r{&!vhR1 zz#=0op0j&v>gB=MX4tR;h1el5AgsZ_RKuLy;i|<8O~o=MKQyRi00FlTFUvIJn9+_j zo@~68q2*CtwF$=*;ZkQ)5~mJsV_4+kUSesElApRf}Z-A}nAew0)VU@lQ*PLSR zAW2x!vPHx4BwV<(>C<%V0N@}XgX`C@W6PdRySDAyxO3~?&HJ^50)++?@Ibt{@#Dyo tD__pMx%21Hqf0j)Kth2E5-@1r&b_<$@8H9WA5Xr#`Sa+x6Ce-*06SAnAT0m@ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_OFF_es.gif deleted file mode 100644 index 110ce6b01a093bac934c742c76f268dfa7e76130..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 644 zcmV-~0(<>ONk%w1VUYk30K@+9&~=-b=dzP`S4a&mZhcuY)8sHmuGYikb= z57yS!iHV6HA0OuC=3HD{va+%+E-rt6f48@{$H&L+?(TYedObZo)z#HhR8;Zt@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPlvwcU8G z?|kq7z@TtQEan0ZNFcyzI-k&}bV{vSuh^`1`}`0X0fFN~E}PHjw0g~MyWjA*ygYzN z!sEI6(P`-aXcrwH799wHYK4c0YIS#FjAaXb9UhT?f`o>bW{R9=j(D659i$Ir6BibO z31kckeG?xH7YU^c2OSC)WVRg_3m*v=d=zDwp1#1sstOGVg3HRm3w#Z^htrp#ke3k( zAGyH@y2Bk76de(^7n%|1xd{=5qzAdYf(N|EgNpU{AENQ;@Ia7-f9EvSf`tI#K1ST~ zFq-fSfh}I-T1{$4q2Vu0mOiNaKmpx{2^JIo3JPWh*(Q`119k{Dk{mCXDrX9Nneri` zh?jhI7#iV2#t$1OG+6i1lgOeaDZC<dPfKNN8@#aD6AXlbUO?&%h>T2{HD}xFXFg%Q4S_?C&BfZTxwk||)m za6rKVr?_kUPVBf?`gk;ZMHVuZs#>avtK(-+wGGXo4$h!2joZqhXELp zD__pMx%1_b3p}4ry}I@5*t1)w0KkA303O1NA5Xr#`SA=2FgVY?z5Dm@IWA&%eL_{{RLk;D7`cXyAbe@@G#02mm|$|0|LJ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_parkcall_es.gif deleted file mode 100644 index 2274a27c25df60cf9c6aa4165f10b67f4b0be8b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 646 zcmV;10(t#MNk%w1VUYk30K@RLNfue?MhX2?9|K9)IvEB5;^#A4m|IYva(*IRN zReoiDyOz6mUw07>5$?Y3nR=Nb8zPNyjWa1T#-7H_qs@qIh(tC-?Y`|@N?rfs|Nq(l z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5;2~;cX`X1Ru59bRa4ee}LJ(W7 z?|kq7z@TtQEE?b zC=znL4e&(vfNB>W9~K@Afoz6|iEMXy31y9D4}KmUlYoPThnZ-Lo@tMInGhbP0A>{z z7K06D5DtD79}pJ}rwyS{@8zR84(_ws$1*2e>YK^6k0<8(_F1BLw> zd6U$rLNErne3^Sy>0N<`!8l?1!0tl0d<0_LIUgby1(bgU4eT}V(QkDe6cz}QYf|Lj%mqmK~DcQ|8N?K%wC!>tP^37rIu zf!kdwi=wk&NI{=>Q0LW?=3y>Ptep7z-Sib{I#&o8HgJeItwcPe5_RZ%W^w~_3L;Q0 zp!tFV2M?g?;^nJ@tOgO@5q_DKf$6@f{}#si8uh!L*$&l?trqgPP-$=iA5J{bC=LcN zC|}OJx%21DCoh0by}I@5*t2WD{!u_m*B!!(A5Xr#dGP@jKse97z5Dm@QTIzV5!G%%dqYDH|di+W*>?yOuUYHf@M)N?l66?Y`sx{O7Z($`wdZ%AfJ9lthDe?;FT|`Id$+8asag#H zSOF#K7nxwHSW)xPp$a*33>Y}50IJ;qOcgp{i2{%>UqLkoyCkdvYE~6ovmE?+Wa>+7jhyH1&(k?EEem4J~J7Y&w>9t~}UTZd|79u|S0 z4G|I^4^x@4pBAtm4;F=ybZ1|PsHz_dmJS{Z9Ugd?pUi*@ipW%v7ZuizrN5_Rii`{n zksS{nlg_k&xs84hpz6(C+G5;`782~97Z(w?v*vZ3en3^bW++}FVR76w!c&RVtOXLN zcmmaHj463sQdJ2zWn4K13=~xG#7=;v3Y$P+NywM4U>b~DG)lZR#a1i@eHxK+;Hgmr zc99gi1ZKtz!730cuq#>x4FV1cGDw|DwW`&tShH%)>R>CcCYHEpzi9J0%R8&;e)z$Iw z@$BsE=jZ2{nVA3p0OjT7A^8LV00000EC2ui07d{3000F4P{~QFy*TSF7h7N`j$~<` zXbLjJA~0|)&vb3yIQ|TV%RIoKa7Zi~kH}+U0PrQB&}ekod_4_^>;aGf0uBga;Sd}H z2M32EFbF2HgelXR1UR&g@I&or1Jgl(32FreYC(2ua#cTd4sj2F4Gwk%fex1s1P+!D zUw&B#4qZ=FbVzoPfTC|?f0(ZigLhnRoRbDnrdE!4mUj<^ps$;%~S<(%Y7YSm@ yoJq5$&6_xL>NL26K!cw^g9;r=w5ZXeM*$Qth@h#{r%|g(L1_;S4t4;8fzSlPQB# zfngwl&6_xL>fFh*r_Y`%3m72Kps3NKNRujE%CxD|0ssO4KtQ#s)vH*uYTe4UE7b@9 EI|81q{{R30 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume.gif deleted file mode 100644 index a7d75dd89a2fe82bd3af78b1347f06036cf24509..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 535 zcmV+y0_gomNk%w1VM_oK0K@Q<&w9ODKjaf%%j); z*I##EzV5zpjd7mFo(>TX8zLK0W>R{Yda~ZK+W*=%L^f@RZI-*1N?l66?Y`sxkLQzm#ZQppV z?|kpu3V~yz7;uirq;kn@I-gLafFLOfKG>{w%k6r<;BYqJXjsMQv|3Fz53bxqWj?oH zCG`0MyLfmYb{}{NcNK(nSQm4Ld4^$aXIvM5a}XYO79I$6dzlp$2$vt37g(ep9-4fq zr5+D?gkX?wU6X+f9u=b=rCJpp3?B>?oxG;TxxgQr$hvH0kz11y7Z;fkyB5_K6CVq% z3msXfyRDfWxTl)iy|U1>lBx0)!I|=+!}1V>8$aZ)P;>?Kllc7@WTb1g8gr{~wF`!Ct zs~4VYz9hI1E6dso!Q!HU#34Y2zkmY^9!$8f;lqdlPdH$QzyYR^BTJr4xw7TUm?c|? Zz&HYi&!9t#9!C>n~0{{>L06T30_^bc` diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF.gif deleted file mode 100644 index 0ae4cb9ad8838d1d853f5e494d3f9f5ba5a0753f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 533 zcmV+w0_y!oNk%w1VM_oK0K@uYOkx3{;}*4DDJ zvgqjOe}8}5+uIKh4<8>NTwGjzj9tj@_6`HxD!?wL2n8mkfuw__~5EmDg5V#i77ZM)_s|Ouc zq`0b<9kryF*t)M`jzkfE>NzkmY^9!$8fVZRat1b89CXcOga80Le(>@_ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_OFF_es.gif deleted file mode 100644 index 921d5d5e38e6e3ce11a6898e5511517585050892..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmVn_>yZXI(+5)D8fyS3nP;kwaTU@^5el38LJY#9Wp(p+aEp z8n7S-gKT034IY4L2^cxBb|{-22ek1DsjpE0e5ArxNjM@_UPK&BxUk{Fh!ZPbY`B0K ly$vEuo=my2<;$2eYo46QF@n#aLyI0wy0q!js7Xfv06Pnd%zgj> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_resume_es.gif deleted file mode 100644 index 1b096144c2d29f00b803c8f5331b20b2afca3d8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 500 zcmV|Nk%w1VM_oK0J8u9S#Mbs85Gk0(y-jHkF$@KyOwQ;Z8k(UN?l66?Y`sx zu?PYq&vb3yc&_jBGZ-(%V@NC-kI1BQ$s{HUz*uuityZ5=A+d3AI1qzj0uXQn z3`D>IAU+(>>xaQjXU`kM!C|1MyYmQM2Y60UL0e`90A>jfT?lgyY>r-y4PIyt2XdNq zoB@pm4h4N~UOoW<00w1*4_Jposf}_04F(QqLtSB}cxt&1nw$kjxWS^uL|tf$$_c53 zS$UF2fnh_qaBggG!Nb}G;$gUCPorto57Ft^uu>1Ax&zlh(9RTCvB-v9K&^oVVU)2Y+{<^TWA|NqkeRYX<)*Z+54 zca3q4#-7F^8zRi3%n=R|nR=NsDKp-(-tNBcW>RMV)&Hb}q+Lo~|KtDdzU}|n|Nqbb zs)(vYHbejb0RPPYA^8LV00000EC2ui09^nQ000I5U?E~;X`X1Ru59bFnh^wAZQppV z?|kq7y@Y|GsT?-Qq;kn@I-k&}^l2bK5(mR)%k6r<;IMd1E{g?>1y*ZryWem!TAdwF z2Az&VvQ^~&5FdU3eH~kW9S9s>et!d75QupWe_ND#ACZU-U~_9@9Uc*(4}77BfuRi( zAE8?w4|xwBk6ou74IYM?u#+CYgaf~Z!lRR&X`f;q4O_yGu3n)Y3auWmh946R57O6L z2p*i+T)MQarys(EW1e+l#R?F7)|=M30MWW!>$cw?0M3!amgfVleZ}%rLq>;<7zqOu za9eciSg3#vB7EED%mcea{{q%Bn2qE*aR^1UDGcMz;TH)FD3mi4&7YuO8%u^_#igdO zMFUAX(A6#FN0!Onh0#a>j|Z8d21p%{>e{wnuNp`VCDWf&3e382B>7<$0Z=2X}qAcN)0m@{kM z%(=7Y&!9U?0Pu(a01l{At6t5zwd>cgW6OSRVE_fv6fWrA&AYen-@t*nU>sHmuGYiqKy zvVVVnA0HpLx3>=u4~dD1E-o&{#>Upx)?8d%?(Xh$b92kf%T!cU)z#JU@$u~J?C0m_ zJv}{{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5U?z@aX`X1Ru57Cv6s65{ZQppV z?|i=-2Zh0~DH@N+q;kn@I-kwY;9&q9KG>{w%k6r<;IQ}`P%Ns~v3kvJhs$RxSR&wX z5)o{|&VPLN2zne?d>jNFTzh;1SPzAE4SZOUcOQ<04P9_(U>qJ0o(_4Qg?^q45+9ye z9u9U69*kO~91I?Vm#vTE&jH_Fo9to-*tb-pC3=YrKSOgxK z)mgW(s-z#kfnb|*U&09wdDEEFwg}F*S?IIe9|+{()$DwTg-@6rX~p8C`4T}uf^3Lr z5%c7a0R(RNmU&1=h@U@M1FeNb_pRWkgI?CKE#wk`!31%GobCI=3!_L+sj|rYg$Q8C z2Dh}CXo?h;IIw6^sj3Gb3A`n)eI-@IDdTTWy z6||Z$xdFvk(?NoqI%|3$5YHz*Z;Xb%LF=Zl;lpGIBVNq74IBU)0$`X-xw7TUm@{kM z%(=5>3k4VrDA1v_>C>oFt6t5zwd>cd1xzSVVZw#mxO3~?&AYen-@t?aCO{wr06Sl} B4E+EA diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_senddtmf_OFF_es.gif deleted file mode 100644 index 2d32c5e96ebf85c685d86208da558b548cce8fa2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 563 zcmV-30?hqKNk%w1VO;*nU>Yinz=va;LT z+vw=%e}8|sx3?c3AJ*2^E-o%yTwKS;$L{X#;o;$^sHl2+dObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui09^nQ000I5peBxFX`X1Ru57y<)3nWWZQppV z?|i=-hlIhvDH@N+q;kn@I-kuCpkP=WKG>{w%k6r<;IR0sNHD6`v3kvJhs$THw{WS~ z5o>ybZNCUQSbcX5cUW{61s{TVTX1Mz79J3GjAIoR5^Np>bp#$3iWd%&7YG#|sDY@U zo0MFRa$S)XTL_2*1c??GScDyV9|fKcdvq2Al^-6w9}f-$S+iKD7ap|BpUTW$uxVV8 zlXZ#JrJKPXi4h(Wvl5aB%O8;h7PMLMSkm&=)1RNGkyvr6v!{`nN3uwXQ{>?RLo5z1 zJRlHZA1w(L3dD<)XbV1z`S^VRDB!{|fXW82UMQ%g8zhlgs;LSoZB_#Z5a99Br{!Zc zhag9OisT37$1W}tMzFvXl+1_C2t*8d$%6oOJ7L~)z_eOLs{Jf9SY>n@(u1+Sp<3$! z>eCPEI<_0-hrk1#_tqi<8Wg3c24%q{bwjwY;j?kP9bU|M4V(oW6l9o8xw7TUm@{kM z%(=5>2?GL905G6~>C>oFt6t5zwd>cgU0a9{Is%5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui09^nQ000I5pde;sX`X1Ru59bF)KC=EX5VTmtT=|VU!hK3X2E`j20JLhaG(%384>ucNPekA0EFS5Dy4kwp*$f9=Fb-&Cg-8 zbzhX0c#PPnp2QxE5*`z_6O{_iACw3dw_NmF)%DrdqC}~p^y(8HKakQ$5_hUxBM%TB zZh3G40s;yCZcV6=fF31AUiM|=_wU0%0~eIB4Qyuc0>UofYL(=Itrf{?wj4Z&Fz;8t zE+Vl-9BEP%r9dl1f{8iFg9HmuN7a-F4FN@xnmib2=X0jM2T-wL#0t=Y16N7CEmcUX z>8iI>r+#P$5}v6*2q65__jcJ(qANo=NIQlpoWqC{ubmT4vE#>WB5?qqp|a)6m@{kM z%(=7Y&zvV57!}|^htsH2t6t5zwd>cgW52c_VYCDcxO3~?&AYen-@tA{!#^zV6JU%y(aRnR=OKQf7^DjmDnFgK2|ePGX2{h(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7VIVYyr$3m*=CgclGW2!0J`5QPUFf`xvEXOa(#gOZE~7ZC_&e13qHg_j?Vgr*;V zkr8Htl%buUZ+CeHWpEcB3cCplnF$_~9|yt~XBNDE!U(~`hG-rMehR~g9t?$M*4iE( zhYrHM-;~qU*UG)t35(YV-^lRD3k=KUwRn1P*=EYfW_F!f;2{D72FX0o>fiz3Di3R} zaf3K7%|9~>5*#Q74r77@W+Z;F_CXn~i|@Yw{i+zDn%C98&vnbO{cio9MS7%OuhoCOvhFh~HY z=$W+$AQS{@k3mkiYR<(o!!*@HG&x0P{iL@cPg+*F#+9!MFpQ}z`2%5rQX*4k7#?{G zjzJRFNBOMdX%Rs6R|8?0L7-I9Igky9RMj07lNpX#01s#1e6m0U!Z6?v0{Ixc_! zG6Epb!IMx%Ddm(@R%zvxSZ1l^mRxojr3Ic)Pyq&HmTBghXr`&=nryb|=9_TFDW{nS I91sEkJJ-f+VgLXD diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF.gif deleted file mode 100644 index 3ee4ca62464a9aabe253bf236ac4e5d1f24971c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmV+l1NHnzNk%w1VUYk30K@U1UA0O7% z*0;B}YinzXiHTfXTYIkI-k&}bV{vSuh^`1`}_nNj|k*LE}PHjw0g~MyWjA*ybO>` z!eh6>a=9=N9}9hh7Y!c;eF|j_gaaLcgnfo(kqnB0k&6Qt4h3a1_+o29+Dpez!qf|x_!U}zrlrO9tM2}!G|6Rgk;p%9v+4Z zz`Na((bLt)yVM4X)dk(g?#2iS$>X$kcyHHa$i`&3We|99kRZV^53@RW@TbZ{nrhk{ z#yiuG3<3iKhIzASzyKMDAE@ebP&ClP#KZ@5m@c)zHjMkXJq7U8r*wRjn`Mu_=nqoYDv%b^gHQ$Z*p2SU8LK-6hfQD1o2%!70wUSeBHM zuIvyNnW4_D4FeR7`Q!x)*exKqXy7FMII5k~|Q7@6fm<8@=){Q3!H~>rn3>DDd0StlkpnTmN zFbjMR5*A2*35b$kOmnp8;)^iG7-KCFZ~#CCIOeG1jy(40mTBghXr`&=nryb|=9_TFDW{nO I3=jeUJ9?XCO#lD@ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_OFF_es.gif deleted file mode 100644 index ff9a3447481573b9d6e54da199c844ad7a754bf2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 788 zcmV+v1MB=pNk%w1VUYk30K@U3x=H~0`>wkZL=;-L%+uO3TvhMEgVPRoA^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPb9wB2~F z?|kq7z@TtQEan^yiNnEZI-k&}bV{vSuh^`1`}_bB4oKreE}PHjw0g~MyWjA*yd04{ z!eg{zVdx+ZbAfRe7jYg49UTIIZG>}aCLWLX$S@d6$Azhf}w1XZjuBQ1qK9e zq;Lm}A08fYmUw6$9kU+{0v53Z9T$KJ7X`rbC3=gSU~201$rkbnfdn0 z7)&xUPbR9_P1^yt0}+s!XVS()xj~R!MK0Udm$zmo7=}I#lg&HEPyu;Urb4 z>5JjOLSo5&NI*aUTEyg5mL+h3VqyX2Xl6#etTpAldxf!f{dctBtOpHeLwzP8V>6oi z88D#0p~i@w<1$oL0RczLgcvNZAo2n>uf)Bb;?A8Uy~L(a0W*6$T!HgD1^9FiUufK- zB#~Y|nV5|6G<)NG7S| zl1w(~0+o^QGo0suRf`d+O7 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_startrecording_es.gif deleted file mode 100644 index 26420f78bc548bb5be123300ce508f743678c579..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 788 zcmV+v1MB=pNk%w1VUYk30K@ z5zM2^GbuBfdYSIN?q*VE-Lc*O*Z+-ijmDnF|JwhEZHT*;yF@lbT}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehDU>MY< z?|kq7z@TtQEEU z0~1M^?RY3W3=4LHbQc$N9Sj~G1%hyfc93Tl9u0GNdIV-`3hk6v%f#vl2|o1E#_hv}3ikr8!KG;pxit^~ zRcJMi*aK||LVZxcV4^v4-^>{rR-u811d90oNgPG*5SoYuvIRrqftv#hIB%|GB-5aW z2Nx^A?8z}1H%J!~WV3`((X2apa;16rvZA_O7RaePS&@>xVO9;gT%h2=nFSW^skD?v zoUCLs&(u`82q(C13*Z`LaK;{9xRh))sCJ0!2fth?#f6$_Q<`19D8=(|)k9Vfa=DSC zQ~_r&s*uQ<{m=kG0kw+Hxjc*D!o|e}(%syg+L>$1d;1n^{W>sd!XFGH=9XFwL&s@4 z0aT#CLBx&}sm^`asse+Ln8iY1UZLcLZD5OsQ`Nou$$N`atr~_FH@O7peHIA%K7P@; zNKY;eP8_%Ks12>r#~;P4^Nb+UX@;4RGaev-V0MO3vIsF9aA%o#^h~%21jA%h5E>RJ z!bmWwad?s{d)-rja~-1C&jsp0GSD`eskGP`$CaYvjy(3rBQ6{Spuvzt7HQ;>NG7S| zl1w(~rwPdN~mRxq}<(FWFDdw1DmTBge6+BSo0~oaF=9_TFDd(JY S)@kRRc;>0+o^Qq!0suS8{BPa> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording.gif deleted file mode 100644 index 6f3bfedef7d3482f2667125fb2e348054fe81098..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmVT z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zCK7Tza=0`QW(*gDgk~0fe`kV(7HJWL7Y7}IkQWhV5Q`QHXB`cZmu8QIl9Y^Q50)Q- zfU6g02%i_5b9Z?LWpfrD2^S6?lY$Gpg9^jFzYS&=9)k%Ujc2j91W^y~=lRTyd zzY;JIDtap6fb%e8S40sEBhW?)Sn!N<0|#vM9DoW9*dTcq1vHmI=N%A=O?dEA$A=(> zDB_4A?!&k!H+-&Dddnu7HQ;>NG7S| ol1w%kBzC{Nk%w1VUYk30K@YinFw zTn`Tqx3{;(#>VF6=IiV0iHV7Se}A&FvgqjO?(XjD>gsxWdObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPk@wcU8G z?|kq7z@TtQEan~#$)mz)I-k&}bV{vSuh^`1`}_nTkBQ?$E}PHjw0g~MyWjA*ybO>; z!ecpPa8VS<2^WHcWEOmWWr2ehXApxI108^m7Z79(iWUcD9SV?^WR8Q8lZ#{wl^=nB zsuyJio)?;Nb$4QN79Iu{3m%ez2)cp?!MnW*WEUQS1|E!Mxd?*2f69-R9UjZg2%8EX z3m4p*(bFE)%i_x)1<*t%`hfQC&;PW1LPu>sroW+#;hs1Dr;vT7{Q3`w7G3_cAtSVhzBMZ z_`#&4tY|`h_y+fkLj({DWD7`-rD)Q7A$CyAaI-e80S^?&HJMH2IGbgCyG(}bhX%)r zzKpF#^oL;Rh!VB58G(i2n}P`k*Uvfhg+zzHC3&D(Tx%8*H0!NG7S| nl1w%k*r&ga80LJ#}7} diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_OFF_es.gif deleted file mode 100644 index 2806311fd1ccdfba0fd88e5dd7940e9d2351ef09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 701 zcmV;u0z&;qNk%w1VUYk30K@A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VP}*wcU8G z?|kq7z@TtQEan~&$>YIkI-k&}bV{vSuh^`1`}_zX4?yHYE}PHjw0g~MyWjA*yd02F z!sGd+!|yZ}b7uz~atj1}3KwsC26F}-ie!%vfogSkVu5=M7YrQ=m1To*3kV1a7YZE- zZj5sd1`}l-9-(QMc$yuJAEOJZ2$Ty42?z`hho^#sW)6d^XNQ1f1gsFm9S{%*pMaaD zkqLYU4j;%J2#UkP$qD5N2iw7cxS4t#oSp|C3hCS*kJ1_Nl;BV#GNa58Y_Q8rhkYLw z7?}8BPlF2+{D|APCy}ZJ5IPVr_~B3jh7%$G@mqC>L9d765YV%e>t3G&fM9u01rXW? zbO#1OM99p{#6i5s_#w)tVuxBECKw3G@#zN-DkX|jv~&W-M;9Kk`oQpIxrB1+<&opc z%mD=qc!E``V4{I(M9*A6Kme&3X%P*Sbu~djgN;sWVZGo1!2wTP8$|sINi3PN3DL$; zt1D^G!~f=%#JANgqzkA6rfOKG)Ts-}oHp7+K%die9|yrxX%gjJRRy7CF1nefJ+`bx zeG->4(m8zPl=nG}ZqGq7h7cu?MOf7V0tg&@o7Z@if_>-G^;FmHEHlk;INO>}zrKC? zmjG}GkfFc-{{RLk;D7`cXyAbeCaB;#g8ofVzyMwpK+A*_R%qdc7-p#9h8%Y2;fEkn jXhA0rGJwH}D5j|5iY&J1;)^iGDC3MY)|lc*Apih7IqX2* diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_stoprecording_es.gif deleted file mode 100644 index 94f9de9d67f7767cad0dbf53bd0c8900613cc8f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 699 zcmV;s0z~~sNk%w1VUYk30K@?!NAsdYQ(a#@(^qjd6{MZi$0wgNSX2T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zBouP}bMg2+4-I>02_AF}2Yw6}aeWAN2p)`Pkr9JycXJppdtcm3)5U!a6l=VY9A_zEhAPdb~c{1hPRtTqMW=Mx~ucZqa zlv6oL9cgq%|M*G0u8+cri9{)=MYvUh0}CLCv)9-a1Apq+{cHyhEkn(5jOUt9zrOuC zyEqKcz`wu${{RLk;D7`cXyAbeCa7RIe^W6c00Or}DB*+@R%qdc7-p#9h8%Y2;e-`9 hfPe)KU|`~jD5j|5iY&J1;)^iGDC3MYqDWE*06UjbG~NIJ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_transferconf.gif deleted file mode 100644 index c5738519258bd82b3507c823dec33330274367db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 732 zcmV<20weuLNk%w1VUYk30K@72q=Te@W`Kxoh(tC-T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5AR%UCX`X1Ru59bRa4ef!5d>SV z?|kq7z@TtQEE?P zA`-H^aq0UPe0~QVXcHF}XnhZ67Z7F$h6fF13x0i*mVFB!5SA00aSaC-69{Jy7JU#5 zl%%bbfq!y$c?M;neI5y#79I|L2_B{&3%Utt9v%l~9v2@7x)%x_j?fBzlhLvl&AADS zZw?;U$&(Agzva)#h|q|=znZgndUVZay~7hpbC>2`8g6GG z2z%43AAfCC^MO{qISxPnzys!C(}P_vmoc06?H&V#2P_P;=7-s? zo*%gR83(Qnx1wi!p^=EdS~HQpRLwDIt4>OI(-g4!(102OZd;r6(&)@g2Mc7^UF+l1 z5~F6p4j^S

84%Xu_5?lg}MDjqjp1no6&#y}cv<^%Iwj9W!T)o%Pzr5xVz|hWF4xvP$HiAfinYTO%W(i@R(RKXZsXbfDkOCWn{wZ z>I{naLr0`*I!>@K4bi>?5U5jI7ud3EIqiKFn|UWR%qdc7-p#9h8%Y2;fElG zC}M>nAtC?*9i*t@iY&J1;)^iGDC3MY)@b96DpFuUDHTkB!H+-&Dddnu7HQ;>NG7S| Ol1w%kNx3{-0E-uE# z#)*lE*4EZ*YisN4>*nU>=;-Kwe}7zDT(YvV?(Xh$b8~undObZoR8&;e)z$Iw@$BsE z=jZ2{nVA3p0OjT7A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPw{wcU8G z?|kq7z@TtQEan`KiNnEZI-k&}bV{vSuh^`1`}_nJ4#?v}E}PHjw0g~MyWjA*ybPE` z!sGYi!tW#YeFGh45*HR`d<XeKVFW*|NpUbZNDhu$W%A9~gWC z=7@1p4}&t}`ta?OK@SYpQEUuyj?_Gc$+q6C;Mmdv2M#z6W^5V00~Q+i@|aH{aJo2u z-uPi&p-p|(a-@d-dfJZ*!;*PzNr88>cd^_Uw4 z5_|zKQ{dt*eU<&S7iWXb0$WH3CaB<9f(*VP3j`bhkimo$R%qdc7-p#9h8%Y2;fElG zNTC7*2;c<)9i*t@iY&J1;)^iGDC3MY)@b96D_S4{0ToDq!H+-&Dddnu7HQ;>NG7S| Ol1w%k+9=(e}Cxc=-b=dva+&VTwKS;$L{X#b8~ZgdU`!QJ*cRtR8&;e)z$Iw@$BsE z=jZ1D005bpndRl>A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@VPD1wB2~F z?|kq7z@TtQEan&s2!p|CI-k&}bV{vSuh^`1`}_bB49DU_E}PHjw0g~MyWjA*y!?PP z!eh9>!si?2X%!X`fNvHFfCqvW6$f&Hgl~0sVsU#29S9bGg=H6+7M*Ps7jp-g2&j&4 zpPF!!cyphn3XB8>3I!bnr3r@w1qvUz9k(B-hz1=UoQwqs2NuPMwFw0Th#v_A9RiMr z!@9hq9i<;01Rm$Q7Q)rnh{&&Yv2wE?p9G}W6$GIb9X56QAb?ke2&Xb70BAs2g%8UN zBoLraKnDe%3iKl|ETBV(5Bd3PV*vpg37Pu;6~MP^<1vNvDCLQB?^Ct|7d#aB*Wnw_ z0uf5xv*3?ts1A{K@##RSgF1j806Iz_jOhoQIzyFNNU97UGZLcqJXh}1(+(`nNupQD zUb(baOB&cImdw`!2@GILFqGGY3soON6!7Y6~0h8%Y2;fElG uDB_4DmT2OMD0XUQ_#-7HFagAnDX5O;i|JDD9ZHPoRM7x%|T}oa5T z|Ih!bh^hbp0RPPYA^8LV00000EC2ui0FeL?000I5pde;sX`X1Ru59bRa4ehKU>IAj z?|kq7z@TtQEEU z1CR*WJXcu$e+qVN6&4bMauy7O3xyUH3w4Eua(H@WbbbvU4HklkXcwFopl}rzb_<&g ztC4b|opY9ZcA}^bj|d752_6Zk42lQ|4j;T8x*w~H3LYMxj|mM67RZaZ3<(H}9}EZ{ z1(Axzy}za&s2?2&9qPRn#n{@5%d&a2b+#X(2&dW=2uM}%;0fG^0>3IqP{oPCKn2Yz zd~l|KL4ke+JU9@Q03ZTm1S3wA_%9$F3k}x)OyC4C!9HIel{K_?i4PrpqPQ)%&>?|9 z58{3%kbp{`g@8v%d7$L$kB3tp+70|LFcO1ePe1JJNeYd_Q)vFAnLrh&I&`9>dU%~_uTtni0suF^K{ zfL88QeKhgil#3Ib0+Uleh)s~7181nH21+(4h=@c)L|t87 z?d|QVs;U400RR90A^8LV00000EC2ui0FeL?000I5;3tk`X`X1Ru59bRa4gSsZQpH$ z?|kpK7{zZ$EYcDOgwYfTh%y?@Q^PPsuR_ID6X=w*+kvRF;0i_7>q0z;8bsjp5~*C0 z0v^Jr;qfp&1p*%$9$P{g9tBYX9sneWicw+<9s(MC1$u;6l>`8N9wLMu8Fn9ZrXz?Q z1ce@~9!`WNh>jl}q>qgx1BrSc2D!6njh}>$uBCRUsUN)=xSs}}rJGk`hzl7Rfq$xr zZXc^7ty0#64W6W=)Va$^%_5eFfEtKm=Nj0cefqkQZ)%Y!G^h}x0D7neuqS|;DQ3;^ zXea>8pr}wK1UieQ%hni(BTJr4xw7TUm=`

C>oFt6t5zwQJE90)zknJMka$ga7~l diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF.gif deleted file mode 100644 index 64316ced737605d7f1754494f4d37c999f6a11ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 615 zcmV-t0+{_rNk%w1VUYk30K@hg4aqR5uR#sL^OG}}lp{1pz4-XHtw6xOF z(&FOcEiEl+X=&%@=ZA-fe0+S@*VnJFuUlJN#KgoN9v*mjcsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5peBxFX`X1Ru59bR@X0O1z}AfY z3b-EN9(}iHyTKnF*TTSN3B0Wz4ejTcz|yzD;@I78rMUfL6VC!WX$_=db7n}=t_c<_ z(2`YVn5Pfl%7hEV@K%Lr*RCmSH;_%hQzhHvB-=IX!Y)Z2FF2eAOQt(wpVFDZWeeA@ z0<9DlaEU-+$~7lZ9Zj?90t0$Jt5G|n^FzEo72lO%hZUoTPv;acc&Bg|Bcn^vBu$%U z*VjbI0`-g-QI`jZ7LHADr>@Lcm&Xvux<>&40+1Hsi6qIE&Nh^d;lXl50hT{&(*n7j z29)m^1r}Z*C_wR^*8)a=B|sbb!`jxcV@EF4Bm#!pxO3~?&AYen-@t^x%21Hqf4Joy}I@5*t2Wj{yeV%0R%FLA5Xr#`Sa-0t6$H)z5Dm@$@2*T06V9> BAbJ1* diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_OFF_es.gif deleted file mode 100644 index 75a5619688a3e2a42a61dbbe8fa79b3db34ebd4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUYk30K@{eD*OG`_kp`mGMX%7z%EiEmyw6q=` z9^&HS($doB=jVrqhu7EFudlD=<>h>Qe8a=T@bK`ZrKNaycsx8j(b3UTQc~~l@8jd+ z>FMc~mX-hj0O8@`A^8LV00000EC2ui0FeL?000I5AVq0pX`X1Ru59bRa4etPA_!cr z?|kq7z@TtQEE?< zAQEzY?YQ{;343uD25<=%4sQemW)^;p7ZYlSiGpl*c@brnXBHj^e}SBB9v5&E78Qyf z3?B*}9+C(LYZV?AqiUFXxt^+M9S9x@xF3WU2Zsh19tI8v2Z?=w(;uZD49v}D$H|Bv z2?QPo2CbbQ9So)D>Wm4(3W>G^uK?zwyPCNlo}h$b<17g4V9f)8RO1Z1A~uen2UWhT znF7#Em?~HYZQ*)lKwP0S32t?G*i56V0|Gt&B(Oz}SuuQgc#Z1kr;sOt>P!tYW6LHw zV;&qrd?=A;1!fl&@VwR2jIcBZE_nI?%G1hW7la`!lyhIcO*4s}!+Gu62a^$*3H@Mz z=rsce2p}zbmgzRCLD7iI%C;1(c@+XrXxcT`*L@MsOb9rTE?S~$`@waq6XmOmrs{5N z<}r<@Z4Sm|hSu>wU|7p;d5x*Bm)JAGh7~jWSe4prpTuEyh*C9e)!`D}GZXUXV%6Y; zp{z^qu3^?-_eq~ly}GWL8y;ZT&b_<$@8H9WA5Xr#`Sa-0bDvNESAqf^;>({;zrOwZ v`19-E&%eL_|MOV@Kmh>^kimfnCaB;Nf($n3;DZoGDB*+@R+!)-Apih73uZNM diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_LB_webform_es.gif deleted file mode 100644 index d7590d66ce46679810c1cf0441b664cde042b36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 583 zcmV-N0=WH0Nk%w1VUYk30K@E0aXAR9smac0YXern;&i;29%W|kC9d%1a$!b zcOz&W25ug(9$Ey71ww!Wc?_*KglB0@Qwtse8HydAwQ|P*d5p&&hSVN&pA40X*v)`~ zc>r}&BLsmR*OlLR$chAjtCWqvNrl5w*2}SPiz0wiuN-->HmBOB4;U~|!dAdvpnoD1 zl?b2#%?CAT-YwFg$k~*AID+k{=4uwGPY2h;Rii}k1AuFu-T(+NU|~#$9wQDUQHP^T zH-2^{#IOJ&$QvSYkQ8C8oynAeTCzkVU?xnI$ns!&gD`5iaV5}X{T3 zX+2?wMkHF)2&$l!14E^$v(*~1sCH4QVpYPNNn>qq9TT)G+>WG1B1@he>;Z?%m@{kM z%(=7Y&!9t#9!%-i^U<0Yt_C0RzD+x(KRp!W}C(G2Ae5N+^6UdOwJZ4Oo quxlvrAp`*)0%+XGvExPxAVZ1-sjEa*$p9i`z{62!H!8#Drd?ok z2@{2e$3Ywv3K0MlfB*(`4j3Oj9|UwB8cGBjfdG^fe`yMY01R{jKp0YO7m@%RU=ezM z2pks*2nqlLFGfs4w2?X=5FG#(8~}f+2OX+CL$n4J%*#3iA9ny53IQDu!V0Vu$7&7| z4Gj`>;8LK{ud!x-2OJy_-D_1?Q%N9kSU6u_naB*T#btI{5%dJEH*1KUDz+ xBAnPp-;yRx|_vNxXQrb?p`h;qQu1|7!xzIs_Klqyz%no|2J;@UsrdjzyDoY+N##p zyT-<$wzg^W=l_q4oU(WC|3ioVo0>)%83iv`@c-)7|LN(gTUzey-~T@)W%-pW{|gFs z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C*Kb<9~us{h22 zqLVpR^Dn$GessXW;l`S>({HQxKiE*=qt`DxvpMld-tPM!cGUQ-zy1ElA6dqL*Z&(D zo0?l{>gr`XI~h2YS!9{>Wf_#2Wo2@vu_!ZiP0#P2H(_Ddj9eL6-n_ZeIdgNk=T7fc zUNmLeyzTRNxJuiy>y?-~S(Rj!rInWD9#fW4Qks2!t?V&b#>H_+niBwZKG$J zmg6?YQ!Xp4*n2PSN|Bb&6FQN0OM0@hh{T`k>@(y987&GJ6qN!KVLa zw)wP?A(GZgOhM$|{BI8+xBx+9Wk2UnK9onV5WIs^f#R znc;TlJvw{6`l~n{W=HTWTX}`E_1fIJmksVG8adQfJdo?vees}KfawrBt9VVq!&Zs3 y6%X5F%3dfxY*%R0c+{b2r_jhM+_K|_vNxXQo~A0IC*EzQfzTUAxHc=2LQP0bZ6R$RV(`NoYK`}XbY=;+wE zaifciOJHE&`Sa&nTU$45*x>H&{_54MmoH!5yLYdwtn9&q2lwyacXD#-?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9Zo)R){*Kzv83o^ zj@A4NFD^gY5nyv;P1)(URr?=osPNJ2m*qd=cqDK4{SP~8{MO%o|KrbHhJe@q8ycIM zTWad+WjZ?Al$d3tbEdH3ma}bx8)w%#mTjK zMnjyEn8alV;~?Foxzd{yH!N&yVBmIfd1_E9zodqB1LL==Mh^_ll&+pSy)s1AWQ*!a zw=1tV2bs-^-Mp6h?uIpYXRCjg)(HzfLGMow<(rNMd%E z+A;=46ODR_idd!`UhxUc8yIK5JHFiH)RdJ~3fVXGKDV?}40l7xq?5@{zP`SwsHoG^ z)7aS9qobqG&(G@W>fYYou&}U4M@P`m(20qO;o;%m-`@@n4wjadHa0eGZEcZ}k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5pyP04X`X1Ru59bRaQsqD^=x>q z?|kq7z@TtQEDjrmh2q0(I-k&}bV{vSuh{H0Ay8_+;IMd1=6XLF4~FUST$lk%Gu^fr zn1zAoz-Y$jZ60<`7=Z(Q7#W0$9so>+0|lJ}85suy9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekz|x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2Lw1mv*tqqQ34JyArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0T4`WqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4)Ppuvzt7HQ;>NG7S| ol1w(~+0|lJ}85sxz9|UR{1HiYryS=}Ji5V6FACOIuZJ*Qt8HI11Y1jnB z%Ekw{x@e7{q5!4<9(|3yckjJuyuQG%ofsAb1_8DP2n0Anv*tqqQ34P!ArRmbK!N%2 zh?;gvz#3_f7+G*cZ5xJxl(uD)$mHQbXC4Uug!&Lb022W5wy}{(kR(2W0SsWX6(GX} zPR=msyLie;&!3$v2vtgGfKU&*Fh*nKsbfSZwqh+Ucoe8m04skE08p;dn>|8Z1|9n0 zX0{9oLtPl>6RK7Z0S-)UqL*$cT|x2co#s@ZOQ{`&TCIsyq*B4R>H@|PD$PQjgXDce zi$U$BcnkRmdJv_>KCpv#sFeiWguXc9V2Y)Xr8`Go~3nX zHHD?KAV9#z`IKPO%Qpqp7u{Y^F=s(@0oloAkRBK?Fpf+MHppBdZ4B@RhL%_*3?p@D z(%4mhDac?!?2O_MWXz!w$R!2IbrTsh)@b96Rm_Ovjy(3L1s4rWu)&Z-7HQ;>NG7S| ol1w(~|W)2P!L_}4iqs(7lcN-fbv9aALDKm(O zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui07L)|000E%@X1N5y*TU5yZ>Od2n?Y} zg+T$pgb=Gh8O38X6eBTwzk`AVU;#L^7P?6TClL@@l7@r%U@WSRtHiNgc)iu#v#fZA z!e)u)K#8XU2j&F}Og_SWAVYzR?|@@~14~0QE7QkIj64=`ZU$>?<}n=fb5&qrX<*e3 zl!y@Kd@EM#DRJa+ql<%lfpngAkyM~47mJy95(8sZA`=TYR}FV#vos@5AtzUI#+=G( qCT9EahOp_9EUp~9JPvm5?5sU~HD1AUO{}-C+_(S0!9((b4AuZE&rgg1 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_code.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_code.gif deleted file mode 100644 index 8fb2b8c52d136fe0dde19cb30b348c465b4ea4f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 247 zcmV|W<*3)8yg~)mb+hHccY`sh={7OvE3;t zGkSWNZEc7)Hbejb0L;w)A^8LV00000EC2ui04o3x000D}@X1N5y*TU5yZ>M)T7}RI z3&jkLP)tT6H_SB8M`k!c12}?5K;a*rKNfoTTK84YzYEC1hRb&x&wS=y1$Mi!o$SH#>c}E06Sd+Tg?Cf diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer.gif deleted file mode 100644 index 68697edca82b97cd549e24bb7f031ba0b74c8fba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09i%Zbmy}YXGOiav7d3odh{&ylGN@;1U>gp~T8;34m{(s}f z|E;ZeZEe%$&;P$*!T&2){_oxUKQeMkdirWp)5t@I{$IWN-^eI<|Nj3iEq78c3-v|vry>9ZSD1q%CbGOoa}kbvP^lbJ<|D1vdqOYvOLP{JyRC3Phy(Y+rzwk;^ZP`PFda= z%4@f+=V9!TVO3taY7WzG*}dy#=N(zGsweLZ1`%>8|w3o2x(MeJx;7Vv~I}=lciNXHS(saL?`tWxi5+g1sSVdvo5EO6BeA z1CL~LD|!Vl+1S9yaA(g>!vqD{6@pK;ofK41I>5p7Cq{^&GJj%+`G1#3I_6D|JN{3& zuhy0EK&^4N`Ja0X884nSa1`F1H0kkn#icU6`uTZF+C<~_P6-SAG^KcL!?xC|3tny6 zDV)a6oSo~|JXu(He-it%O`@+q`R08r+s+H~>TKm*z_3X)|clTsF{Cslnbk0M@4^tTAj=Ht2Um3h}N7Um>tPEaL zIylYlHY;&iJbhm9HhsYY&;AVdOqT=4?yf4fV`!Khac}-vsg7fl6l@}I<@DDw2ObF8 zt1MJ#df?#YfCZeEA*Eg=S+#ukRxaan_u9$Grse(4K1`iH&C?etN_co!kx7u+^K&xk5p9{#&5#9KMDWkK@AqX!wX ze|<1xh*=oe6lCXk=;It+k1~M}n`;cNj|*lbq>AK!^esLyEvD?{Q#tKA&1W-G#6BHo zmaJLuY*x;;m(OMw9MgP0r{r4Z^SKq9G#OciV+0P(Z(!4Uv7kjP>&3zjwN)<`^_W>@ I2ryU!0KPqJ;s5{u diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF.gif deleted file mode 100644 index 8bf2e44b703b46e4cbd6fccaf960afea356b8fda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmZ?wbhEHboWLN!aFv09mzOs_K7R4y#Z^^R($dnJnwtCe?d$01aB*?DeEIT<6)SGs zxUq5L#=yY9^XJdszkh$jh7C?mPWSHJd-dwo%a<=7Jb2*l?p{__*4f$F+S)pG>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwAK-lItRvNbVoA}- z9IN>kR$PfFv{9M2rtI|Fs{Ic(RQTx4J|FF#Hc?>b{SP~8{MO%o|6@@qO_8<;?}zi9QjhW<|lu?xabNmn$xn>DABAThb;Pw|7cd;HN3YXB)P)US05N%T8f6 zcBbrHx8}*h!uylhpKTI-{mFOVgt)DoYfmg(Z|e5*NN(?m#N};OFWE8}91i$KSh}6e z%t+sw7F4Zx=g``xKC5R>F1@=a+u`Svd#7_AGJa@bkUQ$uwti*s&K*&YFR?LrP3hn? zyW6bDWAXHP!Q1o&3p~3s*gahi9J{-!*p8uLa>Tv)XN5YBO;WIlyp_{m%N%$hXs?n` zq3VW%mjf1XnunBnm1O&1c=v8)#hJJeRaSkz-?l_9`j F4FH_pY;XVo diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_OFF_es.gif deleted file mode 100644 index 7ef98a94dd44bdb7586a2095872a72cada57f81f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;PY@~X`X1Ru59bRa4egWBS~AX z?|kq7z@TtQEEbsrv%mWFbdRFH=YA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+rhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3myO&$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&Q(7p}+%8LpSXduXvT;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0+DCZU9Jgg6zPnO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(V>^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sa9|C;U27mDddn^{7B@HNG3_f z7Z6aO!IMx%Ddm(@R%zvxSZ1l^mRxojWds#WU_l3DmTBghXr`&=nryb|=9_TFDJPmC G002A1=T#*D diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_dialwithcustomer_es.gif deleted file mode 100644 index d71bca154129935a3575853146678737e8ead24e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZz#Nk%w1VUPe20K@000I5;3R2eX`X1Ru59bRa4egZQ(0WD z?|kq7z@TtQEEbsrv%mWFbdRFH=XA8Uzr7$0|drFR9P z9v76FuXs*rO=|)Oj{=+qhX8f~85xYL00ILDe@?sszJ(aU0s&A3(HVDc3LXF%$O9jg z0fC%P9?!vv<5Ahqkp-eq7^%R)Zg&T)7p}+%8LpSXduXvb;A;RKIRx5xSY@izhin(J zf%@j{kwS*!26%v?G0=wtZU9Jgg3Q3HO_fMdLZ8sHHuJ;w2*`C7mcrNa3Um5D!Cxr&CnoqiHH>yn4j|?A(bp zUd5lS1SD*5i5G$kE}bA{1RxNlCk*Z4ZFVRUF0xKAI=Z^h!$Bxf<9!vo67X26NW0d< zkdThfnLN9`1yie4Q2|dA8d?>PCn$+}rK!fVic?mO9s(J-^+Dv5l7CM^W=Xksvo!>E z>a7{2^{LOJ{`w@1kJ7zM1oHuH=p?|%Vg`w-m5K7r)Wp>oCCUcuj<>(NRh9$jX8yS+ z>oN!sU|27mDddn^{7B@HNG3_f z7Y;zM!IMx%Ddm(@R%zvxSZ1l^mRxojWdsi>KtTs&mTBghXr`&=nryb|=9_TFDJPmC G0027-y;48` diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupbothlines.gif deleted file mode 100644 index 4e6db07e8ebc7913f658aa9c66f85ca8a575dc27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 849 zcmZ?wbhEHb>|qdKxXQp#=I$=Y#ib-7Vk9T`y07n4Rn>~r)DUCi>Cw@DmM#0capQ&B z+EiQHTP-br=FR(e<;ueDr3^3c5NS$=iMZ!;Tui^|#;u*i*+C@cMs4V^ecW zZcSaDJVS0*u9UnyOD>1Jbj}pk9A1VA47@q4@*E2mDb1NMHGj$qcD7vB<r6#H4w1%l^L0xY@3cmwtmxlt z#>nWFEzs1+!1!?+ufRj!7KY*+o+Zxhy-(LRDRHEzNIsI@QNkE-FJuMZY`6bC%*6*) zIt*G?XX@R}kam5bV%(j7Y9ZGP-)Oa2@69Tl-2x9TPimP0C{p4;WY*te0DZc4yz4GC_$XO4CuKDcZ&Ad@M)%x72 zX_8TmOPn75n&M@?;;u`Dw&%Oq-}9xJrTNa}h?PDtnL6|Pr7I1))fyR?R4TXn1TJ0L zT;$cIF(DwWAVAUW8;h6h*SoDxbbdeilezt2H@CQv!K>1hIS$K*_87-u8z3KfR>YbEMTx#w?)d6wj!FbVSX zUCN&4SH^sT$*YV>$5>wGR!Z3c9gdXmj)^=+rv}EpN%`iHHD}|so8})nzsO6Ah$%gp z;38(}KEX|G<&#O39~2o`|qdKxXQo~7Z=CN%PTD{y=TuJ4GoP&ix#!DwK+RGFI%?k;>C-Vm6d^k zf$P_=KYRA<%aLoJfF$jJ;!hT^;W{7^4CzceQ%(0q(Va1n= zJ3_2(tSLMFwrc-_4HZ6mv!y5aF&)X zZda~^j0|%wmyBf26xJLbh6xNjIjk~V3l=HNnJ_hf$_jS2T-N21la{Smq0pPNBX>^z zp6wHNb}!s2lOw?`!@fALJv&eSXwHRPc1HPWIg;}7GjB;Kuw9d3k!PGKasAj!nF}&Z zFLQ6POt^NR>-OWPGv_>EnxJrbiEHwghrHIA@_ZaDjpyd;mN4F_jYwJ1zuAnD(JlEy zVj~0N$8CZP4|!V{igS3DIJfscUE8FWkuJNjPwo*V6q1gIkNq z=cSG_FU>5;cP2-y^nuCLncpuRY1sX&fq_Y-a;s0^(xuHsUQHSk z0@4ZsCMf}M@L88+}z*a-$Ft{&d$z+goNJS-mb2$Ha0eFY;5M{=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0E_?-000I5pyOy{X`X1Ru59bRa4buY6>)g3 z?|kq7z@TtQEE*pb4&%dYI-k&}bV{vSuTw!_f$cgQ0Ht?KE}N+e?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RDM6RMzFj8eDei<(F8L2j-Y$mRSZE6kM>unryb|=9_TFDd(JY n)@kRRc;yC~x9v)>qJ(pWs+JuBuGc(G1 zdZ=Y({jst9rl!z+eg4$c{GOiu!osCwWZ8p*QZX_7pP&7_y#2qwLn$eSQBnTR&i%5o zvutcYCno>^0Q{JkA^8LV00000EC2ui0E_?-000I5;PYr?X`X1Ru59bRa4bjAWo>w_ z?|kq7z@TtQEE*vaM&rY5I-k&}bV{vSuhT(5f$cgS0Ht?KE}N+f?%4_!I{^U?Moma~ zuMl$DKh8P(c0l7~Fl7f`c9|(VcLV}T zCC*@Hkv=goY0p?1;RA~RRMzFj8eDei<(F8L2j-Y$mRSZE6->avnryb|=9_TFDd(JY n)@kRRc;|_vNxXQp#=I$=Y#ib-7^183@R8^IcoZO#f%T}bO{@u9oLTzoTt!;?0 z@$~5ETP-br=FR(eEHePCq+d3nLmGNO3KQ#w7+}y{5^Ci$k6a+bMwyp{IeDwNdMOqw>TYjv8lPG zrY>KBA-6MENyyRqqqC9EInn&Nk$}Hak>(h5z}=RsGxko<826y}y{z?%bSH9SQT3G}caXb~9{X zW8+@fdO$46kz>(|C7RZqA@7}Ha@pnxH+Ub^P7VW$Ketr~TD(h?w5JOY8Qw>1lIMZwb|!;cYT& zMQ7RjUm^=av}dPrna$aJ&5+M6y*v3SvUz5I zZO<#iM=l3Xt^cUEfl-|C9#h99?(F;?u?BVC8)gT}^nZq)bSyJ9TM*y(;#io8aba3- zb-TbLhllM7Z9i^TD^1II)Y>r= alL;|_vNxXQo~7Z=CN%PTD{y=Tv!MT-_`XlS&xwOzb;aoMtEfq{X}&d!yU zmFw59KYRA<%a<=(T3YVhxl>wN>gMLQZr!?j_wKc~x8J{i-_g-=%9JVD+1byYJ?ro9 zzkdC?nVFffu`vS!!>LoJfF$jJ;!hT^;W{7^4CzceQ%(0q(;l<@k z3mhzNtSLMFwrc-_4HZ6m{nGsB7?0%bzW-rIjoyuweO;jr}t=Gfd2zoxe+= ze@D-TjU{c_`SP;4$8)(D<)`LI%FEBVD51c1R+d$safZaXocmK{kIOPW=#^(xxP9$D z)AB`kHqQ8b>r~#84*8r*Tz^m868<%>LS*SB8&V z4xU>7QEvjHIO9F0j!WFx`8{F{>O42h4wUKt3_a;sW@@$|zVF4cFcag#wBG7=fkzGx z+ZEb=+^$xdmhq^w;lsrPEYe$EJnA+$rt!GPD=7hb#-;l&dx$YLf+oquCA`%-`__^N0gM5Y;0^cHa6zw=8un$ z*VorGGcy1H0LseBA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQs%y^l*5t z?|kq7z@TtQEDjq5j^e{?I-k&}bV{un1ca(~%jG5j%C2}!USP=RwDcRUE;1egz`z6u zJb?l;lX)5lcLRD&0UiiU7aodu7fyUmi5H1k9~d5$i;7JL9+XW59%q&XiJ2d8i+z@< zhg57!R0skA7z7>w9{?T<7;t)zP6M47g{`0gxF3@k7_*LjO_8OImYB@UO#_8=jsmiM z%h(yT%m>yOx}Ixbuv5C+=mwpH1ETI0{{d-1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUL4NIE1B!vYU_5_N>5?xeI^p&EMNlOdU% z4-D!(u|=trqB9u;@HA(MkFbd!+es05kt7q79vz}O!-p4K$9zdk~+2;_?oCon4m^U?FNpVl6Ug#$<*ghAaj733>Y99?r8GF4HPQA2vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@kIm_Y+&Jq7-p#9h8%Y2;fElG kDB_4ALSR7w5_F*AiY&J1;)^iGDC3MY)@b96H--QJJ9*hPPXGV_ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hangupxferline_es.gif deleted file mode 100644 index 0d92a89c926c8a76d096242b198c75a11ccc3349..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 702 zcmV;v0zv&pNk%w1VTk|`0K@^0Q{JkA^8LV00000EC2ui0Eqw)000I5;PYr?X`X1Ru59bRaQsG2RBd>! z?|kq7z@TtQEDjw8M&iS4I-k&}bV{uj0)(n|%jGTr%C2}!R$$2JwDcRUDl(n`puhwK zJOTqVlX(^hcLRD&0v-rV7aodu7fyUmi5H1k9~d5$i;7JL9+XW69%q&YiJ2d8i+z@< zhg57!R0shA7z7>w9{?T=7;t)zP6M47g{`0hxF3@k7_*LjO_8OImYB@UO#_8=jsdcL z%h(yT%m>yOx}Ixbuv5C+=mnjG1E1zT}(V<8PojCk3;NH46Q-DP)*rb|BOiUF2NIE1Bg8~nF5_N>5?xeI^p&EMNlOdU% z4-M))u|=trqB9u+@HA(MkFbd!+es05kt7q79vz}O!--UY2Fg5W3-!dN!h%T;HszB{ zKtEjyo(K~fu2IsZn34t<Y99?r8GF3lu882vo8U zpa$t`ln8+6@uqB~&1Bp8rN)5>CaB;$7~C!B;DZpV@r45raA4tu7-p#9h8%Y2;fElG kDB_4AN?^eR6m+2CiY&J1;)^iGDC3MY)@b96H--QJJ0|QfxBvhE diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header.gif deleted file mode 100644 index c813b9a36fa4c7582d6715220636a63dec256744..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmV-)1B?7eNk%w1Vd(%40J8u9zP|1$DKn#^%nl9_Utf2Kh^l&enHw7-Qc`9_L{+h| z-IkWSHa0|UZHNE>0L;w)A^8LV00000EC2ui0OM)j$~<` zXsWJk>rw}F4L-P^01E-1 z3p)?83k3l_(9%1|6U)55i@|5D&J^3W)#yUr65s;F;{Xbn*_aOtdjtoq1v2j(06DYZ zOae>|4(zI+>f68v(IhM~FwlsoSos1_0Mc;d!*>t=BTh*0u)&T4)ZRhTM-rs6kNPfj zeDE({GDSInfNS|}2ZMqbVlrfBljqKoDSzU8pg*w*2M9DURc#qKWnGuuiu;w}!i*IFsL}`EKtXU-+!kEWPjD=^1O^nyS9sar zE`DEDyL$$KTbPaE%#6u5GB~Rllu8sLwL;Bh@sKDrFu-z30e5ExCLr+20#*&OB`Mgl zqXGl`AhmV-F78^mQfm*jAe6#hA*lh!9o)Fp;oJeJ5x)GG7Zo2fDKM~199?F!qiuTs ztU=#;9olPFFMFn|O7 zj0$UuomR?Xq-G}MKx?MJCjcr6BtU5)uf)C}?X=WZYwfkzW~=SC+;;2jx8Q~=?zrTZ KYc2>800283h;Ot2 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_header_es.gif deleted file mode 100644 index a92c2df01aa8d9aea2d97d0d6511661cb01b7cd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 639 zcmV-_0)YKTNk%w1Vd(%40J8u9%*_97ZHP8DM3$Dj0002KzV4%=%u-TjUtf0)4iT}j z-5VPsdU}~DDKkVwRfveHA^8LV00000EC2ui0OM)j$~<` zXsWJk>%MR-&-6STg7bieaJUSH2q7pI5vYPgP-q#DwJ7M&Uro{;^ zg)#-1DOC}ZaRxM~z(*xGtx;tzLh9w_0;B^JH2o?QTmhj}=y{`Hom7XO{P{&3v2=?SkEDJ={ Z-GvxtsNsejcIe@UAciR7h-gIs06Vm=^J)M9 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive.gif deleted file mode 100644 index 8382205e6fc8bea086053783549dc60c04626c82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 791 zcmV+y1L*umNk%w1VTk}B0J8u985IxCt$cQ4M~ZY)sEuV{Q99bVg#F~d{Mx2NIVt|? z&a;+m{ok@cHYWf80Q}ULA^8LV00000EC2ui0Eqw~000F4P{~QFy*TU5yZ_(u90y~b zXsWJk>%MR-&+$Vr$fNIk@BhG{a7Zi~kHvrhhip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+^eg~7fvEEZ9I0c>~<4m^fC1OSE(340F-jgx>oi8=y?fRl|2 z1&%ulhI^TY00Te)hNwISpQeKkoSmSIl@9|B1(CC?I)#Up!J-ZT35)=HlC!t6!33*1 zvkrQrI-k3_jt!bW+PgfG#>jiq)S#cfk_5b*z7N2N!HnPr+~7Kr&BE~X{65$o7_gS^ znyw$q0Px7wV2?cq0_24Pl`DZTWz>SiM2O1{k?=z)BJ;0|Vaa z80bjkgHP;qED+G_(gRTzY3g*)AfHVi!2bM6lnb8@MzMJ9lcvj1RA);6?5J1_lC}l| zAo+k+AXmhv4#fWO2^1}$TrF8RLmYl3mVhackFB0|XD|q4Gg%XG0p7t|-eRuLh*AZlrqG zscQ#OJImWukT;OFKLUKR{mT$$Myy^7yb610X_}(&3GcBRw&IV>w^Ma^y7~{~M#cKn zp=}bl;tw)8mA!+J%e_arSMIU?l0Sj>gfx}Jc>$T{1A4rGBMNg5a5I2X)+`7JF@FW~ zlVgurW7L4Z>?hGb#EetkhM%Ef%{0Cs2n|uoyhD>%+~o91Bc+{$o;KmlQX@PbF6PrB zG*Ty?fs*Wk;zT>%WmpdkEp!lj$Oxd8dFat}SUZ#Kh({87@DWOvUdqv9m}H)@WtnJt zab}uqTCrxEaEdWzoOH@rMV)vep#%bcWaa0dfCeh)poA7`=%I)v`o{nT5Kuq^kVY!$ Vq?A@_>7|%vs_CYjcG_tK06Rd}cxV6s diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF.gif deleted file mode 100644 index 3357ed2be1c10e76f3dfc5e992c9356475384dc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 786 zcmV+t1MU1rNk%w1VTk}B0J8u9d3kw%MR-&+!v5#iQ?h@BhG{a7Zi~kHx_Ohip2Z(5O_&lv=OYERmYidcR;NH%u;@ zcjL2qeND69aHBg;uk+@`M4~>}hx=!E4hB004m$`AiVXughKi5~I|&Yw4*-e}l#q%E z4GxVupN*f22R)RMiKm*CJPr*#1COo`oRF!QmaPYyoPIijgpP+ci=~aUk&~_iiUF;+ z37D+Z4+pT1(9Eitt-F|@Jf98Pwzm$c&chFh0KT|)OIJC z94s9H9I(PI+z4fJ?ATn5j%MOfUbfC@oA!MCx4)AX0Peq zl5eZj8)V>7U$=>XC1#ebB&Bkd`*o6+mq){NpAuPW5X)K2z^2EpK4hrT=g@&e66^a@ zDAdgvK_#?=vxgxd4r6zlw#*r2j50MT4=VICb&zoRiG)c~J4#j@i}N@hOe@czna{a$ z$f*(4-z$O2#{}^D(d_luk^e*!+rqok^(BeFc;}sC7Fc^YB#9wPsdf<~Lg^)2Fk#sz z3w|c)S4={%Amd$twiI>CF62ezmm)2l<_C%)zOs@s;!uZ^htY7-l5YQ$6b>w30qBp3 zVvSf}j((xEoQVjibx$Y~8SvF&yI>RFV>e=$hg)y-(W4zt;KAjWYj_Ffm}H1a=9yZU ziRPM9Sjpy_QK$*$oJkx|zyJ&6spp=2_UY%JfCeh)poA7`D4_rl5C8$JHR|Z2kVY!$ Qq?A@_>7|%vs%ZoOJGAd}TL1t6 diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_OFF_es-orig.gif deleted file mode 100644 index 638ef859afb2ed25d03b46cf000bbfc80f92055a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@FLeQ&2@EkLPA2{-`~#8&fMJGuCA`$-rh$?M{I0tl$4YZ z?|kq7z@TtQEDjw9&f>#tI-k&}bV{vSuh{IB5m0KsOajIL4r2yiG5I;bTn%F=#$D!m zzn;AQlF{ccOaXcs1Rob3Q3f6eP6&DeYfl0NPl9=bOalUW0E`%Zc}xX^O$Y#-2Vizf zUl|#jt_T?buCaz58GIgqhf#+LO#~hS7o)&z9so{005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zpEGYq&d$!>-rh$?M}&lgb#-;z+}uJ!LX?!0Y;0`i=H`!&kJs1N zHa0dhGcy1H0LseBA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQr?^RBd>! z?|kq7z@TtQEDjr!&EmssI-k&}bV{vSuh{IB5m0KsOu|I~4qpymG5LA8Tm@t3#a-rl zzn;7v!_nt4OaXcv1Roe4Q34(YP6m1aYfk_LPl9=bOa}mY1B@4bc}xX^O$Gy;3Sf3i zUmP5pt_B!9s^E?xqW~H00RL50|R0n2(=s^3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>fdQ1X zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!3x9xi6hgqf=Wz#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*2~e6q zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1n7>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8zA{<> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_hotkeysactive_es.gif deleted file mode 100644 index b064725c50f6ae0e8b8a0adcd4d6e92c19197c74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1231 zcmV;=1TgzYNk%w1VTk}B0K@&A{{RXy6cgs6>Wmw#I_Djrlv zGyK}7{ob+AuYLaQ)TN7L{MVmSMKS!>o|1c5sg7p-005M< zoGX*?!#XF57%^E>u}Q{78;2n%=R`n&1Q9d;dK49K<-ta{4%GV~;20AHEwfAnQ?ZYq zIUeXNLxj)+fdn=!;cD1qfQJLrn7njy(a9%2?h@!JP-xfCFFU{Vq*bd;P$(UlAiXsc z!@gmalsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM4Tuv!6y9xi6hgqbSfBv`)FP9Vk%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKgKfRqA(C;%D)UUJW70QnQ0Lm&bmqJJc2F`p}& z2z3fmwrv88SF_x9oHu=}*~Fbq4O0v*9A=iHteU~J~0IVS|tyBJs#=7>jOWUYW9^5LucoB4#FbK@W zp&A{{RXvw~Tgs|>GAbTaM>D96 zW&GNv{ob+AuYLaQ)cn?-{p7#=*Po?}WZAcal6zQEMKP(4X1SYhhH+8;>dv#4Z2jM| zKsF~sIVk`D0Q}ULA^8LV00000EC2ui0Eqw~000I5pyOm@X`X1Ru59bRaQs3K1Z{Y( z?|kq7z@TtQEDj?Q#^S?lI-k&}bV{vSuh{Ih5m0KsOu}UV4qpymG5LA8TnA(5#a-rl zzn;7v)6wTKOaXcw1Roe4Q3D!9s*8>xqW~H00IF40s>+l2(=v_3b?v} ziqg~`kyxu`w@t240NYHj=}-upg&&`Eqfh~xsZ8za06sXP^U1)yC%yb_8-?b>0Rfb> zoGX*?!#XF57%^E>u}Q{78;2Pv=LA3i1Q9d;dK49K<-ta{6x90w;24txEwfAnQ?ZYq zIUeXNLxj)+0R%QJ;cD3AfCmNCn7njy(a9%2?hxoHP-xfCFFU{Vq*bd;P$(UlAiXv7 z!oFdZlsQc`Rh>Jl*lGnRRp1mQuT9cg39F^&-H?Dp0ZXgM52FEzZwaO8hmxYm1%UPS z2tYwyhZ;X5KvdHSPOx2A@g!>Tuv!3x9xi6hgqbS=z#R4KCe&%RSIR!ji;bHbV1}PZ z)f4oAVI~g|b*4r)R@>fBv`)FP9SZ@1CV~hMs5Y&dlkiNs(M>k%tVL{Ew|)BU$}BNs z4wIGlz|`DyimdrW3OAc{RvRdXMCKI#Bc`BI(qRy#S71LM5HJdKg>fS zm~ie01Hg9&HZdBa6^%j$0I)IPh>wOwS=Cz<{_{>wFZD8)n6DYt1YiSk`d<}*4N#gu zi$oa@hlup)(IS^Q5#g_Z{7FgwRVJYnQfTGmN|ZGI0P|63(O^(xoWnK=3LOa`AWUKj z7K00_wCz&Ymt1zB>P2%!WsiGuxR+1?0jYGzQ8smxhk?Q}IR%}0^z*K0q*}Q!8qQLC z?_v2WQouz~?fO|0-c|~kuWKFb5e8Z*J4L630^&%ZppbFM971Kh<}T4TF)b7MHbjOS?NeR^dp`MTV}!QUErZ8wrr*%(8YZd&sJ--U4g2+cdU~Z>~i18gWPq z%vu6?-cn0(itMGd)KS1pZAgT8V7GAJ3D#$wfF3w#*g%sl%Dm_qw_bJtCygwBfP?32 z9|d5r$+=GGow$_29(Xck6n$PPWgc33s`$>^*viDT3QUL>9Th23@TUtpw8~`K{|gFs z2L*MUJNG{~cdMqR%jV7h)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E&9yVzMrs{h22 zqLVpR^Dn$OQrOwB?#7z3({HQxKiE*=Qx+l6IkD<&-tPM!cGUQ-zx|$_;n%tMzyCK> zRAnl&$+Idm$V+E+DYME?oWwR^k~~BIG%lXr?z!146MM4SItsYEla&itwgx`hwbHXZ zVD6#xEGCu=g{Em6i}P7nK5#fNEN;sZ=`h&p(7@2H?JmIaq3AxlIWO}jMYj_RHvKP? z7F(A&!&hk0qT4P%eqHlj;W%G@@=nWT>v>PrGT&f$v8`bl6Q97($ROo!&IgK^yMLCH z=`@^MXns|}mZjKX_r$fkbgNHqJis=Q)p1*+R`89`Dg5e10g~HuR5o3@;^}+)^PNL$ zUr8Km9yyp*yrl+?_ zZ)9wLd{U^N<3(@D?sV1(xi==PJLn#Iyi|47u}0+`sV62c6=rB~-Y58ysX!xB+NS8b zaNxf_sdX0$HqBl+vu@d)1DgUQet!3H*eh7kleykjXaWaU#TI!t=@m!jTAb%SaMJF# z>g5Sulh2CVooH8R(@;uPo|f^bv*?MUBdgq&7mvCPj%hsZF}arUxYy#@iexsC1O`VA b2R6+o6I{eHpG@>nTlr*?j~Qo*0E0CEWCuUM diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF.gif deleted file mode 100644 index 9d3489fa69695efe455efeb36ae42ac915aae10d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmZ?wbhEHbtYHvfxXQo~A0IC*Ev>1k$;->TZ{NPEs;b3{7hk@7dButqH*VZ;adFwW zabrhEM_^#!`Sa&DY}oMN!GnAE?zy|WJ2^SEwzj@}`SSk#`>$TTDl04N?ChL6b!u*I zu9=zH#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T4|qRy){*Kzv83o^ zj@A4N8b=a4E7sjuQ+E1o)&2(?DtyWUgxDumoz2^Q|HFL)7w2an`L58R$E5_cbAMbOV;!}7U_u$+}TpR zGF;1)rcGqqJ&j>ac4f7al%n)*MaDHUiZjnK@0C_$nl$6eH5q2bo^xkTWnW?D+IpgZ zM^RCR@#>n_xomf?z3MoA>Fo?9#Y>Za|7Ci>E4}1dgi*Spfn~CC0L#|EN4r*fmIur| zl%B=Jk|EGEZDVmh8_Nfd1ct?JSt2b4TN4g2v}?NxaC|6|XE*0%-lXVuV!@{WWm016 zGH3V-En0Nj>Bp~YzAGH(%TL~Exokb}samER3@^4dENkKw_!$|bJk9w)5p(y?k}{o! za|_L{D%i3FJM5mgc9(AT>5UC+6ImU%HEIRl2%W;Oo);jwJx68Jr7NDkw?E%GwDy(6 zu~yE&buN8D`m3wm624@(wcMO??$ysHX{L;|Cv(_WCuh&L$Uh~m;KO_VfM|MpoAkzm zZI4e1b#uJvE!myUIwAAIgmnkqLywoLuG-e9yd(9*yuh{p-8rx+K;q|jABVky6+M~jZG{3jxGJ{DyGgA$GS}if=Yf-Uzf~_! z@S1#9-0noXLYszCs`9jqN1a7a9v)zp-SXm5x4|)u$2}(3G9LF@JX@j6CX`~p$l<`I Z`DB8NSmu+79%?I}O!6_~Oc7wP1^@>AKm`B* diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_OFF_es.gif deleted file mode 100644 index 45bc42903668d2b577952a8946d2bd179c5726c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@ zO@aXcXC7+@gt3=;8Mzq@f*84R2ZxDrtBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP6?_@25Z+$1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#n;~4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IA|atS+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYEnk9b# diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_internalcloser_es.gif deleted file mode 100644 index d5c05657affed58bd7db42399b8e774277bff82c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmV-`0)PESNk%w1VSE4(0K@|FN zO@aXcXC7+_gt3=;8Mzq@f*84R35SVttBnk~Xt@`ex)*%{xd3{b0itbe9=@~zhEJqq zP710^2y53&1Rj^2XdiK+%XQhUvUc-Jh=G3knylDP_dcZCH1FC1Lip-=8v`YulXFV~ ze#oaF4*>wq`UJqh5yJ;X9MLQgrY{|VMoS?5w&{rB)h2YT9ARJMwTD-qzjNSA-_18QgYhF(xoI#ZNvo_*t1VgC*PnPT-9kKP$lWs4L~!1 zfPkP9ldfqHH(#Rxc@zSL7_=fcR*2+$IEWx2S+ESDq(hZ#lP*WDU^S-YtIaB0%}{=j z)^FmlH3#*ol%-2v&VwG$rQ@_R!?tdScRCpWAP+QblRn0o!{<&OP=*G{(!5rkQ_XSu zjsD{?VDfX~IC)AFYE|_vNxXQrb?p|I{u)Dwi9T%5iTG}cR5v7=zney_+t*v)$ZPTi%&eYXi z+PLxm^5y@HjYH?p|9|!Be^b-Q^z_w6M!{FE{9mx(e@e>o$jB*s_x?Y0=>Pux|65w_ z1O;_yYPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>E)7IO?n;)qi41 z(a9XE`4?Uof4-35aAQr`>9TXr8w&d^XwM-mV-OSFT)C5#8TxwJ@)`MLS@KyHDRazSE-RD6xq9m2Ra5df zX0K+-W$Iph zrld6G%9`sJa+ogcxV0zu%JE0+JCsi`^W`$SY$z(uiI|^M!nG?f>^!ek>Si{X1ZIaQ zGr?j9)`ahFi9CQSjq}U)jzOk{CSZ&|Y9QJ2oL)|hUCV;af|H6a@gvRgb`@wm_C+l$Bj4s4oF nCb)=MK4BH~FmUAXF?;!Ba)6uW(|_vNxXQo~A0Iz;>ePMv_VM!ac64+|OG|5NYF1TM1qKFg+_-V^;>9ag zthjvn@{JoeTwGkvpFjWL!2>5JrBKpDbWwbwDJ@PYi7T4|F|o){*Kzv83o^ zj@A4NFN8l`h_Jb_rtI|Fs{Ic(RQTxi%TH!=K9aZl{)Zhke(P_)|M91mG2r$8hQ_Am zmYTX!8HRjzncm*69BCPji85Tdla(0ydfD?C`D9q~Sr#dA&Rs4eox`zu>f%*X@;GO& zX3AyiWz6N0nU~jD+Lm3aD3dR($ksPOiJ4h(I*Z~2uB%Ei$NLWCa4IshDsIfV-o>t{ zIOWQk>lbpEF6_9qC-=(nM{GNkPBHW4GCFN2D$a?RpH#xND=_RluT|=1Hi-mghp24= z#SW|q-`y51OBU9Sb5by1G00*FDASqH@Tj4Rm1{zdrqY80W?at&HcvLbWb{8T$AagA z>4MOXX@<>t*(IG<82EnQvN&+UM>0_GFAGFF#2(CMe#tmVt2g-K0k%o3EH+d8 zdV>yxHrTcX?ECX$Vaq{N@i|^OD@uG*#2==~FkH0wASxaF(@n@tbYk$sszRB9Xb!$D zCBD%i@@z{Ma2!lzaZhhqvf@#f&a&2+Zi8bQ$_h0$6CBwso~?M?XY=jF<9-J=%_kFF k#4J@(asHj9l zMA+Ea>gwvx&(C&tcHiIMLPA2`-rk0WhOn@(;o;$5Utb#=8#XpJZEbCqmX?u`k=fbV z=jZ1%G&BGJ0L;wHA^8LV00000EC2ui0Eqw)000I5Aj5EEX`X1Ru59bRaQsru6K!~| z?|kq7z@TtQEDjrz1>(bOI-k&}bV{vSuh{H0QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rool?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SSX502)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbfUn&Gj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJLwc=dH?_b diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_leave3waycall_es.gif deleted file mode 100644 index 9aa297085d5eed34bdb8df8fab8cce05a9863d8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 834 zcmV-I1HJr5Nk%w1VTk|`0K@s(O0Nr>FljGgYy% z|9*bbpP&C(S(Me)|GvKeWMrpjXR9(YQ^LakprHRpM|TtyA}J|EQc{R;aJ$aV|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0Eqw)000I5pyOy{X`X1Ru59bRaQsfp^Kf{s z?|kq7z@TtQEDjkE1>(bOI-k&}bV{vSuh{H$QBi8Y;IMd1=6XK`kD%#k3kuAN$H2^Z zGM@|P)An58A94c$Odfj}7jbh;7=3?DdQEmu0v>>Ec$gms9u;+co{Dr$1Qr$tO&DvO zo)rlnl?4PIgtGx=OPdy!g#Z`>d$1Ovc8QT502KqCjjnfm0|kgo0>g|J7{9@J+mlUc z7NZ`(2LsO)7Hc1N7yygHp-cb*0Jdx6<`sCrjF+2ca z1-sy>O}0b|)lK6DshbBU1}r2iMA5*7X961k!SR*=02)K;>SVxR@53wt7cLC=U?D)r zk+Td864)hI&yjot=p^tVfQ4BrJ&1g`?&C9jiKJpnca z1N~)aObD4O0Jda+4r`4_=F2kpbdtcoGj|jd;DFPN2T5D|8Inx^1MGK!OLv?U-Y^-E zMgTi<81Ud=u+W2Ig0D1k0frj76drIz@f1u;e6(>2hD;pb!H6Fzl%pSj2y!1DO7ZxC zj|6O_9a()~V8?a#M07_%e2|992ZK!6NmDy5`D2d*46r2=oa|u-T2&5)UyWqMDd(JY zS}{`m}aW!rkr-_ M>8GHE8fpjtJ9O4$D*ylh diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser.gif deleted file mode 100644 index 0e10a2ad0225cf475271ec34f18341d2d857cf55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728 zcmZ?wbhEHb%w`Z^xXQrb?q1HtC0J0fyS4SMh=`KBys@oqT1?E${{DB%m;X054&Au% ze_h?Bw6s-KRcGeU|G$6#|CW|J>FKNY?){&VvV6gU|A!9!zk2n5WaJbhqhM3h$SYU= z2L*L#YPy^|_dhpx>*me>)zuvt7#L>G{0}6l4itZ~fX&naksv=Yu>C)9`k1qhRR4)3 zMJIEt=KGyyHe!rie`8JA>9 z?7EV%Icr-s*D+=06Hk?7GCpx-uzyvWd|D}Q$<1zYh51`b__i%%49GuXV8Zlr>Ew=O zj)(2bGZtnZU&pXCbMKCgF9jGFJslZtx1iGTa8o$4P zczAoIz{BRhzkhsweg8Z#;r(Y|<4|Ce@|fVr!J)R|K@*SJiwDgDZW<3;MA#S^tO0TG BA87yp diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_OFF.gif deleted file mode 100644 index ed11b7aca56f642f2c94b6f0aaf0dc776759e7c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728 zcmZ?wbhEHb%w`Z^xXQo~A0N-l%R6=I)QuZAN=r*?YH9`s23A#7?c2BS#*G^;E-oup zthjvnaz{tU;>C;4pFe;9{{0ObHoScKva_?($;rvx-TmIZdu3&14<0;dZEbz^>Xn(9 zS#ECb#EBDc-n{wj*)tOp69xu`GiS~KNm>BKpDbWwbwDJ@PYi7T9eSTQ>qzyVSWopnQa{mU9&q@x6E11#hcTRo~bx3 zi;q!}Ra#MTi4vDD~f zQq6|QSs~0hoCzFfUYwZnUBOTJ)Vpg8d<+~c9j(R9=a_DBEIA~Ru{glw&=kcBZ4HV( zEH_*XzC3+B?XqcJ^0C~R$CB(;uHg7loY9#-YuYuoNmpM?U}!)7O^1!)fTOfxB_mHr zo<~DN!}<3jUz^S(>ZF~$^~Uq^ABjmDcxBeG2B`QHulHQ-8O&o=YG}P{-vy3}?cN_5 zn0Lu^Z}3==#Nl-G#WL%8H4980eB;T~?wC@MmUq4Jy`P7}l3hJ@msZE`XV>`s{lmlC zl>!T!|Nj2*`Stzt`}hC<&%nmW>d(*5M@L8B-`|OeiLkJ+(9qD~;o;ui-jqodih?0s={*k6}y;ut*mI37MO79tq0HyhsGX#7oH^0ozF4 zNVR7Hz@{E+rUeEc2C&i4#gR;+a!Jlg)k&2f36vSq=JtGBg`w5658yHZ@r*%5D?EmO9BquB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp#! z1{{&tT*r>ohXKAmILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=F@pl;@@62qL~N4)*Zi*G z>NU{<23;AT!`yX%G*MoYc^gomUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- tP?(^hx%21Hqf4Joy}I@5*snK$Ab~-L@8H9WA5Xr#`Sa-0t6v`i06U$v6t(~W diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_localcloser_es.gif deleted file mode 100644 index d36e1944c7976070d7192840703d0a7963d2ebe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmV-k0-^m!Nk%w1VQT;o0K@ z|9X1NTwIwmGgY6T|Dd4%GBQ)u)&JDg|GmBc!ovS#WT(Hs|8Q`-DJeu!Qi#sZ|7~rx zv$OvvCqV!J0GXNpA^8LV00000EC2ui0BZmc000I5U?gc|X`X1Ru59bRF6CGgXWw|P z?|kq7z#!03K`1`Rq;kn@I-k&}bSg~%jMS`l%k3(y*e9cb0R%n^%wieHU@)08(hWy4 z-uN~C%~)dkOBZAW7fEez8A=y*b{JJxM@|GD0vMD57aoO%0+gKsXBnOz03V`zYaRt} z1)548iAoF}0~iAyeF2>qodih@0|QB-k6}y;ut*mJ2br659tX@r*v5D?EmO9KwuB8)ZdnKO?_0?1i)0f2{f*`Qc-(hp!J z1{{&tT*r>o2LZl5ILnzN*{q~ZS#t9Lby5JEazq)(|Z{ zKrpkx)=eUip_KtqYuT=ZcF+TywS8>Du~f=!0g-+`5GZh=af1Tp@@62qL~N4)*Zi*G z>NU}V23;GV!`xMXG*MoYc@t2eUh2f@RI&Wrm4Hm6NP437suGE1FTjHfr}BHa@#Dj- sJTS1Kx%21Hqf4Joy}I@5*sqT{0HK5T@8H9WA5Xr#`Sa-0s}BJHJIMbIl>h($ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number.gif deleted file mode 100644 index 33f303308b856190585ce243cd5c6585bd7de6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmV<60U!QHNk%w1VR8Tt0J8u98yg~{qs)4GnGOySUtf1bL{(B!X0fr|DJe6)zV3*K zs+N|!Ha0|UZHNE>0L;w)A^8LV00000EC2ui0CE5h000F4@X1N5y*TU5yZ>M)j%4{T z%M=jLN(sUvpi{#HGNUt%6zn?I52&aBb+O07z$hdwf&#;Un;Z(Sr-V@5I0gyHf}teW zdX0f$0vMzkhJ~D`M9Ag1gi|f`BzR zLr$asu|)v~4w^-5-~fjyv}h6JfeV-EmYAF>MEWw&LV&Xl49UPXp&MJcWEjxx!PA7} W$B-jSo=my2<;$2eYu;QU0suSAL%4$g diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_number_es.gif deleted file mode 100644 index 6d672accc6b9494df75a7665685349aea7210c73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 416 zcmV;R0bl+{Nk%w1VQv5p0J8u9%*_97ZHNE>05mX^D|zV4%=%wJ!38yg}H4iS2K znNm__L_}4wvE3;tGl+<)A^8LV00000EC2ui0B!&d000F45XecZy*TU5yZ>M)j$~<` zXlf0_WE|?LDAf>;LQ+VCeUpJeMeqv=0=^z#CV2r40YpM^$Qb~IMGgj73mKnf0uguuMeBd!NkTmViRL<~YoZvaXI3 zR}+C)h!l$xL=6ZHj6_il1qhFk01s@FHjV(Q5|A83uLO!hjJGWSM8n1d$__Ti1P-9W zE9H(@)%_qi&)rXIi>ShWSLj4R%Vr%!7+P! z@4OA0^5!gDJ6Cz@x~(${7xYb4UbQA~^6{QUbq%?BN({XWN-LPJFce(rWm1w=mR6d| zsl+s^-~qd=lF~ex8+o5rykmODz_I)KHsz>R;FAl#sOABQATBHO0 zuW!rad#W+XEa?#k>r=Nmlb>fsxfMJ6*{hlEU15dylbK$8S%wL?OYLXe|N&la5 z=fuvwRK=aIiF+zp!uEyx4idqYK|;wH7flI50)EF5zWhWJy?{_CVnUU-`YpBMD85 z-YoUCe4aRUt|+_9PR0Zo*TMomzpoF{@74Xi`z6s>+2NUdoYESzLnX$$E(&*8F>aM( z;*4p&D$U~2(r3i+#l@E?`)cWoNlY@%w@sPnw9ko`eEVZU3fq|={=WHFZd{!DMYrk1 z%#39#pUE1nd--g30oSMFEJ8I2&*xS=Tlsum&9|4&=Qprvy;#ul&hsF%n2W%nMLlM( ZUM!yAruA~kl(4LqOJ}5MWePA@0|3E^b0h!& diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF.gif deleted file mode 100644 index 7c2757329221b9c5c8cb424de56c21a5f601e295..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmZ?wbhEHboXjA=aFv09mzOs_K3-E(bMfNE($dl{E-qD7Rr~hs+qiLKU|?WJN5_pD zH!fekykffcJa{m5>eSra zTr)GXi4!N@ym|B4vu7qICJYP=XU?1flC%JdKUu)W>VQa)pBUKwJNP_x){*Kzv83o^ zj@A4ND@2pO0%#IViC6{)Zhke(P_)|FNg;{Csn!oZ6=5 zme#iR{QAZ`nO+%Iu6#}z>4LsqMs_7;8MZt|8O9zF8 z^7x)=Oj1i)#KHR1WzOX1nNe;9k5A3@7I(jA$il!CFvnatl!NJulT=MG!#wH#Gwz(& zx%nku;xThM*9A2vjE^*QDV_dl;+d`-#3XIzVN$RlDtzYURfP=dlkb==FS@g`nR)9X z8%9Q+GgXiIRx(&HZkSlS(>&#nTjKs!25<8tv-gVbF8a~+MMGxw<$HmvQxsenc;7v% zvVPI_VDFZ;`)6{!g%7qdurRpX^8D(%ckfa&h8wp7bspS$S7P)wW?jWDyHsIJBt8?A43K W6Wp|3E}0UR^>XQqG_6bl25SJM3vzk@ diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_OFF_es.gif deleted file mode 100644 index ef710c9c52b9504fcc81678712bb63d7f50799f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4w7Nk%w1VUqw50J8u9dU|@()6NTJVmjb zXsWJk>%MR-&veZ`!V)}u@BhG{a7Zi~kI1AlI7sN0(5Q4ut@fJFN5a893?2>y&XM3D z9KdaNaOOG==b*swW}|zDM7w(i@WO6nYFuRxdj?_$foEbqhhkd-Jc9;)2n`O1hIe2H zif#y4J6Z+_2?ht9qzz`AJ*TFqXQl}NaX$kN1g8YIJbAOGwwZqb2?wPJu%?Z{1_lEM zd8WCIJ;4nI57~vw*#ia*3E#e9(zFAjlc}54+go40uk3xU^6O^3uE6%0eqmbJ9RqR; z9DqDN06MyJCf7K8V+1((0!~0VPlb4>3)lltsEG#uB;Diq=Zv%i!+;>XwolI+X~Ryr z8%XM8GfsJsom90jRwZZ?YwD!=fL}*XsH8pENYo<$b7e+0H3@U%%6KiQqHI_SAk9-Y zTj4pDG?hY@To4gxfFNYeIz)|@)Txvyy@_E6xX~u{?$d>71R~1XkCaz|>;Utqw6f$6 zd33lC;0RA*lSmDhLiNG46xdG5p4y?+XqhZQwSwtswTp~ujH**UpaV%T=~kwYMVpo& z*REP(H9D|$iev)<;0)-622Px!-RPLQ@dD;)qe^?oOqyJ11KQjgcMe2 v;e{AxsNsejcIe@UAYKRn0RpVmz=!EFvck3j5OBRVgvv?;L$4! diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_parkcustomerdial_es.gif deleted file mode 100644 index accda01c85b5f905d644563725477b017d5950f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 659 zcmV;E0&M+9Nk%w1VUqw50J8u9rl$WmI9^;_nPz6He}B}!zyHM)X2nw! zOscMI>%MR-&vb3y?lUmJ}YLgz^M z5DsDY`#^gg2lQ~zfVb1XL&E(<3&MP5YhGq|UJV2f2XA6xL4jjk13rTee*|@icRyl_ zZwOjFTn!0bV2%k54QF^jsikmer3nIZK?Du~T>-W}da|Xp4yzBA2?wMIucc#mrFDvW zrMS&Mz^V_bh0EB(scF5P(g_5ilwfz%*&Md}Y1wE%BcK~3rdSJQ&=qK@ha*IJr2k@^WW%t^pi zf{cIE@e+V<7Xl4oJp>rBP+y9aNTs@&tSJFtdqO{pBZwC2W@vPkd5v#Y)jEk)Gs}4_ zO~_febkQ<-)RMAQ{u)#sh8K^wMbUuMeS^-D#xTO(Y@=?d4!EFvck3j4Va~06Po*Dyskh diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_seconds.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_XB_seconds.gif deleted file mode 100644 index 92fc7f2b380b00341c73446d06dec171457d0a9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmV-m0iXUyNk%w1VMG890J8u9zP|2ydYKLm5no?-v9aALDKkVwRT~>3qod4HQf7#V zsx~%6ZEc8_mb(A|0L;w)A^8LV00000EC2ui07L)|000F4@X1N5y*TU5yZ<0X49mg* zQmHP}STa{U;9zSA z0@Fh7(kM`JV2c1jNdO23)TG8^2=sAr5(EMd3L{z1#|#@C^U2g?z;~N0^0-zhylwF?FSm#IB?Jp y*1&_`7#tXAK$W3|0un@`XDHCYEa?_HFc3*sh>su*Ly805mX^B?4iR5pcPS||v9aC0zU~_v zB6@n6qod4-h^j!BA^8LV00000EC2ui07L)|000E~5XecZy*TU5yZ>M)jvrzS zLy(Z&z*kR~XgheYDw8W1D_pa6&{Fc<}C4>|#C2@f{|QUOc|X&eX(1_}=V0SYJs1q60M zb$6C}6LxtL2|5D}ri2A4D;*0!69)tV4m30godBFuprtwzq*nl_ssN`F423=&eNq4o zfq-{z2@7#^E)IppwFe8UPJA5C)>f3^Xp1hyVaP7j9<{j1f?`|A2*3%N?=bPDG zt0XUz7887C=dw^=*SjaS{Qv*&|H~_@W_AC6edGU&%m06V{{Qju|9^k}Kfn0@@1OFV z#Q)#l|9}7B|Hmi)e|-4={lotckN&^E|Nqi-v){{Q^) z|J{9{?PLSRpDbX#Iv^6{CkD3v2O0`Ibfo%EEGasfV>SQ6iW0B2QR{EKPB{IxYX5@` z6+U|Xrv7I;olXec`>>Duo=f<9tPSFh<2^AYc0-Q2^+DzJ8EtGM^VR$(@#Lx(uo+qgLo zAL8e0W<7O^hmE`WAQNlj`3p>3Y{wd}-9F6Lw%lt~3;Ux(yv-aZUthWT`taKahi)+3 zdd>O$3)2&xyWz7{h7JMPlO?5(x#Wr0>=9LU{4%sf@ebu;|eTUkHpQhOg zEIh5X(j{eq9m;}Q7nX9pZH%nx{+1hj;ecAhzW?9EwAQR(TBRf}qNq{upfQ;7{u4K` zwCUQ+Qw0>8=f>O=NOzU*DKSWSeZbZ6)jYOERuUB*ui-; zxHZyLqvu)hX@+fFe5XF&b-Xd-u->e`6-}H<3NI$@d2wLYV}}nyHdomF8_zy@XnB+& z{@g@W&gzZ^hZc?w0o6XH4Ku$h@CY)gTz~g)~|G?A} zzRVh790!EFzjAA^Z%cp|6g5mu`}-J+Z}DPpdp9an-Eu|NsB}e|hEq>l^=ne*XXO&;J*f|9^b^|L>pw z&oBP}_~ie)d;h<^{r~R%|Mw66zq(v2~AU`p%{Xfu9;GrYce_~0|$sDWs7gm&bt&LiLLp$;G+p7H! zHdOfN^_%*iT@`dgkKY z-mOOk51(Q`bWnh+k(r6@>V<xe2BRWletwj^At}bY@$Tn>c{fHn(NnTsyf(0L$`U@APZS@wNv-KFeoHEM?3C0u7YJENj6fEL59y<7h z(IX}!VZ)?}&%>6zsY+8|V|w%OT^0xPDkWt;#$t|-caCuIHF>7^W)!Avp7iwCGN0d{ z9?x!?(JJ#{hx$T6HwTXO)-M`c=6&hui{W-?YKqD$be<P5(q*eij;5 zc4S_vgXp3|tWFCqoYbkl> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_tab_vicidial.gif b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/images/vdc_tab_vicidial.gif deleted file mode 100644 index 1e8625894b82523cd548d104dc7fc3e3cec568ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 866 zcmZ?wbhEHbEM|~nxXQrr;Lx@I|Nk>EFqEekJvnvz_xE2*`sO}3e7&ut;o{a4a#FH3 zCYJoXe7fq|QGQ{ER_ye4bl*IC^}m1rrZ)Ef{qy(l?>~=@-uV9hYi4xHn_JJGoxS_$ z_|1ohufMwX_|?_NpI^Lxc;x!)>rWn^y#4sZtsfu1zPzb$=i>P-2l3TB%t_{1*~2NM1uUp!1n(@LxG2mRR4)3MJIEt=3iJ* z;e{VImjv#8*iqxRUYPI4p1Skri{tdlnwnXp)H3~) z7`l6U`}!wLoHTjL)M@=n{wmYw%$+xXfr_8%f~Cur&r|gkQeLrc{RReQAs_LL+jq

>?4tw&tk9Gv&APT)Fo zZo;i8(px;Y^>W_g=;P!$bN9-F?h8jciw~TTS8imIw$b?UR*00C9>)WylN(-M+a|S~ ziKDw=vAcV|>Rg9INTzb*Lo*JK-R@~}&x&P>ycl*vrz0*_`b61I&U?SOI zm&Prt&-L3PDCu;M1h>H169yK$D+0YYDfD}EduB2gv^1 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LIVE INBOUND CALL"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

LIVE INBOUND CALL

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid is not valid\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Channel: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOM - \n"; - - echo "
Number Dialed: $row[8]
Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "HANGUP - \n"; - echo "SEND TO MY VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/live_exten_check.php deleted file mode 100644 index 7fdd5730..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Live Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ChannelA[$loop_count] = "$row[0]"; - $ChannelB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $ChannelA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/manager_send.php deleted file mode 100644 index e6887a26..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Send: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup command sent for Channel $channel on $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "auto_dial_level $auto_dial_level must be set\n"; - echo "campaign $campaign must be set\n"; - echo "uniqueid $uniqueid must be set\n"; - echo "lead_id $lead_id must be set\n"; - echo "\nRedirectVD Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "parkedby $parkedby must be set\n"; - echo "\nRedirectToPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectFromPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "ExtraChannel $extrachannel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for Channel $channel on $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, $ACTION command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going on in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/park_calls_display.php deleted file mode 100644 index ce421f53..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Parked Calls Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vdc_db_query.php deleted file mode 100644 index 7fbc2fd5..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Group Choice $closer_choice is not valid\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Group Choice $closer_choice has been registered to user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "HOPPER EMPTY\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CALL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID is not valid\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "LOG NOT ENTERED\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "LOG NOT ENTERED\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id is not valid\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaign $campaign is not valid\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCALL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCALL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user on $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten is not valid\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation on the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CALLBACK ENTRY - if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id information has been updated\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage is not valid\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' is now in status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list is not valid\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vicidial.php deleted file mode 100644 index afafb6e9..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDIAL web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

User Login

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Campaign Login
 
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDIAL web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDIAL web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Phone Login
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Campaign not active, please try again
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Login incorrect, please try again
"; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Campaign Login
 
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDIAL web client: Phone Login Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login Error
 
Sorry, your phone login and password are not active in this system, please try again:
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDIAL web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed on this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login on phone: $SIP_user to campaign: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "Sorry, there are no leads in the hopper for this campaign\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
"; - echo "Password:
\n"; - echo "Campaign: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
"; - echo "Password:
\n"; - echo "Campaign: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -LOGOUT\n"; ?> -
-
- - - - - - - - -
VICIDIALSCRIPT   LIVE     session ID: Live Call
-
- - - - -

VICIDIAL
-
- - - - -
- - Transfer - Conference
- INTERNAL CLOSER - LOCAL CLOSER - CODE - Hangup Xfer Line - Hangup Both Lines - -
- - Number to call   - seconds   - channel - - OVERRIDE   - D1 - D2 -
- - Dial With Customer - Park Customer Dial - LEAVE 3-WAY CALL - Dial Blind Transfer - Blind Transfer VMail Message -
-
-
- - - - -
Lead Dispositioned As:

- -
-
-
- - - - - - - -
Disposition Hot Keys: - When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
- - - - - -
-
- - -
Noone is in your session:
- OK -
-
- - -
Customer has hung up:
- OK -
-
- - -

LOGOUT
-
- - -
-
- - -
 
-
- - -
Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
-
- - -
DISPOSITION CALL :       minimize
- End-of-call Disposition Selection -
- STOP CALLING
- RESET | - SUBMIT -



  -
-
- - - -
Select a CallBack Date :
- - - Select a Date Below   -     - Hour: -   - Minutes: -   - -  
- - CB Comments:

- - SUBMIT

- - -

  -
-
- - -
CLOSER INBOUND GROUP SELECTION
- Closer Inbound Group Selection -
- BLENDED CALLING(outbound activated)
- RESET | - SUBMIT -



  -
-
- - - - - - - - - - - -
LIVE CALL TRANSFER
Channel to be transferred: Channel
Extensions:
Extensions Menu
-
- Send to selected extension

- Send to selected vmail box

- Send to this number:


- REFRESH


- Back to Main Window

-
Conferences:
(click on a number below to send to a conference)
Send my channel too
Conferences Menu
-
- - - - -
VICIDIAL SCRIPT
-
- - - - - - - - - - - - - - - - - -
STATUS:
-
-Dial Next Number
- LEAD PREVIEW
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " ALT PHONE DIAL
";} - - -?> -RECORDING FILE:
-
-
-RECORD ID:
-
- -Start Recording
-
-Web Form
-
-Park Call
-Transfer - Conference
-
-Hangup Customer
-
-Send DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
seconds:   Channel:   Cust Time:
Customer Information:
Title:   First:   MI:   Last:
Address1:
Address2:   Address3:
City:   State:   PostCode:
Province:   Vendor ID:
Phone:   DialCode:   Alt. Phone:
Show:   Email:
Comments:
- -
-


  - -
- - - - -
VICIDIAL web-client version:     BUILD:               Server:              
-Show conference call channel information
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HOT KEYS INACTIVE - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc/voicemail_check.php deleted file mode 100644 index eb01d84b..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail box $vmail_box is not valid\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/active_list_refresh.php deleted file mode 100644 index 27dba826..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Liste Anzeige: "; -if ($ADD==1) {echo "Phasenverlängerungen";} -if ($ADD==2) {echo "Beschäftigte Verlängerungen";} -if ($ADD==3) {echo "Äußere Linien";} -if ($ADD==4) {echo "Lokale Verlängerungen";} -if ($ADD==5) {echo "Konferenzen";} -if ($ADD==99999) {echo "HILFE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/astguiclient.php deleted file mode 100644 index 6e9b2987..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "astGUIclient web client: LOGON\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
LOGON
 
Benutzer-LOGON:
Benutzer-Kennwort:
Telefon-LOGON:
Telefon-Kennwort:

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIVORWAHLKNOPF|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIVORWAHLKNOPF|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Telefon-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Telefon-LOGON
 
Telefon-LOGON:
Telefon-Kennwort:

VERSION: $version       BAU: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Telefon-LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Telefon-LOGON
 
Traurig, Ihr Telefon-LOGON und Kennwort seien Sie nicht in diesem:
 
Telefon-LOGON:
Telefon-Kennwort:

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -LOGOUT
\n"; ?> -
HauptverkleidungAktive Linien VerkleidungKonferenz-VerkleidungÜberprüfen Sie VoicemailLeben Anruf
-
- - -

Logout
-
- - -
TRUNK HÄNGEZUSTAND

- Active Trunks Menu
- Hängezustand-Stamm   |   - Straßenräuber-Stamm   |   - Hören Stamm   |   - ErneuernSie   |   - Zurück zu Hauptfenster -
-
- - -
LOKALER HÄNGEZUSTAND

- Aktives Lokales Menü
- Hängezustand-Einheimischer   |   - Straßenräuber-Einheimischer   |   - Hören Einheimischer   |   - ErneuernSie   |   - Zurück zu Hauptfenster -
-
- - - - - - - -
PHASENANRUF-ÜBERTRAGUNG
Gebracht zu werden Führung: Führung
Verlängerungen:
Verlängerungen Menü
-
- Senden Sie zu vorgewählter Verlängerung

- Senden Sie zu vorgewähltem vmail Kasten

- Senden Sie zu dieser Zahl:


- ErneuernSie


- Zurück zu Hauptfenster

-
Konferenzen:
(klicken Sie an eine Zahl unten, um zu einer Konferenz zu senden)
Senden Sie meine Führung auch
Konferenz-Menü
-
- - - - - -
LOKALER Verlängerungen Vorwahlknopf
Telefon, das von benennt: Führung
Verlängerungen:
Verlängerungen Menü
-
- Anruf vorgewählte Verlängerung

- Anruf vorgewählter vmail Kasten

- ErneuernSie


- Zurück zu Hauptfenster

-
-
- - -
GEPARKTE ANRUFE:
- Zurück zu Hauptfenster

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NEU:     ALT:             MANUELLER VORWAHLKNOPF       VORWAHLKNOPF
GEPARKTE ANRUFE: 0                LOKALE VORWAHLKNOPF-VERLÄNGERUNGEN
OUTBOUND ANRUFE:
INBOUND ANRUFE:
astGUIclient Netz-Klient VERSION: BAU:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
LIEBLINGE       redigieren sie
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
LIEBLINGE

 
SUBMITSie LIEBLINGE CHANGES - requires logout
ZURÜCK ZU MAIN FENSTER - ignorieren Sie die vorgenommenen Änderungen
-
- -
- - - - - - - - - - - - - -
-PAUSE | ANFANG     Erneuern Sie Rate: 1000 ms Schneller | Langsamer

-
Initialisierung..
-
Aktive Verlängerungen
-ERNEUERNSie | -AUFTRAG | -
Äußere Linien
-ERNEUERNSie | -AUFTRAG | -
Lokale Verlängerungen
-ERNEUERNSie | -AUFTRAG | -
- Daten Gehen Hier

-
- Daten Gehen Hier

Stamm-Tätigkeit -
- Daten Gehen Hier

Lokale Tätigkeit -
-
- - - - -
- - -Konferenz-Liste - - - -
-Klicken Sie an Konferenzzimmernummer auf dem links für Info auf -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/call_log_display.php deleted file mode 100644 index c8103ac0..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Anruf-Maschinenbordbuch-Anzeige"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/conf_exten_check.php deleted file mode 100644 index d41cda66..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Verlängerung Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten ist unzulässig\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $FührungA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $FührungA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$FührungA[$counter] ~"; - # echo "$FührungA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten ist unzulässig or Exten $exten ist unzulässig\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Konferenz $conf_exten ist zu registriert worden $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/inbound_popup.php deleted file mode 100644 index b6353ba2..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -INBOUND LEBHAFTANRUF"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

INBOUND LEBHAFTANRUF

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Führung: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Führung=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "GEWOHNHEIT - \n"; - - echo "
Nummer Gewählt: $row[8]
Anmerkungen: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "HÄNGEZUSTAND - \n"; - echo "SENDEN SIE ZU MEINEM VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/live_exten_check.php deleted file mode 100644 index 9ec1b423..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Phasenverlängerung Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $FührungA[$loop_count] = "$row[0]"; - $FührungB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$FührungA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$FührungA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$FührungB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$FührungB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "FührungA: $FührungA[$counter] ~"; - echo "FührungB: $FührungB[$counter] ~"; - echo "FührungBtrunk: $FührungA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/manager_send.php deleted file mode 100644 index 63000277..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Senden: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HILFE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet für Exten $exten Führung $channel auf $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nOriginateName Action nicht gesendet\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nOriginateNameVmail Action nicht gesendet\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet für Exten $exten Führung $channel auf $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten ist unzulässig or ext_context $ext_context or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel ist nicht Phasen auf $call_server_ip, Checking Live Führung...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $call_server_ip, Hangup Befehl nicht eingesetzt $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup Befehl gesendet für Führung $channel auf $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "auto_dial_level $auto_dial_level muß eingestellt werden\n"; - echo "campaign $campaign muß eingestellt werden\n"; - echo "uniqueid $uniqueid muß eingestellt werden\n"; - echo "lead_id $lead_id muß eingestellt werden\n"; - echo "\nRedirectVD Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "parkedby $parkedby muß eingestellt werden\n"; - echo "\nRedirectToPark Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectFromPark Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectName Action nicht gesendet\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "extenName $extenName muß eingestellt werden\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirectNameVmail Action nicht gesendet\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "ExtraFührung $extrachannel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirect Action nicht gesendet\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Kann nicht leere Konferenz finden auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Führung $channel ist nicht Phasen auf $call_server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra Befehl gesendet für Führung $channel and \nExtraFührung $extrachannel\n to $exten auf $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra Befehl gesendet für Führung $channel auf $call_server_ip and \nExtraFührung $extrachannel\n to $exten auf $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Eine dieser Variablen ist unzulässig:\n"; - echo "Führung $channel muß als 2 Buchstaben grösser sein\n"; - echo "queryCID $queryCID muß als 14 Buchstaben grösser sein\n"; - echo "exten $exten muß eingestellt werden\n"; - echo "ext_context $ext_context muß eingestellt werden\n"; - echo "ext_priority $ext_priority muß eingestellt werden\n"; - echo "\nRedirect Action nicht gesendet\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, Redirect Befehl nicht eingesetzt\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect Befehl gesendet für Führung $channel auf $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Führung $channel ist nicht Phasen auf $server_ip, $ACTION Befehl nicht eingesetzt\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION Befehl gesendet für Führung $channel auf $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Führung $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going auf in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION Befehl gesendet für Führung $channel auf $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n AUFNAHME DAUERT BIS 60 MINUTEN\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/park_calls_display.php deleted file mode 100644 index 67f868c6..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Geparkte Anruf-Anzeige"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten ist unzulässig oder Protokoll $protocol ist unzulässig\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vdc_db_query.php deleted file mode 100644 index 5f0052eb..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Datenbank-Frage Index"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Gruppe Wahl $closer_choice ist unzulässig\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Gruppe Wahl $closer_choice ist zu registriert worden user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "ZUFUHRBEHÄLTER LEER\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INANRUF - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "ZUFUHRBEHÄLTER LEER\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INANRUF - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "ANRUF NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context ist unzulässig\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID ist unzulässig\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign ist unzulässig\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "ANRUF_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id ist unzulässig\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "MASCHINENBORDBUCH NICHT BETRETEN\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Kampagne $campaign ist unzulässig\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INANRUF in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INANRUF - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INANRUF - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INANRUF - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send auf to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user auf $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten ist unzulässig\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation auf the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id ist unzulässig\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### ANRUFBACK ENTRY - if ( ($dispo_choice == 'CBHALT') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' ist zu geändert worden ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id ist unzulässig\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id Informationen sind aktualisiert worden\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage ist unzulässig\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' ist jetzt im Status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list ist unzulässig\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vicidial.php deleted file mode 100644 index dd90edfc..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Sie haben jetzt heraus geloggt. Danke\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIVORWAHLKNOPF web client: Re-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-LOGON
 
Telefon-LOGON:
Telefon-Kennwort:
Benutzer-LOGON:
Benutzer-Kennwort:
Kampagne: $camp_form_code

VERSION: $version       BAU: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIVORWAHLKNOPF web client: Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Benutzer-LOGON

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Kampagne LOGON
 
Benutzer-LOGON:
Benutzer-Kennwort:
Kampagne: $camp_form_code

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIVORWAHLKNOPF web client: LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
LOGON
 
Telefon-LOGON:
Telefon-Kennwort:
Benutzer-LOGON:
Benutzer-Kennwort:
Kampagne: $camp_form_code

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIVORWAHLKNOPF web client: Telefon-LOGON\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Telefon-LOGON
 
Telefon-LOGON:
Telefon-Kennwort:

VERSION: $version       BAU: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Die aktive Kampagne nicht, versuchen bitte noch einmal
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Der falsche LOGON, versuchen bitte noch einmal
"; - } - } - if ($VDloginDISPLAY) - { - echo "VICIVORWAHLKNOPF web client: Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Kampagne LOGON
 
Benutzer-LOGON:
Benutzer-Kennwort:
Kampagne: $camp_form_code

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIVORWAHLKNOPF web client: Telefon-LOGON Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
LOGON Error
 
Traurig, Ihr Telefon-LOGON und Kennwort seien Sie nicht in diesem:
 
Telefon-LOGON:
Telefon-Kennwort:

VERSION: $version       BAU: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIVORWAHLKNOPF web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed auf this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login auf phone: $SIP_user zur Kampagne: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEU record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIVORWAHLKNOPF web client: VICIVORWAHLKNOPF Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Traurig, gibt es keine Leitungen im Zufuhrbehälter für diese\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "LOGON: \n
"; - echo "Kennwort:
\n"; - echo "Kampagne: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIVORWAHLKNOPF web client: VICIVORWAHLKNOPF Kampagne LOGON\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "LOGON: \n
"; - echo "Kennwort:
\n"; - echo "Kampagne: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -LOGOUT\n"; ?> -
-
- - - - - - - - -
VICIVORWAHLKNOPFSCRIPT   LIVE     Lernabschnitt ID: Leben Anruf
-
- - - - -

VICIVORWAHLKNOPF
-
- - - - -
- - Übertragung - Konferenz
- INTERNES GENAUERES - EINHEIMISCHER GENAUER - CODE - Hängezustand Xfer Linie - Hängezustand Beide Linien - -
- - Zahl zum zu benennen   - Sekunden   - channel - - OVERRIDE   - D1 - D2 -
- - Vorwahlknopf Mit Kunden - Park-Kunde Vorwahlknopf - ANRUF DES URLAUB-3-WAY - Vorwahlknopf-Vorhang-Übertragung - Blind Transfer VMail Message -
-
-
- - - - -
Leitung Dispositioned Wie:

- -
-
-
- - - - - - - -
Einteilung Heiße Schlüssel: - Wenn aktiv, betätigen Sie einfach die Taste für die gewünschte:
- - - - - -
-
- - -
Noone ist in Ihrem Lernabschnitt:
- OK -
-
- - -
Kunde hat oben gehangen:
- OK -
-
- - -

LOGOUT
-
- - -
-
- - -
 
-
- - -
Alle mögliche Änderungen, die am Kunden vorgenommen wurden, den, Informationen unten diesmal nicht sind, comitted, Sie müssen Kunde Informationen vor Ihnen ändern Hängezustand der Anruf.
-
- - -
EINTEILUNG ANRUF :       setzen Sie herab
- Ende-von-benennen Sie Einteilung Vorwähler -
- STOPPEN SIE ZU BENENNEN
- ZURÜCKSTELLEN | - SUBMITSie -



  -
-
- - - -
Wählen Sie ein Wiederholungsbesuch Datum vor :
- - - Wählen Sie ein Datum unten vor   -     - Hour: -   - Minutes: -   - -  
- - COLUMBIUM Anmerkungen:

- - SUBMITSie

- - -

  -
-
- - -
GENAUERE INBOUND GRUPPENWAHL
- Genauere Inbound Gruppenwahl -
- GEMISCHTES BENENNEN(outbound aktiviert)
- ZURÜCKSTELLEN | - SUBMITSie -



  -
-
- - - - - - - - - - - -
PHASENANRUF-ÜBERTRAGUNG
Gebracht zu werden Führung: Führung
Verlängerungen:
Verlängerungen Menü
-
- Senden Sie zu vorgewählter Verlängerung

- Senden Sie zu vorgewähltem vmail Kasten

- Senden Sie zu dieser Zahl:


- ERNEUERNSie


- Zurück zu Hauptfenster

-
Konferenzen:
(klicken Sie an eine Zahl unten, um zu einer Konferenz zu senden)
Senden Sie meine Führung auch
Konferenz-Menü
-
- - - - -
VICIVORWAHLKNOPF SCRIPT
-
- - - - - - - - - - - - - - - - - -
STATUS:
-
-Vorwahlknopf-Folgende Zahl
- LEITUNG VORBETRACHTUNG
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " WECH TELEFON
";} - - -?> -REGISTERAKTE:
-
-
-SATZ IDENTIFIKATION:
-
- -Fangen Sie an Zu notieren
-
-Netz-Form
-
-Park-Anruf
-Übertragung - Konferenz
-
-Hängezustand-Kunde
-
-Senden Sie DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
Sekunden:   Führung:   Cust Zeit:
Kunde Informationen:
Titel:   Zuerst:   MI:  Letztes:
Adresse1:
Adresse2:   Adresse3:
Stadt:   Zustand:   PostCode:
Provinz:   Verkäufer Identifikation:
Telefon:   DialCode:   Wech Telefon:
Erscheinen:   Email:
Anmerkungen:
- -
-


  - -
- - - - -
VICIVORWAHLKNOPF Netz-Klient Version:     BAU:               Bediener:              
-Zeigen Sie Konferenzanruf-Führung Informationen
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HEISSE SCHLÜSSEL UNAKTIVIERT - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/voicemail_check.php deleted file mode 100644 index acb1d46f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_de/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Unzulässig Benutzername/Kennwort: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Unzulässig server_ip: |$server_ip| or Unzulässig session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Unzulässig session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Überprüfung"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail Kasten $vmail_box ist unzulässig\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/active_list_refresh.php deleted file mode 100644 index 23615375..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Κατάλογος Οθόνης: "; -if ($ADD==1) {echo "Ενεργές τηλ. συνδέσεις";} -if ($ADD==2) {echo "Απασχολημένες τηλ. συνδέσεις";} -if ($ADD==3) {echo "Εξωτερικές γραμμές";} -if ($ADD==4) {echo "Τοπικές τηλ. συνδέσεις";} -if ($ADD==5) {echo "Διασκέψεις";} -if ($ADD==99999) {echo "ΒΟΗΘΕΙΑ";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/astguiclient.php deleted file mode 100644 index 4d797060..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Έχετε αποσυνδεθεί. Σας ευχαριστούμε\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "astGUIclient web client: Σύνδεση\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση
 
Σύνδεση χρήστη:
Κωδικός πρόσβασης χρήστη:
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIΚΛΗΣΗ|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIΚΛΗΣΗ|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Σύνδεση Τηλεφώνου\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Σύνδεση Τηλεφώνου
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Σύνδεση Τηλεφώνου\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση Τηλεφώνου
 
Συγγνώμη, αλλά η τηλεφωνική σύνδεση και ο κωδικός πρόσβασής σας δεν είναι ενεργά σε αυτό το σύστημα, παρακαλώ προσπαθήστε πάλι:
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -ΑΠΟΣΥΝΔΕΣΗ
\n"; ?> -
Κύριος ΠίνακαςΠίνακας Ενεργών ΓραμμώνΠίνακας διασκέψεωνΕλεγχος Φωνητικού ταχυδρομείουΕνεργή κλήση
-
- - -

Logout
-
- - -
TRUNK ΚΛΕΙΣΙΜΟ

- Active Trunks Menu
- Κλείσιμο Trunk   |   - Κλέψιμο Trunk   |   - Ακούστε Trunk   |   - Ανανέωση   |   - Επιστροφή στο κύριο παράθυρο -
-
- - -
ΤΟΠΙΚΟ ΚΛΕΙΣΙΜΟ ΤΗΛΕΦΩΝΟΥ

- Ενεργές Τοπικές Επιλογές
- Κλείσιμο τοπικού   |   - Κλέψιμο τοπικού   |   - Ακούστε τοπικό   |   - Ανανέωση   |   - Επιστροφή στο κύριο παράθυρο -
-
- - - - - - - -
ΜΕΤΑΦΟΡΑ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ
Κανάλι που μεταφέρεται: Κανάλι
Τηλ.συνδέσεις:
Επιλογές τηλ. συνδέσεων
-
- Στείλε στην επιλεγμένη τηλ.σύνδεση

- Στείλε στο επιλεγμένο vmail

- Στείλε σε αυτόν τον αριθμό:


- Ανανέωση


- Επιστροφή στο κύριο παράθυρο

-
Διασκέψεις:
(επιλέξτε έναν αριθμό κατωτέρω που θα σταλεί σε μια διάσκεψη)
Στείλε το κανάλι μου επίσης
Επιλογές διασκέψεων
-
- - - - - -
ΤΟΠΙΚΕΣ τηλ. συνδέσεις Κλήσεως
Τηλέφωνο που καλεί από: Κανάλι
Τηλ.συνδέσεις:
Επιλογές τηλ. συνδέσεων
-
- Επιλεγμένη κλήση τηλ. σύνδεσης

- Επιλεγμένη κλήση vmail

- Ανανέωση


- Επιστροφή στο κύριο παράθυρο

-
-
- - -
ΣΤΑΘΜΕΥΜΕΝΕΣ ΚΛΗΣΕΙΣ:
- Επιστροφή στο κύριο παράθυρο

-
-
- - - - - - - - - - - - - - - -
  -
ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ     ΝΕΟ:     ΠΑΛΑΙΟ:             ΧΕΙΡΩΝΑΚΤΙΚΗ ΚΛΗΣΗ       ΚΛΗΣΗ
ΣΤΑΘΜΕΥΜΕΝΕΣ ΚΛΗΣΕΙΣ: 0                ΤΗΛ. ΣΥΝΔΕΣΕΙΣ ΤΟΠΙΚΗΣ ΚΛΗΣΗΣ
ΕΞΕΡΧΟΜΕΝΕΣ ΚΛΗΣΕΙΣ:
ΕΙΣΕΡΧΟΜΕΝΕΣ ΚΛΗΣΕΙΣ:
ΈΚΔΟΣΗ astGUIclient: ΔΗΜΙΟΥΡΓΙΑ:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
ΣΥΜΠΑΘΕΙΕΣ       εκδώστε
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
ΣΥΜΠΑΘΕΙΕΣ

 
ΥΠΟΒΑΛΕΤΕ ΣΥΜΠΑΘΕΙΕΣ CHANGES - requires logout
ΠΙΣΩ στο ΚΥΡΙΟ ΠΑΡΑΘΥΡΟ - αγνοήστε τις αλλαγές που γίνονται
-
- -
- - - - - - - - - - - - - -
-ΠΑΥΣΗ | ΕΝΑΡΞΗ     Ποσοστό ανανέωσης: 1000 ms Γρηγορότερα | Πιό αργά

-
Αρχή..
-
Ενεργές τηλ. συνδέσεις
-ΑΝΑΝΕΩΣΗ | -ΔΙΑΤΑΓΗ | -
Εξωτερικές γραμμές
-ΑΝΑΝΕΩΣΗ | -ΔΙΑΤΑΓΗ | -
Τοπικές τηλ. συνδέσεις
-ΑΝΑΝΕΩΣΗ | -ΔΙΑΤΑΓΗ | -
- Τα δεδομένα πηγαίνουν εδώ

-
- Τα δεδομένα πηγαίνουν εδώ

Κίνηση Trunk -
- Τα δεδομένα πηγαίνουν εδώ

Τοπική Κίνηση -
-
- - - - -
- - -Κατάλογος διασκέψεων - - - -
-Επιλέξτε έναν αριθμό δωματίου διάσκεψης στα αριτερά για τις πληροφορίες σε εκείνη την διάσκεψη -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/call_log_display.php deleted file mode 100644 index 9559ad84..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Έμφάνιση Καταγραμμένων Κλήσεων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχύει ή πρωτόκολλο $protocol δεν ισχύει\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/conf_exten_check.php deleted file mode 100644 index e6eb9568..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Έλεγχος τηλ.σύνδεσης διάσκεψης"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten δεν ισχύει\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ΚανάλιA[$counter] ~"; - # echo "$ΚανάλιA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten δεν ισχύει or Exten $exten δεν ισχύει\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Διάσκεψη $conf_exten έχει καταχωρηθεί $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/inbound_popup.php deleted file mode 100644 index e017b132..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -ΕΝΕΡΓΗ ΕΙΣΕΡΧΟΜΕΝΗ ΚΛΗΣΗ"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

ΕΝΕΡΓΗ ΕΙΣΕΡΧΟΜΕΝΗ ΚΛΗΣΗ

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid δεν ισχύει\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Κανάλι: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Κανάλι=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "ΣΥΝΗΘΕΙΑ - \n"; - - echo "
Αριθμός που καλέσατε: $row[8]
Σημειώσεις: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "ΚΛΕΙΣΙΜΟ - \n"; - echo "ΣΤΕΙΛΕ ΣΤΟ ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ ΜΟΥ\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/live_exten_check.php deleted file mode 100644 index 083caa12..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Ελεγχος ενεργής τηλ.σύνδεσης"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχύει ή πρωτόκολλο $protocol δεν ισχύει\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ΚανάλιA[$loop_count] = "$row[0]"; - $ΚανάλιB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ΚανάλιA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ΚανάλιA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ΚανάλιB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ΚανάλιB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ΚανάλιA: $ΚανάλιA[$counter] ~"; - echo "ΚανάλιB: $ΚανάλιB[$counter] ~"; - echo "ΚανάλιBtrunk: $ΚανάλιA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/manager_send.php deleted file mode 100644 index 0c2be0a8..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Ο διευθυντής στέλνει: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "ΒΟΗΘΕΙΑ";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten δεν ισχύει or queryCID $queryCID δεν ισχύει, Originate εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate εντολή που στέλνεται για Exten $exten Κανάλι $channel Στην $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "extenName $extenName πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nOriginateName Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "extenName $extenName πρέπει να τεθεί\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nOriginateNameVmail Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten δεν ισχύει or queryCID $queryCID δεν ισχύει, Originate εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate εντολή που στέλνεται για Exten $exten Κανάλι $channel Στην $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten δεν ισχύει or ext_context $ext_context or queryCID $queryCID δεν ισχύει, Hangup εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχύει or queryCID $queryCID δεν ισχύει, Hangup εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel δεν είναι ενεργό Στην $call_server_ip, Checking Live Κανάλι...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεργό Στην $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup εντολή που στέλνεται για Κανάλι $channel Στην $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "auto_dial_level $auto_dial_level πρέπει να τεθεί\n"; - echo "campaign $campaign πρέπει να τεθεί\n"; - echo "uniqueid $uniqueid πρέπει να τεθεί\n"; - echo "lead_id $lead_id πρέπει να τεθεί\n"; - echo "\nRedirectVD Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "extenName $extenName πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "parkedby $parkedby πρέπει να τεθεί\n"; - echo "\nRedirectToPark Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nRedirectFromPark Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "extenName $extenName πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nRedirectName Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "extenName $extenName πρέπει να τεθεί\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nRedirectNameVmail Action μην σταλμένος\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "ExtraΚανάλι $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nRedirect Action μην σταλμένος\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Δεν υπάρχει κενή διάσκεψη Στην $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Κανάλι $channel δεν είναι ενεργό Στην $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Κανάλι $channel δεν είναι ενεργό Στην $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel and \nExtraΚανάλι $extrachannel\n to $exten Στην $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel Στην $call_server_ip and \nExtraΚανάλι $extrachannel\n to $exten Στην $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n"; - echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n"; - echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n"; - echo "exten $exten πρέπει να τεθεί\n"; - echo "ext_context $ext_context πρέπει να τεθεί\n"; - echo "ext_priority $ext_priority πρέπει να τεθεί\n"; - echo "\nRedirect Action μην σταλμένος\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεργό Στην $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect εντολή που στέλνεται για Κανάλι $channel Στην $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχύει or queryCID $queryCID δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Κανάλι $channel δεν είναι ενεργό Στην $server_ip, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION εντολή που στέλνεται για Κανάλι $channel Στην $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Κανάλι $channel δεν ισχύει or exten $exten δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going Στην in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION εντολή που στέλνεται για Κανάλι $channel Στην $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n Η ΚΑΤΑΓΡΑΦΗ ΘΑ ΔΙΑΡΚΕΣΕΙ ΜΕΧΡΙ 60 ΛΕΠΤΑ\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/park_calls_display.php deleted file mode 100644 index 2da41b45..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Εμφάνιση Σταθμευμένων Κλήσεων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten δεν ισχύει ή πρωτόκολλο $protocol δεν ισχύει\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vdc_db_query.php deleted file mode 100644 index 0af92dbb..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Κώδικας ερώτησης βάσεων δεδομένων"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Επιλογή ομάδας $closer_choice δεν ισχύει\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Επιλογή ομάδας $closer_choice έχει καταχωρηθεί user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "ΚΕΝΟΣ HOPPER\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχύει\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "ΚΕΝΟΣ HOPPER\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχύει\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "ΚΛΗΣΗ NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context δεν ισχύει\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID δεν ισχύει\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign δεν ισχύει\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Εισαγωγή : $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "ΚΛΗΣΗ_LOG Εισαγωγή : $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id δεν ισχύει\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Εκστρατεία $campaign δεν ισχύει\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INΚΛΗΣΗ in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INΚΛΗΣΗ - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send Στην to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user Στην $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten δεν ισχύει\n"; - exit; - } -else - { - ##### Insert a ΑΠΟΣΥΝΔΕΣΗ record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','ΑΠΟΣΥΝΔΕΣΗ','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation Στην the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id δεν ισχύει\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### ΚΛΗΣΗBACK ENTRY - if ( ($dispo_choice == 'CBHΠΑΛΑΙΟ') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' έχει αλλαχτεί ' . $dispo_choice . " Κατάσταση\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id δεν ισχύει\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id οι πληροφορίες έχουν ενημερωθεί\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage δεν ισχύει\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' είναι τώρα στη κατάσταση ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list δεν ισχύει\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vicidial.php deleted file mode 100644 index ee49fb0f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Έχετε αποσυνδεθεί. Σας ευχαριστούμε\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIΚΛΗΣΗ web client: Επανασύνδεση\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Επανασύνδεση
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:
Σύνδεση χρήστη:
Κωδικός πρόσβασης χρήστη:
Εκστρατεία: $camp_form_code

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIΚΛΗΣΗ web client: Σύνδεση εκστρατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Σύνδεση χρήστη

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση εκστρατείας
 
Σύνδεση χρήστη:
Κωδικός πρόσβασης χρήστη:
Εκστρατεία: $camp_form_code

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIΚΛΗΣΗ web client: Σύνδεση\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:
Σύνδεση χρήστη:
Κωδικός πρόσβασης χρήστη:
Εκστρατεία: $camp_form_code

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIΚΛΗΣΗ web client: Σύνδεση Τηλεφώνου\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Σύνδεση Τηλεφώνου
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Η εκστρατεία είναι μη ενεργή, παρακαλώ προσπαθήστε πάλι
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Η σύνδεση δεν είναι σωστή, παρακαλώ προσπαθήστε πάλι
"; - } - } - if ($VDloginDISPLAY) - { - echo "VICIΚΛΗΣΗ web client: Σύνδεση εκστρατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση εκστρατείας
 
Σύνδεση χρήστη:
Κωδικός πρόσβασης χρήστη:
Εκστρατεία: $camp_form_code

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIΚΛΗΣΗ web client: Σύνδεση Τηλεφώνου Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Σύνδεση Error
 
Συγγνώμη, αλλά η τηλεφωνική σύνδεση και ο κωδικός πρόσβασής σας δεν είναι ενεργά σε αυτό το σύστημα, παρακαλώ προσπαθήστε πάλι:
 
Σύνδεση Τηλεφώνου:
Κωδικός πρόσβασης Τηλεφώνου:

ΕΚΔΟΣΗ: $version       ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIΚΛΗΣΗ web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed Στην this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login Στην phone: $SIP_user στην εκστρατεία: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a ΝΕΟ record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIΚΛΗΣΗ web client: VICIΚΛΗΣΗ Σύνδεση εκστρατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Συγγνώμη, δεν υπάρχουν καθοδηγητές στον hopper για αυτήν την εκστρατεία\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Σύνδεση: \n
"; - echo "Κωδικός πρόσβασης:
\n"; - echo "Εκστρατεία: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIΚΛΗΣΗ web client: VICIΚΛΗΣΗ Σύνδεση εκστρατείας\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Σύνδεση: \n
"; - echo "Κωδικός πρόσβασης:
\n"; - echo "Εκστρατεία: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -ΑΠΟΣΥΝΔΕΣΗ\n"; ?> -
-
- - - - - - - - -
VICIΚΛΗΣΗSCRIPT   LIVE     Ταυτότητα εργασίας: Ενεργή κλήση
-
- - - - -

VICIΚΛΗΣΗ
-
- - - - -
- - Μεταφορά - διάσκεψη
- ΕΣΩΤΕΡΙΚΟΣ CLOSER - ΤΟΠΙΚΟΣ CLOSER - CODE - Κλείσιμο Γραμμής Xfer - Κλείσιμο και τις δύο γραμμές - -
- - Αριθμός για κλήση   - δευτερόλεπτα   - channel - - OVERRIDE   - D1 - D2 -
- - Κλήση με τον πελάτη - Στάθμευση κλήσης πελάτη - ΑΠΟΧΩΡΗΣΗ 3WAY ΚΛΗΣΗΣ - Τυφλή μεταφορά κλήσης - Blind Transfer VMail Message -
-
-
- - - - -
Τερματισμό Καθοδήγησης όπως:

- -
-
-
- - - - - - - -
Πλήκτρα κλειδιά Τερματισμού: - Όταν είναι ενεργό, πιέστε απλά το πλήκτρο κλειδί για τον επιθυμητό τερματισμό της κλήσης. Η κλήση θα τρεματίσει αυτόματα:
- - - - - -
-
- - -
Κανένας δεν είναι στη σύνοδό σας:
- OK -
-
- - -
Ο πελάτης έχει κλείσει το τηλέφωνο:
- OK -
-
- - -

ΑΠΟΣΥΝΔΕΣΗ
-
- - -
-
- - -
 
-
- - -
Οποιεσδήποτε αλλαγές που γίνονται στις πληροφορίες πελατών κατωτέρω αυτή τη στιγμή δεν θα είναι, πρέπει να αλλάξετε τις πληροφορίες πελατών ενώπιον σας Hangup η κλήση.
-
- - -
Τερματισμός Κλήσης :       ελαχιστοποιήστε
- Επιλογή τερματισμού της κλήσης -
- ΤΕΡΜΑΤΙΣΜΟΣ ΚΛΗΣΗΣ
- ΕΠΑΝΑΦΟΡΑ | - ΥΠΟΒΑΛΕΤΕ -



  -
-
- - - -
Επιλέξτε μια ημερομηνία CallBack :
- - - Επιλέξτε μια ημερομηνία κατωτέρω   -     - Hour: -   - Minutes: -   - -  
- - Σχόλια CB:

- - ΥΠΟΒΑΛΕΤΕ

- - -

  -
-
- - -
CLOSER ΕΙΣΕΡΧΟΜΕΝΗ ΕΠΙΛΟΓΗ ΟΜΑΔΑΣ
- Επιλογή Closer εισερχόμενης ομάδας -
- ΣΥΝΔΥΑΣΜΕΝΗ ΚΛΗΣΗ(εξερχόμενες ενεργοποιημένες)
- ΕΠΑΝΑΦΟΡΑ | - ΥΠΟΒΑΛΕΤΕ -



  -
-
- - - - - - - - - - - -
ΜΕΤΑΦΟΡΑ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ
Κανάλι που μεταφέρεται: Κανάλι
Τηλ.συνδέσεις:
Επιλογές τηλ. συνδέσεων
-
- Στείλε στην επιλεγμένη τηλ.σύνδεση

- Στείλε στο επιλεγμένο vmail

- Στείλε σε αυτόν τον αριθμό:


- ΑΝΑΝΕΩΣΗ


- Επιστροφή στο κύριο παράθυρο

-
Διασκέψεις:
(επιλέξτε έναν αριθμό κατωτέρω που θα σταλεί σε μια διάσκεψη)
Στείλε το κανάλι μου επίσης
Επιλογές διασκέψεων
-
- - - - -
VICIΚΛΗΣΗ SCRIPT
-
- - - - - - - - - - - - - - - - - -
ΚΑΤΑΣΤΑΣΗ:
-
-Κλήση επόμενου αριθμού
- ΠΡΟΒΟΛΗ ΚΑΘΟΔΗΓΗΣΗΣ
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " ΚΛΗΣΗ ENAΛ/ΚΟΥ ΤΗΛΕΦΩΝΟΥ
";} - - -?> -ΑΡΧΕΙΟ ΚΑΤΑΓΡΑΦΗΣ:
-
-
-ΤΑΥΤΟΤΗΤΑ ΕΓΓΡΑΦΗΣ:
-
- -Εναρξη καταγραφής
-
-Σελίδα Διαδικτύου
-
-Στάθμευση Κλήσης
-Μεταφορά - διάσκεψη
-
-΄Κλείσιμο Πελάτη
-
-Στείλε DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
δευτερόλεπτα:   Κανάλι:   Χρόνος Πελάτη:
Πληροφορίες πελατών:
Τίτλος:   Πρώτο:   MI:  Διάρκεια:
Διεύθυνση1:
Διεύθυνση2:   Διεύθυνση3:
Πόλη:   Κράτος:   Ταχ.Κωδ.:
Επαρχία:   Ταυτότητα προμηθευτού:
Τηλέφωνο:   Κωδικός Κλήσης:   Εναλ/κό Τηλέφωνο:
Παρουσίαση:   Ηλεκτρονικό ταχυδρομείο:
Σχόλια:
- -
-


  - -
- - - - -
Έκδοση VICIΚΛΗΣΗ:     ΔΗΜΙΟΥΡΓΙΑ:               Κεντρικός υπολογιστής:              
-Παρουσίαση πληροφοριών κλήσης καναλιού διασκέψης
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -ΠΛΗΚΤΡΑ ΚΛΕΙΔΙΑ ΑΝΕΝΕΡΓΑ - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/voicemail_check.php deleted file mode 100644 index f7ec9736..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_el/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Ακυρο Χρήστηςname/Κωδικός πρόσβασης: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Ακυρο server_ip: |$server_ip| or Ακυρο session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Ακυρο session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Έλεγχος φωνητικού ταχυδρομείου"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "Κουτί φωνητικού ταχυδρομείου $vmail_box δεν ισχύει\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/active_list_refresh.php deleted file mode 100644 index 301e5ed7..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "List Display: "; -if ($ADD==1) {echo "Live Extensions";} -if ($ADD==2) {echo "Busy Extensions";} -if ($ADD==3) {echo "Outside Lines";} -if ($ADD==4) {echo "Local Extensions";} -if ($ADD==5) {echo "Conferences";} -if ($ADD==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/astguiclient.php deleted file mode 100644 index 3c67d015..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "astGUIclient web client: Login\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login
 
User Login:
User Password:
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "astGUIclient web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Phone Login
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "astGUIclient web client: Phone Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Phone Login
 
Sorry, your phone login and password are not active in this system, please try again:
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "astGUIclient web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -LOGOUT
\n"; ?> -
Main PanelActive Lines PanelConferences PanelCheck VoicemailLive Call
-
- - -

Logout
-
- - -
TRUNK HANGUP

- Active Trunks Menu
- Hangup Trunk   |   - Hijack Trunk   |   - Listen Trunk   |   - Refresh   |   - Back to Main Window -
-
- - -
LOCAL HANGUP

- Active Local Menu
- Hangup Local   |   - Hijack Local   |   - Listen Local   |   - Refresh   |   - Back to Main Window -
-
- - - - - - - -
LIVE CALL TRANSFER
Channel to be transferred: Channel
Extensions:
Extensions Menu
-
- Send to selected extension

- Send to selected vmail box

- Send to this number:


- Refresh


- Back to Main Window

-
Conferences:
(click on a number below to send to a conference)
Send my channel too
Conferences Menu
-
- - - - - -
LOCAL Extensions Dial
Phone calling from: Channel
Extensions:
Extensions Menu
-
- Call selected extension

- Call selected vmail box

- Refresh


- Back to Main Window

-
-
- - -
PARKED CALLS:
- Back to Main Window

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NEW:     OLD:             MANUAL DIAL       DIAL
PARKED CALLS: 0                LOCAL DIAL EXTENSIONS
OUTBOUND CALLS:
INBOUND CALLS:
astGUIclient web-client VERSION: BUILD:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORITES       edit
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORITES

 
SUBMIT FAVORITES CHANGES - requires logout
BACK TO MAIN WINDOW - ignore changes made
-
- -
- - - - - - - - - - - - - -
-PAUSE | START     Refresh rate: 1000 ms Faster | Slower

-
Initializing..
-
Active Extensions
-REFRESH | -ORDER | -
Outside Lines
-REFRESH | -ORDER | -
Local Extensions
-REFRESH | -ORDER | -
- Data Goes Here

-
- Data Goes Here

Trunk Action -
- Data Goes Here

Local Action -
-
- - - - -
- - -Conferences List - - - -
-Click on a conference room number on the left for info on that conference -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/call_log_display.php deleted file mode 100644 index 79187564..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Call Log Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/conf_exten_check.php deleted file mode 100644 index 671d29ba..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Conf Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ChannelA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ChannelA[$counter] ~"; - # echo "$ChannelA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten is not valid or Exten $exten is not valid\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conference $conf_exten has been registered to $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/inbound_popup.php deleted file mode 100644 index ec418bce..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LIVE INBOUND CALL"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

LIVE INBOUND CALL

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid is not valid\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Channel: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "CUSTOM - \n"; - - echo "
Number Dialed: $row[8]
Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "HANGUP - \n"; - echo "SEND TO MY VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/live_exten_check.php deleted file mode 100644 index 7fdd5730..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Live Extension Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ChannelA[$loop_count] = "$row[0]"; - $ChannelB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChannelA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChannelB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ChannelA: $ChannelA[$counter] ~"; - echo "ChannelB: $ChannelB[$counter] ~"; - echo "ChannelBtrunk: $ChannelA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/manager_send.php deleted file mode 100644 index e6887a26..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Manager Send: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "HELP";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nOriginateNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate command sent for Exten $exten Channel $channel on $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten is not valid or ext_context $ext_context or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid, Hangup command not inserted\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel is not live on $call_server_ip, Checking Live Channel...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup command sent for Channel $channel on $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "auto_dial_level $auto_dial_level must be set\n"; - echo "campaign $campaign must be set\n"; - echo "uniqueid $uniqueid must be set\n"; - echo "lead_id $lead_id must be set\n"; - echo "\nRedirectVD Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "parkedby $parkedby must be set\n"; - echo "\nRedirectToPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectFromPark Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectName Action not sent\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "extenName $extenName must be set\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirectNameVmail Action not sent\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "ExtraChannel $extrachannel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra command sent for Channel $channel on $call_server_ip and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "One of these variables is not valid:\n"; - echo "Channel $channel must be greater than 2 characters\n"; - echo "queryCID $queryCID must be greater than 14 characters\n"; - echo "exten $exten must be set\n"; - echo "ext_context $ext_context must be set\n"; - echo "ext_priority $ext_priority must be set\n"; - echo "\nRedirect Action not sent\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect command sent for Channel $channel on $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or queryCID $queryCID is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Channel $channel is not live on $server_ip, $ACTION command not inserted\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Channel $channel is not valid or exten $exten is not valid or filename: $filename is not valid, $ACTION command not inserted\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going on in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION command sent for Channel $channel on $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/park_calls_display.php deleted file mode 100644 index ce421f53..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Parked Calls Display"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten is not valid or protocol $protocol is not valid\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vdc_db_query.php deleted file mode 100644 index 7fbc2fd5..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Invalid Username/Password: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Group Choice $closer_choice is not valid\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Group Choice $closer_choice has been registered to user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "HOPPER EMPTY\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCALL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CALL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID is not valid\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign is not valid\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserted: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "LOG NOT ENTERED\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CALL_LOG Inserted: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "LOG NOT ENTERED\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "LOG NOT ENTERED\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id is not valid\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaign $campaign is not valid\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCALL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCALL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCALL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user on $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten is not valid\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation on the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CALLBACK ENTRY - if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id information has been updated\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage is not valid\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' is now in status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list is not valid\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vicidial.php deleted file mode 100644 index e217b09e..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "You have now logged out. Thank you\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "VICIDIAL web client: Re-Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

User Login

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Campaign Login
 
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "VICIDIAL web client: Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "VICIDIAL web client: Phone Login\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Phone Login
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Campaign not active, please try again
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "Login incorrect, please try again
"; - } - } - if ($VDloginDISPLAY) - { - echo "VICIDIAL web client: Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Campaign Login
 
User Login:
User Password:
Campaign: $camp_form_code

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "VICIDIAL web client: Phone Login Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login Error
 
Sorry, your phone login and password are not active in this system, please try again:
 
Phone Login:
Phone Password:

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "VICIDIAL web client\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed on this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login on phone: $SIP_user to campaign: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NEW record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no leads in the hopper for this campaign\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
"; - echo "Password:
\n"; - echo "Campaign: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "VICIDIAL web client: VICIDIAL Campaign Login\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Login: \n
"; - echo "Password:
\n"; - echo "Campaign: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -LOGOUT\n"; ?> -
-
- - - - - - - - -
VICIDIALSCRIPT   LIVE     session ID: Live Call
-
- - - - -

VICIDIAL
-
- - - - -
- - Transfer - Conference
- INTERNAL CLOSER - LOCAL CLOSER - CODE - Hangup Xfer Line - Hangup Both Lines - -
- - Number to call   - seconds   - channel - - OVERRIDE   - D1 - D2 -
- - Dial With Customer - Park Customer Dial - LEAVE 3-WAY CALL - Dial Blind Transfer - Blind Transfer VMail Message -
-
-
- - - - -
Lead Dispositioned As:

- -
-
-
- - - - - - - -
Disposition Hot Keys: - When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
- - - - - -
-
- - -
Noone is in your session:
- OK -
-
- - -
Customer has hung up:
- OK -
-
- - -

LOGOUT
-
- - -
-
- - -
 
-
- - -
Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
-
- - -
DISPOSITION CALL :       minimize
- End-of-call Disposition Selection -
- STOP CALLING
- RESET | - SUBMIT -



  -
-
- - - -
Select a CallBack Date :
- - - Select a Date Below   -     - Hour: -   - Minutes: -   - -  
- - CB Comments:

- - SUBMIT

- - -

  -
-
- - -
CLOSER INBOUND GROUP SELECTION
- Closer Inbound Group Selection -
- BLENDED CALLING(outbound activated)
- RESET | - SUBMIT -



  -
-
- - - - - - - - - - - -
LIVE CALL TRANSFER
Channel to be transferred: Channel
Extensions:
Extensions Menu
-
- Send to selected extension

- Send to selected vmail box

- Send to this number:


- REFRESH


- Back to Main Window

-
Conferences:
(click on a number below to send to a conference)
Send my channel too
Conferences Menu
-
- - - - -
VICIDIAL SCRIPT
-
- - - - - - - - - - - - - - - - - -
STATUS:
-
-Dial Next Number
- LEAD PREVIEW
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " ALT PHONE DIAL
";} - - -?> -RECORDING FILE:
-
-
-RECORD ID:
-
- -Start Recording
-
-Web Form
-
-Park Call
-Transfer - Conference
-
-Hangup Customer
-
-Send DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
seconds:   Channel:   Cust Time:
Customer Information:
Title:   First:   MI:   Last:
Address1:
Address2:   Address3:
City:   State:   PostCode:
Province:   Vendor ID:
Phone:   DialCode:   Alt. Phone:
Show:   Email:
Comments:
- -
-


  - -
- - - - -
VICIDIAL web-client version:     BUILD:               Server:              
-Show conference call channel information
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -HOT KEYS INACTIVE - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/voicemail_check.php deleted file mode 100644 index eb01d84b..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_en/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Invalid session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Voicemail Check"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "voicemail box $vmail_box is not valid\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/active_list_refresh.php deleted file mode 100644 index be5b78fa..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostrar Listas: "; -if ($ADD==1) {echo "Extensiones Activas";} -if ($ADD==2) {echo "Extensiones Ocupadas";} -if ($ADD==3) {echo "Líneas de salida";} -if ($ADD==4) {echo "Extensiones Locales";} -if ($ADD==5) {echo "Conferencias";} -if ($ADD==99999) {echo "AYUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/astguiclient.php deleted file mode 100644 index 790f7cf8..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Usted ahora ha registrado hacia fuera. Gracias\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "web client astGUIclient: Conexión\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión
 
Conexión Del Usuario:
Contraseña Del Usuario:
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Conexión Del Teléfono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Conexión Del Teléfono
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Conexión Del Teléfono\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión Del Teléfono
 
Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor:
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -SALIR
\n"; ?> -
Pantalla PrincipalPantalla Lineas ActivasPantalla de ConferenciasComprobar buzón de vozLlamada Activa
-
- - -

Logout
-
- - -
TRUNK COLGAR

- Active Trunks Menu
- Colgar Trunk   |   - Capturar Trunk   |   - Escuchar Trunk   |   - Recarga   |   - Volver a la pantalla principal -
-
- - -
Colgar Local

- Menú Local Activa
- Colgar Local   |   - Capturar Local   |   - Escuchar Local   |   - Recarga   |   - Volver a la pantalla principal -
-
- - - - - - - -
TRANSFERIR LLAMADA ACTIVA
Canal que va a ser transferido: Canal
Extensiones:
Menú Extensiones
-
- Envíe a la extensión seleccionada

- Enviar al buzón de voz seleccionada

- Envíe a este número:


- Recarga


- Volver a la pantalla principal

-
Conferencias:
(Pinchar en un número de abajo para enviar a una conferencia)
Enviar mi canal también
Menú de Conferencias
-
- - - - - -
Marcar a Extensiones LOCALES
Teléfono llamando desde: Canal
Extensiones:
Menú Extensiones
-
- Llamar extensión seleccionada

- Llamar buzón de voz seleccionado

- Recarga


- Volver a la pantalla principal

-
-
- - -
LLAMADAS APARCADAS:
- Volver a la pantalla principal

-
-
- - - - - - - - - - - - - - - -
  -
BUZÓN DE VOZ     NUEVO:     VIEJO:             MARCADO MANUAL       DIAL
LLAMADAS APARCADAS: 0                MARCAR EXTENSIONES LOCALES
LLAMADAS SALIENTES:
LLAMADAS ENTRANTES:
versión astGUIclient del tela-cliente: CONSTRUCCION:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORITOS       corrija
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORITOS

 
ENVIAR FAVORITOS CHANGES - requires logout
DE NUEVO A VENTANA PRINCIPAL - no haga caso de los cambios realizados
-
- -
- - - - - - - - - - - - - -
-PAUSA | COMIENZO     Actualizar la tarifa: 1000 ms Más rápido | Más lento

-
Inizializando..
-
Extensiones Activas
-ACTUALIZAR | -ORDEN | -
Líneas de salida
-ACTUALIZAR | -ORDEN | -
Extensiones Locales
-ACTUALIZAR | -ORDEN | -
- Los Datos Van Aquí

-
- Los Datos Van Aquí

Acciones en Trunk -
- Los Datos Van Aquí

Acción Local -
-
- - - - -
- - -Lista De las Conferencias - - - -
-Pinchar a la izquierda del número de una sala de conferencias para obtener información -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/call_log_display.php deleted file mode 100644 index 9cb9298e..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Motrar el registro de llamadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/conf_exten_check.php deleted file mode 100644 index 00c15bda..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar la Extensión de Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten No es válido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanalA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$CanalA[$counter] ~"; - # echo "$CanalA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten No es válido or Exten $exten No es válido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conferencia $conf_exten Ha sido registrado para $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/inbound_popup.php deleted file mode 100644 index 8363b57e..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -LLAMADA DE ENTRADA ACTIVA"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

LLAMADA DE ENTRADA ACTIVA

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid No es válido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Canal: $row[1]
LlamadorID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "A MEDIDA - \n"; - - echo "
Número Marcado: $row[8]
Notas: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "COLGAR - \n"; - echo "ENVIAR A MI BUZÓN DE VOZ\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/live_exten_check.php deleted file mode 100644 index 179a4be4..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar Extensión Activa"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $CanalA[$loop_count] = "$row[0]"; - $CanalB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$CanalA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$CanalA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$CanalB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$CanalB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "CanalA: $CanalA[$counter] ~"; - echo "CanalB: $CanalB[$counter] ~"; - echo "CanalBtrunk: $CanalA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/manager_send.php deleted file mode 100644 index 55d65ef6..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Enviar al Manager: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AYUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten No es válido or queryCID $queryCID No es válido, Originate comando no insertado\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado a Exten $exten Canal $channel en $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nOriginateName Action no enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nOriginateNameVmail Action no enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten No es válido or queryCID $queryCID No es válido, Originate comando no insertado\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando enviado a Exten $exten Canal $channel en $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten No es válido or ext_context $ext_context or queryCID $queryCID No es válido, Hangup comando no insertado\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or queryCID $queryCID No es válido, Hangup comando no insertado\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel no está activo en $call_server_ip, Checking Live Canal...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup comando enviado a Canal $channel en $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "auto_dial_level $auto_dial_level debe ser fijado\n"; - echo "campaign $campaign debe ser fijado\n"; - echo "uniqueid $uniqueid debe ser fijado\n"; - echo "lead_id $lead_id debe ser fijado\n"; - echo "\nRedirectVD Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFERENCIA' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='TRANSFERENCIA' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "parkedby $parkedby debe ser fijado\n"; - echo "\nRedirectToPark Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectFromPark Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectName Action no enviado\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "extenName $extenName debe ser fijado\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirectNameVmail Action no enviado\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "ExtraCanal $extrachannel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirect Action no enviado\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "No puede encontrar conferencia vacía en $server_ip, Redirect comando no insertado\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado a Canal $channel and \nExtraCanal $extrachannel\n to $exten en $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando enviado a Canal $channel en $call_server_ip and \nExtraCanal $extrachannel\n to $exten en $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una de estas variables No es válido:\n"; - echo "Canal $channel debe ser mayor de 2 caracteres\n"; - echo "queryCID $queryCID debe ser mayor de 14 caracteres\n"; - echo "exten $exten debe ser fijado\n"; - echo "ext_context $ext_context debe ser fijado\n"; - echo "ext_priority $ext_priority debe ser fijado\n"; - echo "\nRedirect Action no enviado\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect comando enviado a Canal $channel en $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or queryCID $queryCID No es válido or filename: $filename No es válido, $ACTION comando no insertado\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canal $channel no está activo en $server_ip, $ACTION comando no insertado\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION comando enviado a Canal $channel en $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canal $channel No es válido or exten $exten No es válido or filename: $filename No es válido, $ACTION comando no insertado\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going en in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION comando enviado a Canal $channel en $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA GRABACIÓN DURARÁ HASTA 60 MINUTOS\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/park_calls_display.php deleted file mode 100644 index 27973705..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Mostrar Llamadas Aparcadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten No es válido o protocolo $protocol No es válido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vdc_db_query.php deleted file mode 100644 index b6d8e241..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Opción Del Grupo $closer_choice No es válido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Opción Del Grupo $closer_choice Ha sido registrado para user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "TOLVA VACÍA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "TOLVA VACÍA\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LLAMADA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context No es válido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID No es válido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "REGISTRO NO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign No es válido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Insertado: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "REGISTRO NO ENTRADO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "LLAMADA_LOG Insertado: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "REGISTRO NO ENTRADO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "REGISTRO NO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id No es válido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NO ENTRADO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campaña $campaign No es válido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INLLAMADA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INLLAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INLLAMADA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INLLAMADA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send en to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user en $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten No es válido\n"; - exit; - } -else - { - ##### Insert a SALIR record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','SALIR','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation en the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id No es válido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### LLAMADABACK ENTRY - if ( ($dispo_choice == 'CBHVIEJO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' se ha cambiado a ' . $dispo_choice . " Estado\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id No es válido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id La información ha sido actualizada\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage No es válido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' ahora está en estado ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list No es válido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vicidial.php deleted file mode 100644 index 55c738d9..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Usted ahora ha registrado hacia fuera. Gracias\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "web client VICIDIAL: Conexión Otra Vez\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Conexión Otra Vez
 
Conexión Del Teléfono:
Contraseña Del Teléfono:
Conexión Del Usuario:
Contraseña Del Usuario:
Campaña: $camp_form_code

VERSIÓN: $version       CONSTRUCCION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "web client VICIDIAL: Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Conexión Del Usuario

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión en la Campaña
 
Conexión Del Usuario:
Contraseña Del Usuario:
Campaña: $camp_form_code

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "web client VICIDIAL: Conexión\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión
 
Conexión Del Teléfono:
Contraseña Del Teléfono:
Conexión Del Usuario:
Contraseña Del Usuario:
Campaña: $camp_form_code

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client VICIDIAL: Conexión Del Teléfono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Conexión Del Teléfono
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campaña no está activa, intentelo otra vez, por favor
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La conexión incorrecta, intentelo otra vez, por favor
"; - } - } - if ($VDloginDISPLAY) - { - echo "web client VICIDIAL: Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión en la Campaña
 
Conexión Del Usuario:
Contraseña Del Usuario:
Campaña: $camp_form_code

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client VICIDIAL: Conexión Del Teléfono Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conexión Error
 
Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor:
 
Conexión Del Teléfono:
Contraseña Del Teléfono:

VERSIÓN: $version       CONSTRUCCION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client VICIDIAL\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $LlamadorID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed en this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login en phone: $SIP_user a la campaña: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NUEVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "web client VICIDIAL: VICIDIAL Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Lo siento, no hay leads en el hopper de esta campaña\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Conexión: \n
"; - echo "Contraseña:
\n"; - echo "Campaña: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "web client VICIDIAL: VICIDIAL Conexión en la Campaña\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Conexión: \n
"; - echo "Contraseña:
\n"; - echo "Campaña: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -SALIR\n"; ?> -
-
- - - - - - - - -
VICIDIALSCRIPT   LIVE     sesión ID: Llamada Activa
-
- - - - -

VICIDIAL
-
- - - - -
- - Transferencia - Conferencia
- CLOSER INTERNO - CLOSER LOCAL - CODE - Colgar Línea Xfer - Colgar Ambas Líneas - -
- - Número a llamar   - segundos   - channel - - OVERRIDE   - D1 - D2 -
- - Marcar Con El Cliente - Dial Del Cliente Del Parque - ABANDONAR LLAMADA 3-WAY - Marcar Blind Transfer - Blind Transfer VMail Message -
-
-
- - - - -
Lead Dispositioned Como:

- -
-
-
- - - - - - - -
Teclas de acceso rápido a la Disposición: - Cuando esté activo, presione simplemente la tecla para la disposición deseada para esta llamada. La llamada después será colgada y dispositioned automáticamente:
- - - - - -
-
- - -
Nadie está en su sesión:
- OK -
-
- - -
El cliente ha colgado:
- OK -
-
- - -

SALIR
-
- - -
-
- - -
 
-
- - -
Cualquier cambio realizado al cliente que no será la información abajo en este tiempo comitted, usted debe cambiar la información del cliente antes de usted retraso la llamada.
-
- - -
DISPOSITION LLAMADA :       reduzca al mínimo
- selección de la disposición del End-of-call -
- PARAR LA LLAMADA
- REINICIAR | - ENVIAR -



  -
-
- - - -
Seleccione una fecha del servicio repetido :
- - - Seleccione una fecha abajo   -     - Hour: -   - Minutes: -   - -  
- - Comentarios de los CBES:

- - ENVIAR

- - -

  -
-
- - -
SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER
- SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER -
- BLENDED LLAMADAING(Salientes activdas)
- REINICIAR | - ENVIAR -



  -
-
- - - - - - - - - - - -
TRANSFERIR LLAMADA ACTIVA
Canal que va a ser transferido: Canal
Extensiones:
Menú Extensiones
-
- Envíe a la extensión seleccionada

- Enviar al buzón de voz seleccionada

- Envíe a este número:


- ACTUALIZAR


- Volver a la pantalla principal

-
Conferencias:
(Pinchar en un número de abajo para enviar a una conferencia)
Enviar mi canal también
Menú de Conferencias
-
- - - - -
VICIDIAL SCRIPT
-
- - - - - - - - - - - - - - - - - -
ESTADO:
-
-Marcar el Siguiente Número
- MOSTRAR LEAD
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " TELÉFONO DEL ALT
";} - - -?> -GRABANDO ARCHIVO:
-
-
-GRABACIÓN ID:
-
- -Comenzar La Grabación
-
-Formulario Web
-
-Aparcar llamada
-Transferencia - Conferencia
-
-Colgar al Cliente
-
-Enviar DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
segundos:   Canal:   Tiempo:
Información Del Cliente:
Título:   Primero:   IM:   Último:
Dirección1:
Dirección2:   Dirección3:
Ciudad:   Estado:   Código Postal:
Provincia:   Vendedor ID:
Teléfono:   Código Del Dial:   Teléfono Alt:
Demostración:   Email:
Comentarios:
- -
-


  - -
- - - - -
versión web client VICIDIAL:     CONSTRUCCION:               Servidor:              
-Mostrar la información del canal Conferencia
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TECLAS ACCESO RÁPIDO INACTIVAS - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/voicemail_check.php deleted file mode 100644 index 41bab949..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_es/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuarioname/Contraseña: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Comprobar el buzón de voz"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "caja del buzón de voz $vmail_box No es válido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/active_list_refresh.php deleted file mode 100644 index 94f9599c..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage De Liste: "; -if ($ADD==1) {echo "Prolongements De phase";} -if ($ADD==2) {echo "Prolongements Occupés";} -if ($ADD==3) {echo "Lignes Extérieures";} -if ($ADD==4) {echo "Prolongements Locaux";} -if ($ADD==5) {echo "Conférences";} -if ($ADD==99999) {echo "AIDE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/astguiclient.php deleted file mode 100644 index 5b75f3e5..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Vous vous êtes maintenant déconnecté. Merci\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "web client astGUIclient: Ouverture\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture
 
Ouverture D'Utilisateur:
Mot de passe D'Utilisateur:
Ouverture De Téléphone:
Mot de passe De Téléphone:

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICICADRAN|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICICADRAN|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Ouverture De Téléphone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Ouverture De Téléphone
 
Ouverture De Téléphone:
Mot de passe De Téléphone:

VERSION: $version       CONSTRUCTION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Ouverture De Téléphone\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture De Téléphone
 
Désolé, votre ouverture de téléphone et mot de passe ne soyez pas:
 
Ouverture De Téléphone:
Mot de passe De Téléphone:

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -DÉCONNEXION
\n"; ?> -
Panneau PrincipalLignes Actives PanneauPanneau De ConférencesVérifiez VoicemailVivent L'Appel
-
- - -

Logout
-
- - -
TRUNK DÉCROCHEMENT

- Active Trunks Menu
- Tronc De Décrochement   |   - Tronc De Détournement   |   - Écoutent Le Tronc   |   - Régénérez   |   - De nouveau à la fenêtre principale -
-
- - -
DÉCROCHEMENT LOCAL

- Menu Local Actif
- Gens du pays De Décrochement   |   - Gens du pays De Détournement   |   - Écoutent Les Gens du pays   |   - Régénérez   |   - De nouveau à la fenêtre principale -
-
- - - - - - - -
TRANSFERT DE PHASE D'APPEL
La Manche à transférer: LaManche
Prolongements:
Menu De Prolongements
-
- Envoyez à la prolongation choisie

- Envoyez dans la boîte choisie de vmail

- Envoyez à ce nombre:


- Régénérez


- De nouveau à la fenêtre principale

-
Conférences:
(cliquez sur un nombre ci-dessous pour envoyer à une)
Envoyez mon canal aussi
Menu De Conférences
-
- - - - - -
Cadran LOCAL De Prolongements
Téléphone appelant de: LaManche
Prolongements:
Menu De Prolongements
-
- Prolongation choisie par appel

- Boîte de vmail choisie par appel

- Régénérez


- De nouveau à la fenêtre principale

-
-
- - -
APPELS GARÉS:
- De nouveau à la fenêtre principale

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NOUVEAU:     VIEUX:             CADRAN MANUEL       CADRAN
APPELS GARÉS: 0                PROLONGEMENTS LOCAUX DE CADRAN
APPELS EN PARTANCE:
APPELS D'ARRIVÉE:
VERSION astGUIclient d'enchaînement-client: CONSTRUCTION:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORIS       éditez
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORIS

 
SOUMETTEZ FAVORIS CHANGES - requires logout
DE NOUVEAU À LA FENÊTRE PRINCIPALE - ignorez les changements faits
-
- -
- - - - - - - - - - - - - -
-PAUSE | DÉBUT     La vitesse de régénération: 1000 ms Plus rapidement | Plus lent

-
Initialisation..
-
Prolongements Actifs
-RÉGÉNÉREZ | -ORDRE | -
Lignes Extérieures
-RÉGÉNÉREZ | -ORDRE | -
Prolongements Locaux
-RÉGÉNÉREZ | -ORDRE | -
- Les Données Vont Ici

-
- Les Données Vont Ici

Action De Tronc -
- Les Données Vont Ici

Action Locale -
-
- - - - -
- - -Liste De Conférences - - - -
-Cliquez sur un nombre de salle de conférence du côté gauche -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/call_log_display.php deleted file mode 100644 index 783b255f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage De Notation D'Appel"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/conf_exten_check.php deleted file mode 100644 index a25fd51c..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De Prolongation De Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten est inadmissible\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$LaMancheA[$counter] ~"; - # echo "$LaMancheA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten est inadmissible or Exten $exten est inadmissible\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conférence $conf_exten a été enregistré à $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/htglobalize.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/htglobalize.php deleted file mode 100644 index 72a10e1f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/htglobalize.php +++ /dev/null @@ -1,23 +0,0 @@ - $value){ - ${$key} = $value; - global ${$key};// = $value; - } - -} -array_conv($_GET); -array_conv($_POST); -array_conv($_SERVER); - -?> \ No newline at end of file diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/inbound_popup.php deleted file mode 100644 index 45f0a9ed..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -APPEL D'ARRIVÉE DE PHASE"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

APPEL D'ARRIVÉE DE PHASE

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
LaManche: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_LaManche=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "COUTUME - \n"; - - echo "
Numéro Composé: $row[8]
Notes: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "DÉCROCHEMENT - \n"; - echo "ENVOYEZ À MON VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/live_exten_check.php deleted file mode 100644 index cdc41871..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De phase De Prolongation"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $LaMancheA[$loop_count] = "$row[0]"; - $LaMancheB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$LaMancheA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$LaMancheA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$LaMancheB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$LaMancheB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "LaMancheA: $LaMancheA[$counter] ~"; - echo "LaMancheB: $LaMancheB[$counter] ~"; - echo "LaMancheBtrunk: $LaMancheA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/manager_send.php deleted file mode 100644 index b7c58870..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Le Directeur Envoient: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AIDE";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten est inadmissible or queryCID $queryCID est inadmissible, Originate commande non insérée\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate commande envoyée pour Exten $exten LaManche $channel sur $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nOriginateName Action non envoyé\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nOriginateNameVmail Action non envoyé\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten est inadmissible or queryCID $queryCID est inadmissible, Originate commande non insérée\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate commande envoyée pour Exten $exten LaManche $channel sur $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten est inadmissible or ext_context $ext_context or queryCID $queryCID est inadmissible, Hangup commande non insérée\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or queryCID $queryCID est inadmissible, Hangup commande non insérée\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel n'est pas de phase sur $call_server_ip, Checking Live LaManche...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup commande envoyée pour LaManche $channel sur $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "auto_dial_level $auto_dial_level doit être placé\n"; - echo "campaign $campaign doit être placé\n"; - echo "uniqueid $uniqueid doit être placé\n"; - echo "lead_id $lead_id doit être placé\n"; - echo "\nRedirectVD Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "parkedby $parkedby doit être placé\n"; - echo "\nRedirectToPark Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectFromPark Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectName Action non envoyé\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "extenName $extenName doit être placé\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirectNameVmail Action non envoyé\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "ExtraLaManche $extrachannel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirect Action non envoyé\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Ne peut pas trouver la conférence vide sur $server_ip, Redirect commande non insérée\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "LaManche $channel n'est pas de phase sur $call_server_ip, Redirect commande non insérée\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, Redirect commande non insérée\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra commande envoyée pour LaManche $channel and \nExtraLaManche $extrachannel\n to $exten sur $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra commande envoyée pour LaManche $channel sur $call_server_ip and \nExtraLaManche $extrachannel\n to $exten sur $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Une de ces variables est inadmissible:\n"; - echo "LaManche $channel doivent être les 2 caractères plus grands que\n"; - echo "queryCID $queryCID doivent être les 14 caractères plus grands que\n"; - echo "exten $exten doit être placé\n"; - echo "ext_context $ext_context doit être placé\n"; - echo "ext_priority $ext_priority doit être placé\n"; - echo "\nRedirect Action non envoyé\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, Redirect commande non insérée\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect commande envoyée pour LaManche $channel sur $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or queryCID $queryCID est inadmissible or filename: $filename est inadmissible, $ACTION commande non insérée\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "LaManche $channel n'est pas de phase sur $server_ip, $ACTION commande non insérée\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION commande envoyée pour LaManche $channel sur $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "LaManche $channel est inadmissible or exten $exten est inadmissible or filename: $filename est inadmissible, $ACTION commande non insérée\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going sur in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION commande envoyée pour LaManche $channel sur $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n L'ENREGISTREMENT DURERA JUSQU'À 60 MINUTES\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/park_calls_display.php deleted file mode 100644 index 4833f40c..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Affichage Garé D'Appels"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten est inadmissible ou protocole $protocol est inadmissible\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vdc_db_query.php deleted file mode 100644 index 6260080e..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Manuscrit De Question De Base de données"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Choix De Groupe $closer_choice est inadmissible\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Choix De Groupe $closer_choice a été enregistré à user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "DISTRIBUTEUR VIDE\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INAPPEL - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "DISTRIBUTEUR VIDE\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INAPPEL - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "APPEL NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context est inadmissible\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID est inadmissible\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "NOTATION NON ENTRÉE\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign est inadmissible\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inséré: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "NOTATION NON ENTRÉE\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "APPEL_LOG Inséré: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "NOTATION NON ENTRÉE\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "NOTATION NON ENTRÉE\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id est inadmissible\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "NOTATION NON ENTRÉE\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campagne $campaign est inadmissible\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INAPPEL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INAPPEL - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INAPPEL - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INAPPEL - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send sur to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user sur $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten est inadmissible\n"; - exit; - } -else - { - ##### Insert a DÉCONNEXION record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','DÉCONNEXION','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation sur the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id est inadmissible\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### APPELBACK ENTRY - if ( ($dispo_choice == 'CBHVIEUX') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' a été changé en ' . $dispo_choice . " Statut\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id est inadmissible\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id l'information a été mise à jour\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage est inadmissible\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' est maintenant dans le statut ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list est inadmissible\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vicidial.php deleted file mode 100644 index f2100ace..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Vous vous êtes maintenant déconnecté. Merci\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client de VICICADRAN: Re-Ouverture\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-Ouverture
 
Ouverture De Téléphone:
Mot de passe De Téléphone:
Ouverture D'Utilisateur:
Mot de passe D'Utilisateur:
Campagne: $camp_form_code

VERSION: $version       CONSTRUCTION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client de VICICADRAN: Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Ouverture D'Utilisateur

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture De Campagne
 
Ouverture D'Utilisateur:
Mot de passe D'Utilisateur:
Campagne: $camp_form_code

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client de VICICADRAN: Ouverture\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture
 
Ouverture De Téléphone:
Mot de passe De Téléphone:
Ouverture D'Utilisateur:
Mot de passe D'Utilisateur:
Campagne: $camp_form_code

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client de VICICADRAN: Ouverture De Téléphone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Ouverture De Téléphone
 
Ouverture De Téléphone:
Mot de passe De Téléphone:

VERSION: $version       CONSTRUCTION: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campagne non active, essayent svp encore
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "L'ouverture incorrecte, essayent svp encore
"; - } - } - if ($VDloginDISPLAY) - { - echo "Web client de VICICADRAN: Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture De Campagne
 
Ouverture D'Utilisateur:
Mot de passe D'Utilisateur:
Campagne: $camp_form_code

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client de VICICADRAN: Ouverture De Téléphone Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Ouverture Error
 
Désolé, votre ouverture de téléphone et mot de passe ne soyez pas:
 
Ouverture De Téléphone:
Mot de passe De Téléphone:

VERSION: $version       CONSTRUCTION: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client de VICICADRAN\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed sur this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login sur phone: $SIP_user à la campagne: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NOUVEAU record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client de VICICADRAN: VICICADRAN Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Désolé, il n'y a aucun fil dans le distributeur pour cette campagne\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Ouverture: \n
"; - echo "Mot de passe:
\n"; - echo "Campagne: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client de VICICADRAN: VICICADRAN Ouverture De Campagne\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Ouverture: \n
"; - echo "Mot de passe:
\n"; - echo "Campagne: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -DÉCONNEXION\n"; ?> -
-
- - - - - - - - -
VICICADRANSCRIPT   LIVE     ID de session: Vivent L'Appel
-
- - - - -

VICICADRAN
-
- - - - -
- - Transfert - Conférence
- PLUS ÉTROIT INTERNE - GENS DU PAYS PLUS ÉTROITS - CODE - Ligne De Xfer De Décrochement - Décrochement Les deux Lignes - -
- - Nombre à appeler   - secondes   - channel - - OVERRIDE   - D1 - D2 -
- - Cadran Avec Le Client - Cadran De Client De Parc - APPEL DU CONGÉ 3-WAY - Transfert D'Aveugle De Cadran - Blind Transfer VMail Message -
-
-
- - - - -
Fil Dispositioned As:

- -
-
-
- - - - - - - -
Touches Directes De Disposition: - Si actif, appuyez sur simplement la touche de clavier pour la:
- - - - - -
-
- - -
Aucun n'est en votre session:
- OK -
-
- - -
Le client a raccroché:
- OK -
-
- - -

DÉCONNEXION
-
- - -
-
- - -
 
-
- - -
Tous les changements faits au client que l'information ci-dessous actuellement ne sera pas comitted, vous doivent changer l'information de client avant vous décrochement l'appel.
-
- - -
APPEL DE DISPOSITION :       réduisez au minimum
- Extrémité-de-appelez Le Choix De Disposition -
- CESSEZ D'APPELER
- REMISE | - SOUMETTEZ -



  -
-
- - - -
Choisissez une date de rappel de service :
- - - Choisissez une date ci-dessous   -     - Hour: -   - Minutes: -   - -  
- - Commentaires de CB:

- - SOUMETTEZ

- - -

  -
-
- - -
UN CHOIX DE GROUPE D'ARRIVÉE PLUS ÉTROIT
- Un Choix De Groupe D'arrivée Plus étroit -
- APPELER MÉLANGÉ(en partance activé)
- REMISE | - SOUMETTEZ -



  -
-
- - - - - - - - - - - -
TRANSFERT DE PHASE D'APPEL
La Manche à transférer: LaManche
Prolongements:
Menu De Prolongements
-
- Envoyez à la prolongation choisie

- Envoyez dans la boîte choisie de vmail

- Envoyez à ce nombre:


- RÉGÉNÉREZ


- De nouveau à la fenêtre principale

-
Conférences:
(cliquez sur un nombre ci-dessous pour envoyer à une)
Envoyez mon canal aussi
Menu De Conférences
-
- - - - -
VICICADRAN SCRIPT
-
- - - - - - - - - - - - - - - - - -
STATUT:
-
-Prochain Nombre De Cadran
- PRÉVISION DE FIL
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " TÉLÉPHONE D'ALT
";} - - -?> -DOSSIER D'ENREGISTREMENT:
-
-
-IDENTIFICATION DISQUE:
-
- -Commencez À enregistrer
-
-Forme de Web
-
-Appel De Parc
-Transfert - Conférence
-
-Client De Décrochement
-
-Envoyez DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
secondes:   LaManche:   Temps De Cust:
L'Information De Client:
Titre:   D'abord:   MI :  Bout:
Adresse1:
Adresse2:   Adresse3:
Ville:   État:   Code postal:
Province:   Identification De Fournisseur:
Téléphone:   DialCode:   Alt. Téléphone:
Exposition:   Email:
Commentaires:
- -
-


  - -
- - - - -
Version d'enchaînement-client de VICICADRAN:     CONSTRUCTION:               Serveur:              
-Montrez l'information de canal de conférence téléphonique
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TOUCHES DIRECTES INACTIVES - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/voicemail_check.php deleted file mode 100644 index 1b5c88f1..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_fr/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inadmissible Utilisateurname/Mot de passe: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inadmissible server_ip: |$server_ip| or Inadmissible session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inadmissible session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Contrôle De Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "boîte de voicemail $vmail_box est inadmissible\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/active_list_refresh.php deleted file mode 100644 index 39da8358..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Della Lista: "; -if ($ADD==1) {echo "Estensioni In tensione";} -if ($ADD==2) {echo "Estensioni Occupate";} -if ($ADD==3) {echo "Linee Esterne";} -if ($ADD==4) {echo "Estensioni Locali";} -if ($ADD==5) {echo "Congressi";} -if ($ADD==99999) {echo "AIUTO";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/astguiclient.php deleted file mode 100644 index d1db2c90..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Ora avete annotato fuori. Grazie\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "web client astGUIclient: Inizio attività\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività
 
Inizio attività Dell'Utente:
Parola d'accesso Dell'Utente:
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICIMANOPOLA|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICIMANOPOLA|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Inizio attività Del Telefono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Inizio attività Del Telefono
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Inizio attività Del Telefono\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività Del Telefono
 
Spiacente, il vostri inizio attività del telefono e parola d'accesso:
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -TERMINE
\n"; ?> -
Pannello PrincipaleLinee Attive PannelloPannello Di CongressiControlli VoicemailVive La Chiamata
-
- - -

Logout
-
- - -
TRUNK HANGUP

- Active Trunks Menu
- Tronco Di Hangup   |   - Tronco Di Dirottamento   |   - Ascolta Il Tronco   |   - Rinfreschi   |   - Di nuovo alla finestra principale -
-
- - -
HANGUP LOCALE

- Menu Locale Attivo
- Local Di Hangup   |   - Local Di Dirottamento   |   - Ascolta Il Local   |   - Rinfreschi   |   - Di nuovo alla finestra principale -
-
- - - - - - - -
TRASFERIMENTO IN TENSIONE DI CHIAMATA
Manica da trasferire: Manica
Estensioni:
Menu Di Estensioni
-
- Trasmetta all'estensione selezionata

- Trasmetta alla scatola selezionata del vmail

- _ trasmett questo numero:


- Rinfreschi


- Di nuovo alla finestra principale

-
Congressi:
(scatti sopra un numero qui sotto per trasmettere ad un congresso)
Trasmetta la mia scanalatura anche
Menu Di Congressi
-
- - - - - -
Manopola LOCALE Di Estensioni
Telefono che denomina da: Manica
Estensioni:
Menu Di Estensioni
-
- Estensione selezionata chiamata

- Scatola del vmail selezionata chiamata

- Rinfreschi


- Di nuovo alla finestra principale

-
-
- - -
CHIAMATE PARCHEGGIATE:
- Di nuovo alla finestra principale

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NUOVO:     VECCHIO:             MANOPOLA MANUALE       MANOPOLA
CHIAMATE PARCHEGGIATE: 0                ESTENSIONI LOCALI DELLA MANOPOLA
CHIAMATE OUTBOUND:
CHIAMATE INBOUND:
VERSIONEE astGUIclient del fotoricettore-cliente: CONFIGURAZIONE:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORITI       pubblichi
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORITI

 
PRESENTI FAVORITI CHANGES - requires logout
DI NUOVO ALLA FINESTRA PRINCIPALE - ignori i cambiamenti fatti
-
- -
- - - - - - - - - - - - - -
-PAUSA | INIZIO     La velocità di rinfrescamento: 1000 ms Più velocemente | Più lento

-
Inizializzazione..
-
Estensioni Attive
-RINFRESCHI | -ORDINE | -
Linee Esterne
-RINFRESCHI | -ORDINE | -
Estensioni Locali
-RINFRESCHI | -ORDINE | -
- I Dati Vanno Qui

-
- I Dati Vanno Qui

Azione Del Tronco -
- I Dati Vanno Qui

Azione Locale -
-
- - - - -
- - -Lista Di Congressi - - - -
-Scatti sopra un numero di stanza di congresso a sinistra per l'Info su -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/call_log_display.php deleted file mode 100644 index 78dad078..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Del Ceppo Di Chiamata"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/conf_exten_check.php deleted file mode 100644 index bbfbc10c..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo Di Estensione Di Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten è non valido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ManicaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $ManicaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$ManicaA[$counter] ~"; - # echo "$ManicaA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten è non valido or Exten $exten è non valido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Congresso $conf_exten è stato registrato a $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/inbound_popup.php deleted file mode 100644 index b2c85495..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -CHIAMATA INBOUND IN TENSIONE"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

CHIAMATA INBOUND IN TENSIONE

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid è non valido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Manica: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Manica=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "ABITUDINE - \n"; - - echo "
Il Numero Ha composto: $row[8]
Note: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "HANGUP - \n"; - echo "TRASMETTA AL MIO VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/live_exten_check.php deleted file mode 100644 index df5ed62a..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo In tensione Di Estensione"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $ManicaA[$loop_count] = "$row[0]"; - $ManicaB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ManicaA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ManicaA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ManicaB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ManicaB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "ManicaA: $ManicaA[$counter] ~"; - echo "ManicaB: $ManicaB[$counter] ~"; - echo "ManicaBtrunk: $ManicaA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/manager_send.php deleted file mode 100644 index 72c7a54d..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Il Responsabile Trasmette: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AIUTO";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten è non valido or queryCID $queryCID è non valido, Originate ordine non inserito\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate ordine trasmesso per Exten $exten Manica $channel su $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nOriginateName Action non trasmesso\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nOriginateNameVmail Action non trasmesso\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten è non valido or queryCID $queryCID è non valido, Originate ordine non inserito\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate ordine trasmesso per Exten $exten Manica $channel su $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten è non valido or ext_context $ext_context or queryCID $queryCID è non valido, Hangup ordine non inserito\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or queryCID $queryCID è non valido, Hangup ordine non inserito\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel non è in tensione su $call_server_ip, Checking Live Manica...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $call_server_ip, Hangup ordine non inserito $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup ordine trasmesso per Manica $channel su $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "auto_dial_level $auto_dial_level deve essere regolato\n"; - echo "campaign $campaign deve essere regolato\n"; - echo "uniqueid $uniqueid deve essere regolato\n"; - echo "lead_id $lead_id deve essere regolato\n"; - echo "\nRedirectVD Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "parkedby $parkedby deve essere regolato\n"; - echo "\nRedirectToPark Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectFromPark Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectName Action non trasmesso\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirectNameVmail Action non trasmesso\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "ExtraManica $extrachannel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirect Action non trasmesso\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Non può trovare il congresso vuoto su $server_ip, Redirect ordine non inserito\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Manica $channel non è in tensione su $call_server_ip, Redirect ordine non inserito\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Manica $channel non è in tensione su $server_ip, Redirect ordine non inserito\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra ordine trasmesso per Manica $channel and \nExtraManica $extrachannel\n to $exten su $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra ordine trasmesso per Manica $channel su $call_server_ip and \nExtraManica $extrachannel\n to $exten su $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Una di queste variabili è non valido:\n"; - echo "Manica $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "\nRedirect Action non trasmesso\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $server_ip, Redirect ordine non inserito\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect ordine trasmesso per Manica $channel su $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or queryCID $queryCID è non valido or filename: $filename è non valido, $ACTION ordine non inserito\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Manica $channel non è in tensione su $server_ip, $ACTION ordine non inserito\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION ordine trasmesso per Manica $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Manica $channel è non valido or exten $exten è non valido or filename: $filename è non valido, $ACTION ordine non inserito\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going su in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION ordine trasmesso per Manica $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA REGISTRAZIONE DURERÀ FINO A 60 MINUTI\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/park_calls_display.php deleted file mode 100644 index cf729c1d..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Esposizione Parcheggiata Di Chiamate"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten è non valido o protocollo $protocol è non valido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vdc_db_query.php deleted file mode 100644 index 925812f6..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Scritto Di Domanda Della Base di dati"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Scelta Del Gruppo $closer_choice è non valido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Scelta Del Gruppo $closer_choice è stato registrato a user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "TRAMOGGIA VUOTA\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "TRAMOGGIA VUOTA\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CHIAMATA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context è non valido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID è non valido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "CEPPO NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign è non valido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Inserito: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "CEPPO NON INSERITO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CHIAMATA_LOG Inserito: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "CEPPO NON INSERITO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "CEPPO NON INSERITO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id è non valido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "CEPPO NON INSERITO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campagna $campaign è non valido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCHIAMATA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCHIAMATA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCHIAMATA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCHIAMATA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send su to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user su $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten è non valido\n"; - exit; - } -else - { - ##### Insert a TERMINE record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','TERMINE','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation su the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id è non valido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CHIAMATABACK ENTRY - if ( ($dispo_choice == 'CBHVECCHIO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' è stato cambiato a ' . $dispo_choice . " Condizione\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id è non valido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id le informazioni sono state aggiornate\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage è non valido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' è ora nella condizione ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list è non valido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vicidial.php deleted file mode 100644 index 50c0c241..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Ora avete annotato fuori. Grazie\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client di VICIMANOPOLA: Re-Inizio attività\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-Inizio attività
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:
Inizio attività Dell'Utente:
Parola d'accesso Dell'Utente:
Campagna: $camp_form_code

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client di VICIMANOPOLA: Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Inizio attività Dell'Utente

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività Di Campagna
 
Inizio attività Dell'Utente:
Parola d'accesso Dell'Utente:
Campagna: $camp_form_code

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client di VICIMANOPOLA: Inizio attività\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:
Inizio attività Dell'Utente:
Parola d'accesso Dell'Utente:
Campagna: $camp_form_code

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client di VICIMANOPOLA: Inizio attività Del Telefono\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Inizio attività Del Telefono
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campagna non attiva, prova prego ancora
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "L'inizio attività errato, prova prego ancora
"; - } - } - if ($VDloginDISPLAY) - { - echo "Web client di VICIMANOPOLA: Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività Di Campagna
 
Inizio attività Dell'Utente:
Parola d'accesso Dell'Utente:
Campagna: $camp_form_code

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client di VICIMANOPOLA: Inizio attività Del Telefono Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Inizio attività Error
 
Spiacente, il vostri inizio attività del telefono e parola d'accesso:
 
Inizio attività Del Telefono:
Parola d'accesso Del Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client di VICIMANOPOLA\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed su this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login su phone: $SIP_user alla campagna: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NUOVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client di VICIMANOPOLA: VICIMANOPOLA Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Spiacenti, non ci sono cavi nella tramoggia per questa campagna\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inizio attività: \n
"; - echo "Parola d'accesso:
\n"; - echo "Campagna: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client di VICIMANOPOLA: VICIMANOPOLA Inizio attività Di Campagna\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Inizio attività: \n
"; - echo "Parola d'accesso:
\n"; - echo "Campagna: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -TERMINE\n"; ?> -
-
- - - - - - - - -
VICIMANOPOLASCRIPT   LIVE     ID di sessione: Vive La Chiamata
-
- - - - -

VICIMANOPOLA
-
- - - - -
- - Trasferimento - Congresso
- PIÙ VICINO INTERNO - LOCAL PIÙ VICINO - CODE - Linea Di Xfer Di Hangup - Hangup Entrambe le Linee - -
- - Numero da denominare   - secondi   - channel - - OVERRIDE   - D1 - D2 -
- - Manopola Con Il Cliente - Manopola Del Cliente Del Parco - CHIAMATA DI PERMESSO 3-WAY - Trasferimento Dei Ciechi Della Manopola - Blind Transfer VMail Message -
-
-
- - - - -
Cavo Dispositioned As:

- -
-
-
- - - - - - - -
Chiavi Calde Di Disposizione: - Una volta attivo, premi semplicemente la chiave di tastiera per la:
- - - - - -
-
- - -
Nessuno è nella vostra sessione:
- OK -
-
- - -
Il cliente ha appeso in su:
- OK -
-
- - -

TERMINE
-
- - -
-
- - -
 
-
- - -
Tutti i cambiamenti fatti al cliente che le informazioni qui sotto attualmente non saranno comitted, voi devono cambiare le informazioni del cliente prima di voi hangup la chiamata.
-
- - -
CHIAMATA DI DISPOSIZIONE :       minimizzi
- Estremità-de-denomini La Selezione Di Disposizione -
- SMETTA DI DENOMINARE
- RISISTEMAZIONE | - PRESENTI -



  -
-
- - - -
Selezioni una data di chiamata ripetuta :
- - - Selezioni una data qui sotto   -     - Hour: -   - Minutes: -   - -  
- - Osservazioni dei CB:

- - PRESENTI

- - -

  -
-
- - -
SELEZIONE DI GRUPPO INBOUND PIÙ VICINA
- Selezione Di Gruppo Inbound Più vicina -
- CHIAMATA MESCOLATA(outbound attivato)
- RISISTEMAZIONE | - PRESENTI -



  -
-
- - - - - - - - - - - -
TRASFERIMENTO IN TENSIONE DI CHIAMATA
Manica da trasferire: Manica
Estensioni:
Menu Di Estensioni
-
- Trasmetta all'estensione selezionata

- Trasmetta alla scatola selezionata del vmail

- _ trasmett questo numero:


- RINFRESCHI


- Di nuovo alla finestra principale

-
Congressi:
(scatti sopra un numero qui sotto per trasmettere ad un congresso)
Trasmetta la mia scanalatura anche
Menu Di Congressi
-
- - - - -
VICIMANOPOLA SCRIPT
-
- - - - - - - - - - - - - - - - - -
CONDIZIONE:
-
-Numero Seguente Della Manopola
- PREVISIONE DEL CAVO
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " ALT DEL TELEFONO
";} - - -?> -LIMA DI REGISTRAZIONE:
-
-
-IDENTIFICAZIONE ANNOTAZIONE:
-
- -Inizi A registrare
-
-Forma Di Fotoricettore
-
-Chiamata Del Parco
-Trasferimento - Congresso
-
-Cliente Di Hangup
-
-Trasmetta DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
secondi:   Manica:   Tempo Di Cust:
Le Informazioni Del Cliente:
Titolo:   In primo luogo:   Mi:  Ultimo:
Indirizzo1:
Indirizzo2:   Indirizzo3:
Città:   Dichiari:   PostCode:
Provincia:   Identificazione Del Fornitore:
Telefono:   DialCode:   Alt. Telefono:
Esposizione:   Email:
Osservazioni:
- -
-


  - -
- - - - -
Versione del fotoricettore-cliente di VICIMANOPOLA:     CONFIGURAZIONE:               Assistente:              
-Mostri le informazioni della scanalatura di chiamata di congresso
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -CHIAVI CALDE INATTIVE - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/voicemail_check.php deleted file mode 100644 index 1f1b0989..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_it/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Non valido Utentename/Parola d'accesso: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Non valido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Controllo Di Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "scatola del voicemail $vmail_box è non valido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/active_list_refresh.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/active_list_refresh.php deleted file mode 100644 index 10e474ad..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/active_list_refresh.php +++ /dev/null @@ -1,446 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='table') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Da Lista: "; -if ($ADD==1) {echo "Extensões Vivas";} -if ($ADD==2) {echo "Extensões Ocupadas";} -if ($ADD==3) {echo "Linhas Exteriores";} -if ($ADD==4) {echo "Extensões Locais";} -if ($ADD==5) {echo "Conferências";} -if ($ADD==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ADD=1 display all live extensions on a server -###################### -if ($ADD==1) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'extension';} - if ($format=='table') {echo "\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - -###################### -# ADD=2 display all busy extensions on a server -###################### -if ($ADD==2) -{ - if (!$field_name) {$field_name = 'busyext';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=3 display all busy outside lines(trunks) on a server -###################### -if ($ADD==3) -{ - if (!$field_name) {$field_name = 'trunk';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=4 display all busy Local lines on a server -###################### -if ($ADD==4) -{ - if (!$field_name) {$field_name = 'local';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - -###################### -# ADD=5 display all agc-usable conferences on a server -###################### -if ($ADD==5) -{ - $pt='pt'; - if (!$field_name) {$field_name = 'conferences';} - if ($format=='table') {echo "
\n";} - if ($format=='menu') {echo "\n"; - } - if ($format=='textarea') - { - echo "\n";} -} - - - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='table') {echo "\n";} -if ($format=='table') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/astguiclient.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/astguiclient.php deleted file mode 100644 index 03f06226..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/astguiclient.php +++ /dev/null @@ -1,2874 +0,0 @@ - 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -$version = '1.1.9'; -$build = '60112-1622'; - -if ($force_logout) -{ - if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - } - echo "Você tem registrado agora para fora. Obrigado\n"; - exit; -} - -$StarTtime = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$FILE_TIME = date("Ymd-His"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - -$US='_'; -$CL=':'; -$fp = fopen ("./astguiclient_auth_entries.txt", "a"); -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = $agcPAGE; -$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) - { - header ("Content-type: text/html; charset=utf-8"); - - echo "web client astGUIclient: Início de uma sessão\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão
 
Início de uma sessão Do Usuário:
Senha Do Usuário:
Início de uma sessão Do Telefone:
Senha Do Telefone:

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - - if($auth>0) - { - $office_no=strtoupper($user); - $password=strtoupper($pass); - $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - fwrite ($fp, "VICISELETOR|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - } - else - { - fwrite ($fp, "VICISELETOR|FAIL|$date|$user|$pass|$ip|$browser|\n"); - fclose($fp); - } - } - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "web client astGUIclient: Início de uma sessão Do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Início de uma sessão Do Telefone
 
Início de uma sessão Do Telefone:
Senha Do Telefone:

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "web client astGUIclient: Início de uma sessão Do Telefone\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão Do Telefone
 
Pesaroso, seus início de uma sessão do telefone e senha não seja:
 
Início de uma sessão Do Telefone:
Senha Do Telefone:

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "web client astGUIclient\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $phone_login=$row[6]; - $phone_pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CaLLerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - $outbound_cid=$row[65]; - - $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtime$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_present=$row[0]; - if ($favorites_present > 0) - { - $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favorites_list=$row[0]; - $h=0; - $favorites_listX = eregi_replace("'",'',$favorites_list); - $favorites = explode(',',$favorites_listX); - $favorites_count = count($favorites); - $favorites_listX=''; - - $o=0; - while ($favorites_count > $o) - { - $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; - $rsltx=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rsltx); - $favorites_names[$o] = $rowx[0]; - $favorites_listX .= "$rowx[1]/$favorites[$o],"; - $o++; - } - - echo "\n"; - echo "\n"; - } - else - { - echo "\n"; - } - -### gather phone extensions and fullnames for favorites editor ### - $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $exten_ct = mysql_num_rows($rslt); - $favlistCT=0; - $nofavlistCT=0; - while ($favlistCT < $exten_ct) - { - $row=mysql_fetch_row($rslt); - $favlist[$favlistCT]= "$row[0] - $row[1]"; - $favlistCT++; - } - - } -} - - -?> - - - - - - -\n"; - - -?> - -
- - - - - - - - - -
- - -LOGOUT
\n"; ?> -
Painel PrincipalLinhas Ativas PainelPainel Das ConferênciasVerifique VoicemailVive A Chamada
-
- - -

Logout
-
- - -
TRUNK HANGUP

- Active Trunks Menu
- Tronco Do Hangup   |   - Tronco Do Hijack   |   - Escuta O Tronco   |   - Refresque   |   - Para trás à janela principal -
-
- - -
HANGUP LOCAL

- Menu Local Ativo
- Local Do Hangup   |   - Local Do Hijack   |   - Escuta O Local   |   - Refresque   |   - Para trás à janela principal -
-
- - - - - - - -
TRANSFERÊNCIA VIVA DA CHAMADA
Canaleta a ser transferida: Canaleta
Extensões:
Menu Das Extensões
-
- Emita à extensão selecionada

- Emita à caixa selecionada do vmail

- Emita a este número:


- Refresque


- Para trás à janela principal

-
Conferências:
(estale sobre um número abaixo para emitir a uma conferência)
Emita minha canaleta demasiado
Menu Das Conferências
-
- - - - - -
Seletor LOCAL Das Extensões
Telefone que chama-se de: Canaleta
Extensões:
Menu Das Extensões
-
- Extensão selecionada chamada

- Caixa selecionada chamada do vmail

- Refresque


- Para trás à janela principal

-
-
- - -
CHAMADAS ESTACIONADAS:
- Para trás à janela principal

-
-
- - - - - - - - - - - - - - - -
  -
VOICEMAIL     NOVO:     VELHO:             SELETOR MANUAL       SELETOR
CHAMADAS ESTACIONADAS: 0                EXTENSÕES LOCAIS DO SELETOR
CHAMADAS OUTBOUND :
CHAMADAS INBOUND:
VERSÃO astGUIclient do correia-cliente: CONFIGURAÇÃO:
- - - - $h) - { - if (strlen($favorites[$h])>1) - { - echo "\n"; - } - $h++; - } -?> - -
FAVORITOS       edite
$favorites[$h] - $favorites_names[$h]
 
-
- - - - - - - -
FAVORITOS

 
SUBMETA FAVORITOS CHANGES - requires logout
PARA TRÁS À JANELA PRINCIPAL - ignore as mudanças feitas
-
- -
- - - - - - - - - - - - - -
-PAUSA | COMEÇO     Refresque a taxa: 1000 ms Mais rapidamente | Mais lento

-
Inicializar..
-
Extensões Ativas
-REFRESQUE | -ORDEM | -
Linhas Exteriores
-REFRESQUE | -ORDEM | -
Extensões Locais
-REFRESQUE | -ORDEM | -
- Os Dados Vão Aqui

-
- Os Dados Vão Aqui

Ação Do Tronco -
- Os Dados Vão Aqui

Ação Local -
-
- - - - -
- - -Lista Das Conferências - - - -
-Estale sobre um número de quarto da conferência na esquerda para o -
- - - - - - - - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/call_log_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/call_log_display.php deleted file mode 100644 index 2a9a0758..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/call_log_display.php +++ /dev/null @@ -1,181 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Do Registro Da Chamada"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - ##### print outbound calls from the call_log table - $stmt="SELECT uniqueid,start_time,number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} - echo "$out_calls_count|"; - $loop_count=0; - while ($out_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[3] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - - echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; - } - echo "\n"; - - ##### print inbound calls from the live_inbound_log table - $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} - echo "$in_calls_count|"; - $loop_count=0; - while ($in_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - - $call_time_M = ($row[4] / 60); - $call_time_M = round($call_time_M, 2); - $call_time_M_int = intval("$call_time_M"); - $call_time_SEC = ($call_time_M - $call_time_M_int); - $call_time_SEC = ($call_time_SEC * 60); - $call_time_SEC = round($call_time_SEC, 0); - if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} - $call_time_MS = "$call_time_M_int:$call_time_SEC"; - $callerIDnum = $row[3]; $callerIDname = $row[3]; - $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); - $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); - - echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; - } - echo "\n"; - - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/conf_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/conf_exten_check.php deleted file mode 100644 index c02f22b7..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/conf_exten_check.php +++ /dev/null @@ -1,213 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação Da Extensão De Conf"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - if ($ACTION == 'refresh') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($conf_exten)<1) - { - $channel_live=0; - echo "Conf Exten $conf_exten é inválido\n"; - exit; - } - else - { - - if ($client == 'vdc') - { - if ($auto_dial_level > 0) - { - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . "|\n"; - - } - $total_conf=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$sip_list = mysql_num_rows($rslt);} - # echo "$sip_list|"; - $loop_count=0; - while ($sip_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - # echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; $total_conf++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$total_conf] = "$row[0]"; - if ($format=='debug') {echo "\n";} - } - } - $channels_list = ($channels_list + $sip_list); - echo "$channels_list|"; - - $counter=0; - $countecho=''; - while($total_conf > $counter) - { - $counter++; - $countecho = "$countecho$CanaletaA[$counter] ~"; - # echo "$CanaletaA[$counter] ~"; - } - - echo "$countecho\n"; - } - - if ($ACTION == 'register') - { - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) - { - $channel_live=0; - echo "Conf Exten $conf_exten é inválido or Exten $exten é inválido\n"; - exit; - } - else - { - $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - echo "Conferência $conf_exten foi registado a $exten\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/dbconnect.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/dbconnect.php deleted file mode 100644 index 1662f18f..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/dbconnect.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/inbound_popup.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/inbound_popup.php deleted file mode 100644 index c85eb868..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/inbound_popup.php +++ /dev/null @@ -1,335 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -$forever_stop=0; -$user_abb = "$user$user$user$user"; -while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - -echo "\n"; -echo "\n"; -echo "\n"; -?> - - -CHAMADA INBOUND VIVA"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "

CHAMADA INBOUND VIVA

\n"; -echo "$NOW_TIME

\n"; -} - - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if (strlen($uniqueid)<9) - { - $channel_live=0; - echo "Uniqueid $uniqueid é inválido\n"; - exit; - } - else - { - $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $channels_list = mysql_num_rows($rslt); - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); -# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; -# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| - if ($format=='debug') {echo "\n";} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Canaleta: $row[1]
CallerID: $row[3]
\n"; - - $phone = eregi_replace(".*\<","",$row[3]); - $phone = eregi_replace("\>.*","",$phone); - $NPA = substr($phone, 0, 3); - $NXX = substr($phone, 3, 3); - $XXXX = substr($phone, 6, 4); - $D='-'; - echo "GOOGLE - \n"; - echo "ANYWHO - \n"; - echo "SWITCHBOARD - \n"; - echo "VERIZON - \n"; - echo "WHITEPAGES - \n"; - echo "411.COM - \n"; - echo "411.COM - \n"; - - $local_web_callerID_QUERY_STRING =''; - $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; - $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; - $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; - $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; - $local_web_callerID_QUERY_STRING.="&callerID_Canaleta=$row[1]"; - $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; - $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; - $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; - $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; - $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; - $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; - echo "COSTUME - \n"; - - echo "
O Número Marcou: $row[8]
Notas: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "HANGUP - \n"; - echo "EMITA A MEU VOICEMAIL\n"; - echo "
\n"; - - - $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - - } - - - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/live_exten_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/live_exten_check.php deleted file mode 100644 index f839e3cf..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/live_exten_check.php +++ /dev/null @@ -1,263 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação Viva Da Extensão"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -echo "DateTime: $NOW_TIME|"; -echo "UnixTime: $StarTtime|"; - -$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -echo "$row[0]|"; - - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$channels_list = mysql_num_rows($rslt);} - echo "$channels_list|"; - $loop_count=0; - while ($channels_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - $CanaletaA[$loop_count] = "$row[0]"; - $CanaletaB[$loop_count] = "$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - $counter=0; - while($loop_count > $counter) - { - $counter++; - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$CanaletaA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$CanaletaA[$counter]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$CanaletaB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$CanaletaB[$counter]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$trunk_count = mysql_num_rows($rslt);} - if ($trunk_count>0) - { - $row=mysql_fetch_row($rslt); - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $row[0]|"; - } - else - { - echo "Conversation: $counter ~"; - echo "CanaletaA: $CanaletaA[$counter] ~"; - echo "CanaletaB: $CanaletaB[$counter] ~"; - echo "CanaletaBtrunk: $CanaletaA[$counter]|"; - } - } - } - } - } - -echo "\n"; - -### check for live_inbound entry -$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; - if ($format=='debug') {echo "\n";} -$rslt=mysql_query($stmt, $link); -if ($rslt) {$channels_list = mysql_num_rows($rslt);} - if ($channels_list>0) - { - $row=mysql_fetch_row($rslt); - $LIuniqueid = "$row[0]"; - $LIchannel = "$row[1]"; - $LIcallerid = "$row[3]"; - $LIdatetime = "$row[6]"; - echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; - if ($format=='debug') {echo "\n";} - } - -echo "\n"; - - -### if favorites are present do a lookup to see if any are active -if ($favorites_count > 0) - { - $favorites = explode(',',$favorites_list); - $h=0; - $favs_print=''; - while ($favorites_count > $h) - { - $fav_extension = explode('/',$favorites[$h]); - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $favs_print .= "$fav_extension[1]: $row[0] ~"; - $h++; - } - echo "$favs_print\n"; - } - -if ($format=='debug') {echo "\n";} - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/manager_send.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/manager_send.php deleted file mode 100644 index 55983aff..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/manager_send.php +++ /dev/null @@ -1,882 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial') -### - $queryCID - ('CN012345678901234567',...) -### - $format - ('text','debug') -### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $exten - ('1234','913125551212',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $filename - ('20050406-125623_44444',...) -### - $extenName - ('phone100',...) -### - $parkedby - ('phone100',...) -### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) -### - $auto_dial_level - ('0','1','1.1',...) -### - $campaign - ('CLOSER','TESTCAMP',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('1234',...) -### - $seconds - ('32',...) -### - $outbound_cid - ('3125551212','0000000000',...) -### - $agent_log_id - ('123456',...) -### - $call_server_ip - ('10.10.10.15',...) -### - $CalLCID - ('VD01234567890123456',...) -### - -# changes -# 50401-1002 First build of script, Hangup function only -# 50404-1045 Redirect basic function enabled -# 50406-1522 Monitor basic function enabled -# 50407-1647 Monitor and StopMonitor full functions enabled -# 50422-1120 basic Originate function enabled -# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail -# 50502-1539 basic RedirectName and RedirectNameVmail added -# 50503-1227 added session_name checking for extra security -# 50523-1341 added Conference call start/stop recording -# 50523-1421 added OriginateName and OriginateNameVmail for local calls -# 50524-1602 added RedirectToPark and RedirectFromPark -# 50531-1203 added RedirecXtra for dual channel redirection -# 50630-1100 script changed to not use HTTP login vars, user/pass instead -# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging -# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function -# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf -# 50913-1057 Added outbound_cid set if present to originate call -# 51020-1556 Added agent_log_id framework for detailed agent activity logging -# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode -# 51129-1014 Added ability to accept calls from other VICIDIAL servers -# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD -# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function -# - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### These are variable assignments for PHP globals off -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];} -$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];} -$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];} -$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];} -$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];} -$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];} - -# default optional vars if not set -if (!$ACTION) {$ACTION="Originate";} -if (!$format) {$format="alert";} -if (!$ext_priority) {$ext_priority="1";} - - -$version = '0.0.22'; -$build = '60310-2022'; -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -if (!$query_date) {$query_date = $NOW_DATE;} - - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "O Gerente Emite: "; -if ($ACTION=="Originate") {echo "Originate";} -if ($ACTION=="Redirect") {echo "Redirect";} -if ($ACTION=="RedirectName") {echo "RedirectName";} -if ($ACTION=="Hangup") {echo "Hangup";} -if ($ACTION=="Command") {echo "Command";} -if ($ACTION==99999) {echo "AJUDA";} -echo "\n"; -echo "\n"; -echo "\n"; -} - - - - - -###################### -# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls -###################### -if ($ACTION=="SysCIDOriginate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) - { - echo "Exten $exten é inválido or queryCID $queryCID é inválido, Originate comando não introduzido\n"; - } - else - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando emitido para Exten $exten Canaleta $channel em $server_ip\n"; - } -} - - - -###################### -# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement -###################### -if ($ACTION=="OriginateName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nOriginateName Action não emitido\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="OriginateNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nOriginateNameVmail Action não emitido\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Originate"; - } - } -} - -if ($ACTION=="Originate") -{ - if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) - { - echo "Exten $exten é inválido or queryCID $queryCID é inválido, Originate comando não introduzido\n"; - } - else - { - if (strlen($outbound_cid)>1) - {$outCID = "\"$queryCID\" <$outbound_cid>";} - else - {$outCID = "$queryCID";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Originate comando emitido para Exten $exten Canaleta $channel em $server_ip\n"; - } -} - - - -###################### -# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up -###################### -if ($ACTION=="HangupConfDial") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "conference $exten é inválido or ext_context $ext_context or queryCID $queryCID é inválido, Hangup comando não introduzido\n"; - } - else - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; - - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row > 0) - { - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $channel=$rowx[0]; - $ACTION="Hangup"; - $queryCID = eregi_replace("^.","G",$queryCID); - } - } -} - - - -###################### -# ACTION=Hangup - insert Hangup Manager statement -###################### -if ($ACTION=="Hangup") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or queryCID $queryCID é inválido, Hangup comando não introduzido\n"; - } - else - { - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - -# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $row=mysql_fetch_row($rslt); -# if ($row[0]==0) -# { -# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; -# if ($format=='debug') {echo "\n";} -# $rslt=mysql_query($stmt, $link); -# $rowx=mysql_fetch_row($rslt); -# if ($rowx[0]==0) -# { -# $channel_live=0; -# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; -# } -# } - if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) - { - $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - echo "Call $CalLCID $channel não está vivo em $call_server_ip, Checking Live Canaleta...\n"; - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $call_server_ip, Hangup comando não introduzido $rowx[0]\n$stmt\n"; - } - else - { - echo "$stmt\n"; - } - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - echo "Hangup comando emitido para Canaleta $channel em $call_server_ip\n"; - } - } -} - - - -###################### -# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD -# - insert Redirect Manager statement using extensions name -###################### -if ($ACTION=="RedirectVD") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "auto_dial_level $auto_dial_level deve ser ajustado\n"; - echo "campaign $campaign deve ser ajustado\n"; - echo "uniqueid $uniqueid deve ser ajustado\n"; - echo "lead_id $lead_id deve ser ajustado\n"; - echo "\nRedirectVD Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level < 1) - { - $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectToPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "parkedby $parkedby deve ser ajustado\n"; - echo "\nRedirectToPark Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectFromPark") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectFromPark Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $ACTION="Redirect"; - } -} - -if ($ACTION=="RedirectName") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectName Action não emitido\n"; - } - else - { - $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = $row[0]; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectNameVmail") -{ - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "extenName $extenName deve ser ajustado\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirectNameVmail Action não emitido\n"; - } - else - { - $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $name_count = mysql_num_rows($rslt); - if ($name_count>0) - { - $row=mysql_fetch_row($rslt); - $exten = "$exten$row[0]"; - $ACTION="Redirect"; - } - } -} - -if ($ACTION=="RedirectXtra") -{ - if ($channel=="$extrachannel") - {$ACTION="Redirect";} - else - { - $row=''; $rowx=''; - $channel_liveX=1; - $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) - { - $channel_liveX=0; - $channel_liveY=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "ExtraCanaleta $extrachannel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirect Action não emitido\n"; - } - else - { - if ($exten == "NEXTAVAILABLE") - { - $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if (strlen($row[0]) > 3) - { - $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $exten = $row[0]; - } - else - { - $channel_liveX=0; - echo "Não pode encontrar a conferência vazia em $server_ip, Redirect comando não introduzido\n"; - } - } - - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - - $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveX=0; - echo "Canaleta $channel não está vivo em $call_server_ip, Redirect comando não introduzido\n"; - } - } - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_liveY=0; - echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; - } - } - if ( ($channel_liveX==1) && ($channel_liveY==1) ) - { - if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando emitido para Canaleta $channel and \nExtraCanaleta $extrachannel\n to $exten em $server_ip\n"; - } - else - { - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "RedirectXtra comando emitido para Canaleta $channel em $call_server_ip and \nExtraCanaleta $extrachannel\n to $exten em $server_ip\n"; - } - } - else - { - if ($channel_liveX==1) - {$ACTION="Redirect"; $server_ip = $call_server_ip;} - if ($channel_liveY==1) - {$ACTION="Redirect"; $channel=$extrachannel;} - - } - } - } -} - - -if ($ACTION=="Redirect") -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) - { - $channel_live=0; - echo "Uma destas variáveis é inválido:\n"; - echo "Canaleta $channel deve ser mais grande de 2 caráteres\n"; - echo "queryCID $queryCID deve ser mais grande de 14 caráteres\n"; - echo "exten $exten deve ser ajustado\n"; - echo "ext_context $ext_context deve ser ajustado\n"; - echo "ext_priority $ext_priority deve ser ajustado\n"; - echo "\nRedirect Action não emitido\n"; - } - else - { - if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "Redirect comando emitido para Canaleta $channel em $server_ip\n"; - } - } -} - - - -###################### -# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel -###################### -if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) -{ - if ($ACTION=="StopMonitor") - {$SQLfile = "";} - else - {$SQLfile = "File: $filename";} - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or queryCID $queryCID é inválido or filename: $filename é inválido, $ACTION comando não introduzido\n"; - } - else - { - $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0]==0) - { - $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - if ($rowx[0]==0) - { - $channel_live=0; - echo "Canaleta $channel não está vivo em $server_ip, $ACTION comando não introduzido\n"; - } - } - if ($channel_live==1) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($ACTION=="Monitor") - { - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - } - echo "$ACTION comando emitido para Canaleta $channel em $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; - } - } -} - - - - - - -###################### -# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference -###################### -if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) - { - $channel_live=0; - echo "Canaleta $channel é inválido or exten $exten é inválido or filename: $filename é inválido, $ACTION comando não introduzido\n"; - } - else - { - - if ($ACTION=="MonitorConf") - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename')"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - } - else - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $rec_count = mysql_num_rows($rslt); - if ($rec_count>0) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - # find and hang up all recordings going em in this conference # and extension = '$exten' - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - # $rec_count = intval(mysql_num_rows($rslt) / 2); - $rec_count = mysql_num_rows($rslt); - $h=0; - while ($rec_count>$h) - { - $rowx=mysql_fetch_row($rslt); - $HUchannel[$h] = $rowx[0]; - $h++; - } - $i=0; - while ($h>$i) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $i++; - } - - } - echo "$ACTION comando emitido para Canaleta $channel em $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n A GRAVAÇÃO DURARÁ ATÉ 60 MINUTOS\n"; - } -} - - - - - - - - - - - - -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -if ($format=='debug') {echo "\n";} -if ($format=='debug') {echo "\n\n\n";} - -exit; - -?> - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/park_calls_display.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/park_calls_display.php deleted file mode 100644 index ab87a35d..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/park_calls_display.php +++ /dev/null @@ -1,136 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Exposição Estacionada Das Chamadas"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($exten)<1) or (strlen($protocol)<3) ) - { - $channel_live=0; - echo "Exten $exten é inválido ou protocolo $protocol é inválido\n"; - exit; - } - else - { - ##### print parked calls from the parked_channels table - $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $park_calls_count = mysql_num_rows($rslt); - echo "$park_calls_count\n"; - $loop_count=0; - while ($park_calls_count>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; - } - echo "\n"; - } - - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vdc_db_query.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vdc_db_query.php deleted file mode 100644 index 3147dc73..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vdc_db_query.php +++ /dev/null @@ -1,1289 +0,0 @@ - LICENSE: GPLv2 -### -### This script is designed purely to send whether the meetme conference has live channels connected and which they are -### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table -### -### required variables: -### - $server_ip -### - $session_name -### - $user -### - $pass -### optional variables: -### - $format - ('text','debug') -### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs') -### - $stage - ('start','finish') -### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') -### - $conf_exten - ('8600011',...) -### - $exten - ('123test',...) -### - $ext_context - ('default','demo',...) -### - $ext_priority - ('1','2',...) -### - $campaign - ('testcamp',...) -### - $dial_timeout - ('60','26',...) -### - $dial_prefix - ('9','8',...) -### - $campaign_cid - ('3125551212','0000000000',...) -### - $MDnextCID - ('M06301413000000002',...) -### - $uniqueid - ('1120232758.2406800',...) -### - $lead_id - ('36524',...) -### - $list_id - ('101','123456',...) -### - $length_in_sec - ('12',...) -### - $phone_code - ('1',...) -### - $phone_number - ('3125551212',...) -### - $channel - ('Zap/12-1',...) -### - $start_epoch - ('1120236911',...) -### - $vendor_lead_code - ('1234test',...) -### - $title - ('Mr.',...) -### - $first_name - ('Bob',...) -### - $middle_initial - ('L',...) -### - $last_name - ('Wilson',...) -### - $address1 - ('1324 Main St.',...) -### - $address2 - ('Apt. 12',...) -### - $address3 - ('co Robert Wilson',...) -### - $city - ('Chicago',...) -### - $state - ('IL',...) -### - $province - ('NA',...) -### - $postal_code - ('60054',...) -### - $country_code - ('USA',...) -### - $gender - ('M',...) -### - $date_of_birth - ('1970-01-01',...) -### - $alt_phone - ('3125551213',...) -### - $email - ('bob@bob.com',...) -### - $security_phrase - ('Hello',...) -### - $comments - ('Good Customer',...) -### - $auto_dial_level - ('0','1','1.2',...) -### - $VDstop_rec_after_each_call - ('0','1') -### - $conf_silent_prefix - ('7','8','',...) -### - $extension - ('123','user123','25-1',...) -### - $protocol - ('Zap','SIP','IAX2',...) -### - $user_abb - ('1234','6666',...) -### - $preview - ('YES','NO',...) -### - $called_count - ('0','1','2',...) -### - $agent_log_id - ('123456',...) -### - $agent_log - ('NO',...) -### - $favorites_list - (",'cc160','cc100'",...) -### - -# changes -# 50629-1044 First build of script -# 50630-1422 Added manual dial action and MD channel lookup -# 50701-1451 Added dial log for start and end of vicidial calls -# 50705-1239 Added call disposition update -# 50804-1627 Fixed updateDispo to update vicidial_log entry -# 50816-1605 Added VDADpause/ready for auto dialing -# 50816-1811 Added basic autodial call pickup functions -# 50817-1005 Altered logging functions to accomodate auto_dialing -# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option -# 50818-1411 Added hangup of agent phone after Logout -# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug -# 50902-1507 Fixed CLOSER log length_in_sec bug -# 50902-1730 Added functions for manual preview dialing and revert -# 50913-1214 Added agent random update to leadupdate -# 51020-1421 Added agent_log_id framework for detailed agent activity logging -# 51021-1717 Allows for multi-line comments (changes \n to !N in database) -# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial -# 51121-1445 Altered echo statements for several small PHP speed optimizations -# 51122-1328 Fixed UserLogout issue not removing conference reservation -# 51129-1012 Added ability to accept calls from other VICIDIAL servers -# 51129-1729 Changed manual dial to use the '/n' flag for calls -# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display -# 60105-1059 Added Updating of astguiclient favorites in the DB -# 60208-1617 Added dtmf buttons output per call -# 60213-1521 Added closer_campaigns update to vicidial_users -# 60215-1036 Added Callback date-time entry into vicidial_callbacks table -# - -$version = '0.0.26'; -$build = '60215-1036'; - - -require("dbconnect.php"); - -#require_once("htglobalize.php"); - -### If you have globals turned off uncomment these lines -$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];} -$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];} -$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];} -$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];} -$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];} -$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];} -$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];} -$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];} -$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];} -$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];} -$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];} -$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];} -$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];} -$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];} -$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];} -$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];} -$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];} -$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];} -$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} -$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];} -$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];} -$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];} -$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];} -$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];} -$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];} -$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];} -$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];} -$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];} -$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];} -$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];} -$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];} -$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];} -$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];} -$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];} -$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];} -$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];} -$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];} -$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];} -$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];} -$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];} -$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];} -$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];} -$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];} -$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];} -$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];} -$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];} -$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} -$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} -$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];} -$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];} -$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];} -$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];} -$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];} -$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];} -$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];} -$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];} -$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} -$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];} - - -# default optional vars if not set -if (!$format) {$format="text";} -if ($format == 'debug') {$DB=1;} -if (!$ACTION) {$ACTION="refresh";} - -$StarTtime = date("U"); -$NOW_DATE = date("Y-m-d"); -$NOW_TIME = date("Y-m-d H:i:s"); -$CIDdate = date("mdHis"); -if (!$query_date) {$query_date = $NOW_DATE;} -$MT[0]=''; - -$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$auth=$row[0]; - -if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) -{ -echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; -exit; -} -else -{ - -if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } -else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } -} - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Certificado Da Pergunta Da Base de dados"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - -################################################################################ -### regCLOSER - update the vicidial_live_agents table to reflect the closer -### inbound choices made upon login -################################################################################ -if ($ACTION == 'regCLOSER') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) - { - $channel_live=0; - echo "Escolha Do Grupo $closer_choice é inválido\n"; - exit; - } - else - { - if ($closer_choice == "MGRLOCK") - { - $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $closer_choice =$row[0]; - - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Closer In Escolha Do Grupo $closer_choice foi registado a user $user\n"; -} - - -################################################################################ -### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead -### in the campaign, reserve it, send data back to client and -### place the call by inserting into vicidial_manager -################################################################################ -if ($ACTION == 'manDiaLnextCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "FUNIL VAZIO\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - ##### grab the lead_id of the reserved user in vicidial_hopper - $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $hopper_leadID_ct = mysql_num_rows($rslt); - if ($hopper_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - } - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - $called_count++; - - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### delete the lead from the hopper - $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - ### if preview dialing, do not send the call - if ( (strlen($preview)<1) || ($preview == 'NO') ) - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $MqueryCID . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - } - else - { - echo "FUNIL VAZIO\n"; - } - } -} - - -################################################################################ -### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was -### previewed in the step above and puts it back in orig status -################################################################################ -if ($ACTION == 'manDiaLskip') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "LEAD NOT REVERTED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - $called_count = ($called_count - 1); - ### flag the lead as called and change it's status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - - echo "LEAD REVERTED\n"; - } -} - - -################################################################################ -### manDiaLonly - for manual VICIDiaL dialing this sends the call that was -### previewed in the step above -################################################################################ -if ($ACTION == 'manDiaLonly') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - $channel_live=0; - echo "CHAMADA NOT PLACED\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context é inválido\n"; - exit; - } - else - { - ### prepare variables to place manual call from VICIDiaL - $CCID_on=0; $CCID=''; - $local_DEF = 'Local/'; - $local_AMP = '@'; - $Local_out_prefix = '9'; - $Local_dial_timeout = '60'; - $Local_persist = '/n'; - if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} - $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} - if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} - if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} - - $PADlead_id = sprintf("%09s", $lead_id); - while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} - - # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL - $MqueryCID = "M$CIDdate$PADlead_id"; - if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} - else {$CIDstring = "$MqueryCID";} - - ### insert the call action into the vicidial_manager table to initiate the call - # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Local_out_prefix$phone_code$phone_number','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - echo "$MqueryCID\n"; - } -} - - -################################################################################ -### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up -### the trunk channel that the call was placed on -################################################################################ -if ($ACTION == 'manDiaLlookCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; -if (strlen($MDnextCID)<18) - { - echo "NO\n"; - echo "MDnextCID $MDnextCID é inválido\n"; - exit; - } -else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $uniqueid =$row[0]; - $channel =$row[1]; - echo "$uniqueid\n$channel"; - - $wait_sec=0; - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "NO\n"; - } - } -} - - - -################################################################################ -### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in -### vicidial_log and then sends process to call_log entry -################################################################################ -if ($ACTION == 'manDiaLlogCaLL') -{ - $MT[0]=''; - $row=''; $rowx=''; - -if ($stage == "start") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) - { - echo "REGISTRO NÃO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign é inválido\n"; - exit; - } - else - { - ##### insert log into vicidial_log for manual VICIDiaL call - $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "VICIDiaL_LOG Introduzido: $uniqueid|$channel|$NOW_TIME\n"; - echo "$StarTtime\n"; - } - else - { - echo "REGISTRO NÃO ENTRADO\n"; - } - - # ##### insert log into call_log for manual VICIDiaL call - # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; - # if ($DB) {echo "$stmt\n";} - # $rslt=mysql_query($stmt, $link); - # $affected_rows = mysql_affected_rows($link); - - # if ($affected_rows > 0) - # { - # echo "CHAMADA_LOG Introduzido: $uniqueid|$channel|$NOW_TIME"; - # } - # else - # { - # echo "REGISTRO NÃO ENTRADO\n"; - # } - } - } - -if ($stage == "end") - { - if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) - { - echo "REGISTRO NÃO ENTRADO\n"; - echo "uniqueid $uniqueid or lead_id: $lead_id é inválido\n"; - exit; - } - else - { - if ($start_epoch < 1000) - { - if (eregi("CLOSER",$campaign)) - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; - } - else - { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; - } - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VM_mancall_ct = mysql_num_rows($rslt); - if ($VM_mancall_ct > 0) - { - $row=mysql_fetch_row($rslt); - $start_epoch =$row[0]; - $length_in_sec = ($StarTtime - $start_epoch); - } - else - { - $length_in_sec = 0; - } - } - else {$length_in_sec = ($StarTtime - $start_epoch);} - - if (eregi("CLOSER",$campaign)) - { - $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - if ($auto_dial_level > 0) - { - ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NÃO ENTRADO\n\n"; - } - } - - echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; - - ##### if VICIDiaL call and hangup_after_each_call activated, find all recording - ##### channels and hang them up while entering info into recording_log and - ##### returning filename/recordingID - if ($VDstop_rec_after_each_call == 1) - { - $local_DEF = 'Local/'; - $local_AMP = '@'; - $total_rec=0; - $loop_count=0; - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$rec_list = mysql_num_rows($rslt);} - while ($rec_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) - { - $rec_channels[$total_rec] = "$row[0]"; - $total_rec++; - } - if ($format=='debug') {echo "\n";} - $loop_count++; - } - - $total_recFN=0; - $loop_count=0; - $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" - $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$recFN_list = mysql_num_rows($rslt);} - while ($recFN_list>$loop_count) - { - $row=mysql_fetch_row($rslt); - $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); - if ($format=='debug') {echo "\n";} - $total_recFN++; - $loop_count++; - } - - $loop_count=0; - while($loop_count < $total_rec) - { - if (strlen($rec_channels[$loop_count])>5) - { - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|"; - if (strlen($filename)>2) - { - $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) {$fn_count = mysql_num_rows($rslt);} - if ($fn_count) - { - $row=mysql_fetch_row($rslt); - $recording_id = $row[0]; - $start_time = $row[1]; - - $length_in_sec = ($StarTtime - $start_time); - $length_in_min = ($length_in_sec / 60); - $length_in_min = sprintf("%8.2f", $length_in_min); - - $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - echo "$recording_id|$length_in_min|"; - } - else {echo "||";} - } - else {echo "||";} - echo "\n"; - } - $loop_count++; - } - } - - - $talk_sec=0; - $StarTtime = date("U"); - $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $talk_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } -} - - -################################################################################ -### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls -### in the vicidial_live_agents table in QUEUE status, then -### lookup the lead info and pass it back to vicidial.php -################################################################################ -if ($ACTION == 'VDADcheckINCOMING') -{ - $MT[0]=''; - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) - { - $channel_live=0; - echo "0\n"; - echo "Campanha $campaign é inválido\n"; - exit; - } - else - { - ### grab the call and lead info from the vicidial_live_agents table - $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $queue_leadID_ct = mysql_num_rows($rslt); - - if ($queue_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $lead_id =$row[0]; - $uniqueid =$row[1]; - $callerid =$row[2]; - $channel =$row[3]; - $call_server_ip =$row[4]; - if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} - echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; - - ### update the agent status to INCHAMADA in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ##### grab the data from vicidial_list for the lead_id - $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $list_lead_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - # $lead_id = trim("$row[0]"); - $dispo = trim("$row[3]"); - $tsr = trim("$row[4]"); - $vendor_id = trim("$row[5]"); - $list_id = trim("$row[7]"); - $gmt_offset_now = trim("$row[8]"); - $phone_code = trim("$row[10]"); - $phone_number = trim("$row[11]"); - $title = trim("$row[12]"); - $first_name = trim("$row[13]"); - $middle_initial = trim("$row[14]"); - $last_name = trim("$row[15]"); - $address1 = trim("$row[16]"); - $address2 = trim("$row[17]"); - $address3 = trim("$row[18]"); - $city = trim("$row[19]"); - $state = trim("$row[20]"); - $province = trim("$row[21]"); - $postal_code = trim("$row[22]"); - $country_code = trim("$row[23]"); - $gender = trim("$row[24]"); - $date_of_birth = trim("$row[25]"); - $alt_phone = trim("$row[26]"); - $email = trim("$row[27]"); - $security = trim("$row[28]"); - $comments = trim("$row[29]"); - $called_count = trim("$row[30]"); - } - - ### update the lead status to INCHAMADA - $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - ### update the log status to INCHAMADA - $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - if (eregi("CLOSER",$campaign)) - { - ### update the vicidial_closer_log user to INCHAMADA - $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - - $stmt = "select campaign_id from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDAC_cid_ct = mysql_num_rows($rslt); - if ($list_lead_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDADchannel_group =$row[0]; - } - - $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDL_cid_ct = mysql_num_rows($rslt); - if ($VDL_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_front_VDlog =$row[0]; - } - - $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_group_name = $row[1]; - $VDCL_group_color = $row[2]; - $VDCL_group_web = $row[4]; - $VDCL_fronter_display = $row[7]; - $VDCL_ingroup_script = $row[8]; - $VDCL_get_call_launch = $row[9]; - $VDCL_xferconf_a_dtmf = $row[10]; - $VDCL_xferconf_a_number = $row[11]; - $VDCL_xferconf_b_dtmf = $row[12]; - $VDCL_xferconf_b_number = $row[13]; - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_ingroup_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - } - - ### if web form is set then send em to vicidial.php for override of WEB_FORM address - if (strlen($VDCL_group_web)>5) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n";} - - $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDU_cid_ct = mysql_num_rows($rslt); - if ($VDU_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $fronter_full_name = $row[0]; - echo $fronter_full_name . '|' . $tsr . "\n"; - } - else {echo '|' . $tsr . "\n";} - } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - } - - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $LeaD_InfO = $callerid . "\n"; - $LeaD_InfO .= $lead_id . "\n"; - $LeaD_InfO .= $dispo . "\n"; - $LeaD_InfO .= $tsr . "\n"; - $LeaD_InfO .= $vendor_id . "\n"; - $LeaD_InfO .= $list_id . "\n"; - $LeaD_InfO .= $gmt_offset_now . "\n"; - $LeaD_InfO .= $phone_code . "\n"; - $LeaD_InfO .= $phone_number . "\n"; - $LeaD_InfO .= $title . "\n"; - $LeaD_InfO .= $first_name . "\n"; - $LeaD_InfO .= $middle_initial . "\n"; - $LeaD_InfO .= $last_name . "\n"; - $LeaD_InfO .= $address1 . "\n"; - $LeaD_InfO .= $address2 . "\n"; - $LeaD_InfO .= $address3 . "\n"; - $LeaD_InfO .= $city . "\n"; - $LeaD_InfO .= $state . "\n"; - $LeaD_InfO .= $province . "\n"; - $LeaD_InfO .= $postal_code . "\n"; - $LeaD_InfO .= $country_code . "\n"; - $LeaD_InfO .= $gender . "\n"; - $LeaD_InfO .= $date_of_birth . "\n"; - $LeaD_InfO .= $alt_phone . "\n"; - $LeaD_InfO .= $email . "\n"; - $LeaD_InfO .= $security . "\n"; - $LeaD_InfO .= $comments . "\n"; - $LeaD_InfO .= $called_count . "\n"; - - echo $LeaD_InfO; - - - - $wait_sec=0; - $StarTtime = date("U"); - $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - echo "0\n"; - # echo "No calls in QUEUE for $user em $server_ip\n"; - exit; - } - } -} - - -################################################################################ -### userLOGout - Logs the user out of VICIDiaL client, deleting db records and -### inserting into vicidial_user_log -################################################################################ -if ($ACTION == 'userLOGout') -{ - $MT[0]=''; - $row=''; $rowx=''; -if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) - { - echo "NO\n"; - echo "campaign $campaign or conf_exten $conf_exten é inválido\n"; - exit; - } -else - { - ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vul_insert = mysql_affected_rows($link); - - ##### Remove the reservation em the vicidial_conferences meetme room - $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vc_remove = mysql_affected_rows($link); - - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $vla_delete = mysql_affected_rows($link); - - ##### Delete the web_client_sessions - $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $wcs_delete = mysql_affected_rows($link); - - ##### Hangup the client phone - $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($rslt) - { - $row=mysql_fetch_row($rslt); - $agent_channel = "$row[0]"; - if ($format=='debug') {echo "\n";} - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH123459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; - } -} - - -################################################################################ -### updateDISPO - update the vicidial_list table to reflect the agent choice of -### call disposition for that leand -################################################################################ -if ($ACTION == 'updateDISPO') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) - { - echo "Dispo Choice $dispo or lead_id $lead_id é inválido\n"; - exit; - } - else - { - $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - - $dispo_sec=0; - $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $dispo_sec = (($StarTtime - $row[0]) + $row[1]); - } - $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - - ### CHAMADABACK ENTRY - if ( ($dispo_choice == 'CBHVELHO') and (strlen($CallBackDatETimE)>10) ) - { - $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - } - - echo 'Lead ' . $lead_id . ' foi mudado a ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; -} - -################################################################################ -### updateLEAD - update the vicidial_list table to reflect the values that are -### in the agents screen at time of call hangup -################################################################################ -if ($ACTION == 'updateLEAD') -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) - { - echo "phone_number $phone_number or lead_id $lead_id é inválido\n"; - exit; - } - else - { - $comments = eregi_replace("\r",'',$comments); - $comments = eregi_replace("\n",'!N',$comments); - - $stmt="UPDATE vicidial_list set vendor_lead_code='$vendor_lead_code', title='$title', first_name='$first_name', middle_initial='$middle_initial', last_name='$last_name', address1='$address1', address2='$address2', address3='$address3', city='$city', state='$state', province='$province', postal_code='$postal_code', country_code='$country_code', gender='$gender', date_of_birth='$date_of_birth', alt_phone='$alt_phone', email='$email', security_phrase='$security_phrase', comments='$comments' where lead_id='$lead_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - } - echo "Lead $lead_id a informação foi atualizada\n"; -} - - -################################################################################ -### VDADpause - update the vicidial_live_agents table to show that the agent is -### or ready now active and ready to take calls -################################################################################ -if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) -{ - $MT[0]=''; - $row=''; $rowx=''; - if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) - { - echo "stage $stage é inválido\n"; - exit; - } - else - { - $random = (rand(1000000, 9999999) + 10000000); - $stmt="UPDATE vicidial_live_agents set status='$stage',lead_id='',uniqueid=0,callerid='',channel='', random_id='$random' where user='$user' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - - if ($agent_log == 'NO') - {$donothing=1;} - else - { - $pause_sec=0; - $stmt = "select pause_epoch,pause_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) - { - $row=mysql_fetch_row($rslt); - $pause_sec = (($StarTtime - $row[0]) + $row[1]); - } - if ($ACTION == 'VDADready') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - if ($ACTION == 'VDADpause') - { - $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',pause_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - } - echo 'Agent ' . $user . ' está agora no status ' . $stage . "\n"; -} - - -################################################################################ -### UpdatEFavoritEs - update the astguiclient favorites list for this extension -################################################################################ -if ($ACTION == 'UpdatEFavoritEs') -{ - $row=''; $rowx=''; - $channel_live=1; - if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) - { - echo "favorites list $favorites_list é inválido\n"; - exit; - } - else - { - $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - if ($row[0] > 0) - { - $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - else - { - $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - } - } - echo "Favorites list has been updated to $favorites_list for $exten\n"; -} - - - - -if ($format=='debug') -{ -$ENDtime = date("U"); -$RUNtime = ($ENDtime - $StarTtime); -echo "\n"; -echo "\n\n\n"; -} - -exit; - -?> diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vicidial.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vicidial.php deleted file mode 100644 index 1aaab983..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/vicidial.php +++ /dev/null @@ -1,4633 +0,0 @@ - LICENSE: GPLv2 -### -### make sure you have added a user to the vicidial_users MySQL table with at least -### user_level 1 or greater to access this page. Also, you need to have the login -### and pass of a phone listed in the asterisk.phones table. The page grabs the -### server info and other details from this login and pass. -### -### This script works best with Firefox or Mozilla, but will run for a couple -### hours on Internet Explorer before the memory leaks cause a crash. -### -### Other scripts that this application depends on: -### - vdc_db_query.php: Updates information in the database -### - manager_send.php: Sends manager actions to the DB for execution -### -### CHANGES -### 50607-1426 - First Build of VICIDIAL web client basic login process finished -### 50628-1620 - Added some basic formatting and worked on process flow -### 50628-1715 - Startup variables mapped to javascript variables -### 50629-1303 - Added Login Closer in-groups selection box and vla update -### 50629-1530 - Rough layout for customer info form section and button links -### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed -### 50701-1450 - Added vicidial_log entries on dial and hangup -### 50701-1634 - Added Logout function -### 50705-1259 - Added call disposition functionality -### 50705-1432 - Added lead info DB update function -### 50705-1658 - Added web form functionality -### 50706-1043 - Added call park and pickup functions -### 50706-1234 - Added Start/Stop Recording functionality -### 50706-1614 - Added conference channels display option -### 50711-1333 - Removed call check redundancy and fixed a span bug -### 50727-1424 - Added customer channel and participant present sensing/alerts -### 50804-1057 - Added SendDTMF function and reconfigured the transfer span -### 50804-1224 - Added Local and Internal Closer transfer functions -### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs -### 50804-1808 - Added button images for left buttons -### 50815-1151 - Added 3Way calling functions to Transfer-conf frame -### 50815-1602 - Added images and buttons for xfer functions -### 50816-1813 - Added basic autodial outbound call pickup functions -### 50817-1113 - Fixes to auto_dialing call receipt -### 50817-1234 - Added inbound call receipt capability -### 50817-1541 - Added customer time display -### 50817-1541 - Added customer time display -### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option -### 50818-1703 - Added pretty login section -### 50825-1200 - Modified form field lengths, added double-click dispositions -### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER -### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug -### 50903-0904 - Added preview-lead code for manual dialing -### 50904-0016 - Added ability to hangup manual dials before pickup -### 50906-1319 - Added override for filters on xfer calls, fixed login display bug -### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode -### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use -### 50913-1212 - Added campaign_cid to 3rd party calls -### 50923-1546 - Modified to work with language translation -### 50926-1656 - Added campaign pull-down at login of active campaigns -### 50928-1633 - Added manual dial alternate number dial option -### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs -### 51004-1656 - Fixed recording filename bug and new Spanish translation -### 51020-1103 - Added campaign-specific recording control abilities -### 51020-1352 - Added Basic vicidial_agent_log framework -### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses -### 51021-1718 - Allows for multi-line comments (changes \n to !N in database) -### 51110-1432 - Fixed non-standard http port issue -### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial -### 51118-1305 - Activate multi-line comments from $multi_line_comments var -### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view -### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize -### 51129-1010 - Added ability to accept calls from other VICIDIAL servers -### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up -### 51208-1732 - Created user-first login that looks for default phone info -### 51219-1526 - Added variable framework for campaign and in-group scripts -### 51221-1200 - Added SCRIPT tab, layout and functionality -### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup -### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame -### 51229-1028 - Added checks on web_form_address to allow for var in the DB value -### 60117-1312 - Added Transfer-conf frame toggle on button press -### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame -### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys -### 60213-1210 - Added ability to sort routing of calls by user_level -### 60214-0932 - Initial Callback calendar display framework -### 60214-1407 - Added ability to minimize the dispo screen to see info below -### 60215-1104 - Added ANYONE scheduled callbacks functionality -### - -require("dbconnect.php"); - -$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];} -$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];} - if (!$phone_login) {$phone_login=$_GET["pl"];} -$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];} - if (!$phone_pass) {$phone_pass=$_GET["pp"];} -$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];} -$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];} -$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];} - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); -$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];} - -$forever_stop=0; - -$version = '1.1.66'; -$build = '60215-1104'; - -if ($force_logout) -{ - echo "Você tem registrado agora para fora. Obrigado\n"; - exit; -} - -$StarTtimE = date("U"); -$NOW_TIME = date("Y-m-d H:i:s"); -$tsNOW_TIME = date("YmdHis"); -$FILE_TIME = date("Ymd-His"); -$CIDdate = date("ymdHis"); - $month_old = mktime(0, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - -$random = (rand(1000000, 9999999) + 10000000); - -$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently -$manual_dial_preview = '1'; # Allow preview lead option when manual dial -$HKuser_level = '5'; # minimum vicidial user_level for HotKeys -$campaign_login_list = '1'; # show drop-down list of campaigns at login -$manual_dial_alt_phone = '1'; # allow manual dial users to call alt phone number -$multi_line_comments = '1'; # set to 1 to allow multi-line comment box -$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login -$view_scripts = '1'; # set to 1 to show the SCRIPTS tab -$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks - -$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen - -$US='_'; -$CL=':'; -$AT='@'; -$date = date("r"); -$ip = getenv("REMOTE_ADDR"); -$browser = getenv("HTTP_USER_AGENT"); -$script_name = getenv("SCRIPT_NAME"); -$server_name = getenv("SERVER_NAME"); -$server_port = getenv("SERVER_PORT"); -if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} - else {$HTTPprotocol = 'http://';} -if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} -else {$server_port = "$CL$server_port";} -$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; -$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); - -header ("Content-type: text/html; charset=utf-8"); -header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 -header ("Pragma: no-cache"); // HTTP/1.0 -echo "\n"; -echo "\n"; -echo "\n"; - -if ($campaign_login_list > 0) -{ -$camp_form_code = "\n"; -} -else -{ -$camp_form_code = "\n"; -} - - - -if ($relogin == 'YES') -{ -echo "Web client de VICISELETOR: Re-Início de uma sessão\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Re-Início de uma sessão
 
Início de uma sessão Do Telefone:
Senha Do Telefone:
Início de uma sessão Do Usuário:
Senha Do Usuário:
Campanha: $camp_form_code

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} - -if ($user_login_first == 1) -{ - if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) - { - echo "Web client de VICISELETOR: Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - #echo "\n"; - #echo "\n"; - echo "

Início de uma sessão Do Usuário

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão Da Campanha
 
Início de uma sessão Do Usuário:
Senha Do Usuário:
Campanha: $camp_form_code

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - else - { - if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) - { - $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $phone_login=$row[0]; - $phone_pass=$row[1]; - - echo "Web client de VICISELETOR: Início de uma sessão\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão
 
Início de uma sessão Do Telefone:
Senha Do Telefone:
Início de uma sessão Do Usuário:
Senha Do Usuário:
Campanha: $camp_form_code

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - - } - } -} - -if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) -{ -echo "Web client de VICISELETOR: Início de uma sessão Do Telefone\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; -echo "
\n"; -echo "\n"; -echo "


"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo "\n"; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Início de uma sessão Do Telefone
 
Início de uma sessão Do Telefone:
Senha Do Telefone:

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; -echo "\n\n"; -echo "\n\n"; -echo "\n\n"; -exit; -} -else -{ -$fp = fopen ("./vicidial_auth_entries.txt", "a"); -$VDloginDISPLAY=0; - - if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) - { - $VDloginDISPLAY=1; - } - else - { - $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if($auth>0) - { - $login=strtoupper($VD_login); - $password=strtoupper($VD_pass); - ##### grab the full name of the agent - $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGfullname=$row[0]; - $user_level=$row[1]; - $VU_hotkeys_active=$row[2]; - $VU_agent_choose_ingroups=$row[3]; - fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); - fclose($fp); - - $user_abb = "$VD_login$VD_login$VD_login$VD_login"; - while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) - {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} - - ##### check to see that the campaign is active - $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $CAMPactive=$row[0]; - if($CAMPactive>0) - { - if ($TEST_all_statuses > 0) {$selectableSQL = '';} - else {$selectableSQL = "selectable='Y' and";} - $VARstatuses=''; - $VARstatusnames=''; - ##### grab the statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $VD_statuses_ct) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - } - - ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $VD_statuses_camp = mysql_num_rows($rslt); - $j=0; - while ($j < $VD_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $statuses[$i] =$row[0]; - $status_names[$i] =$row[1]; - $VARstatuses = "$VARstatuses'$statuses[$i]',"; - $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; - $i++; - $j++; - } - $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); - $VARstatuses = substr("$VARstatuses", 0, -1); - $VARstatusnames = substr("$VARstatusnames", 0, -1); - - ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent - $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $HK_statuses_camp = mysql_num_rows($rslt); - $w=0; - $HKboxA=''; - $HKboxB=''; - $HKboxC=''; - while ($w < $HK_statuses_camp) - { - $row=mysql_fetch_row($rslt); - $HKhotkey[$w] =$row[0]; - $HKstatus[$w] =$row[1]; - $HKstatus_name[$w] =$row[2]; - $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; - $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; - $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; - if ($w < 3) - {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ( ($w >= 3) and ($w < 6) ) - {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - if ($w >= 6) - {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} - $w++; - } - $HKhotkeys = substr("$HKhotkeys", 0, -1); - $HKstatuses = substr("$HKstatuses", 0, -1); - $HKstatusnames = substr("$HKstatusnames", 0, -1); - - ##### grab the inbound groups to choose from if campaign contains CLOSER - $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) - { - $VARingroups=''; - $stmt="select group_id from vicidial_inbound_groups where active = 'Y' order by group_id limit 20;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $closer_ct = mysql_num_rows($rslt); - $INgrpCT=0; - while ($INgrpCT < $closer_ct) - { - $row=mysql_fetch_row($rslt); - $closer_groups[$INgrpCT] =$row[0]; - $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; - $INgrpCT++; - } - $VARingroups = substr("$VARingroups", 0, -1); - } - - ##### grab the statuses to be dialed for your campaign as well as other campaign settings - $stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $status_A = $row[0]; - $status_B = $row[1]; - $status_C = $row[2]; - $status_D = $row[3]; - $status_E = $row[4]; - $park_ext = $row[5]; - $park_file_name = $row[6]; - $web_form_address = $row[7]; - $allow_closers = $row[8]; - $auto_dial_level = $row[9]; - $dial_timeout = $row[10]; - $dial_prefix = $row[11]; - $campaign_cid = $row[12]; - $campaign_vdad_exten = $row[13]; - $campaign_rec_exten = $row[14]; - $campaign_recording = $row[15]; - $campaign_rec_filename = $row[16]; - $campaign_script = $row[17]; - $get_call_launch = $row[18]; - $campaign_am_message_exten = $row[19]; - $xferconf_a_dtmf = $row[20]; - $xferconf_a_number = $row[21]; - $xferconf_b_dtmf = $row[22]; - $xferconf_b_number = $row[23]; - - ##### grab the number of leads in the hopper for this campaign - $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $row=mysql_fetch_row($rslt); - $campaign_leads_to_call = $row[0]; - print "\n"; - - } - else - { - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "A campanha nao ativa, tenta por favor outra vez
"; - } - } - else - { - fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); - fclose($fp); - $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "O início de uma sessão incorreto, tenta por favor outra vez
"; - } - } - if ($VDloginDISPLAY) - { - echo "Web client de VICISELETOR: Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "

$VDdisplayMESSAGE

"; - echo ""; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão Da Campanha
 
Início de uma sessão Do Usuário:
Senha Do Usuário:
Campanha: $camp_form_code

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - -$authphone=0; -$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; -if ($DB) {echo "|$stmt|\n";} -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$authphone=$row[0]; -if (!$authphone) - { - echo "Web client de VICISELETOR: Início de uma sessão Do Telefone Error\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Início de uma sessão Error
 
Pesaroso, seus início de uma sessão do telefone e senha não seja:
 
Início de uma sessão Do Telefone:
Senha Do Telefone:

VERSÃO: $version       CONFIGURAÇÃO: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } -else - { - echo "Web client de VICISELETOR\n"; - $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $extension=$row[0]; - $dialplan_number=$row[1]; - $voicemail_id=$row[2]; - $phone_ip=$row[3]; - $computer_ip=$row[4]; - $server_ip=$row[5]; - $login=$row[6]; - $pass=$row[7]; - $status=$row[8]; - $active=$row[9]; - $phone_type=$row[10]; - $fullname=$row[11]; - $company=$row[12]; - $picture=$row[13]; - $messages=$row[14]; - $old_messages=$row[15]; - $protocol=$row[16]; - $local_gmt=$row[17]; - $ASTmgrUSERNAME=$row[18]; - $ASTmgrSECRET=$row[19]; - $login_user=$row[20]; - $login_pass=$row[21]; - $login_campaign=$row[22]; - $park_on_extension=$row[23]; - $conf_on_extension=$row[24]; - $VICIDiaL_park_on_extension=$row[25]; - $VICIDiaL_park_on_filename=$row[26]; - $monitor_prefix=$row[27]; - $recording_exten=$row[28]; - $voicemail_exten=$row[29]; - $voicemail_dump_exten=$row[30]; - $ext_context=$row[31]; - $dtmf_send_extension=$row[32]; - $call_out_number_group=$row[33]; - $client_browser=$row[34]; - $install_directory=$row[35]; - $local_web_callerID_URL=$row[36]; - $VICIDiaL_web_URL=$row[37]; - $AGI_call_logging_enabled=$row[38]; - $user_switching_enabled=$row[39]; - $conferencing_enabled=$row[40]; - $admin_hangup_enabled=$row[41]; - $admin_hijack_enabled=$row[42]; - $admin_monitor_enabled=$row[43]; - $call_parking_enabled=$row[44]; - $updater_check_enabled=$row[45]; - $AFLogging_enabled=$row[46]; - $QUEUE_ACTION_enabled=$row[47]; - $CallerID_popup_enabled=$row[48]; - $voicemail_button_enabled=$row[49]; - $enable_fast_refresh=$row[50]; - $fast_refresh_rate=$row[51]; - $enable_persistant_mysql=$row[52]; - $auto_dial_next_number=$row[53]; - $VDstop_rec_after_each_call=$row[54]; - $DBX_server=$row[55]; - $DBX_database=$row[56]; - $DBX_user=$row[57]; - $DBX_pass=$row[58]; - $DBX_port=$row[59]; - - if ($protocol == 'EXTERNAL') - { - $protocol = 'Local'; - $extension = "$dialplan_number$AT$ext_context"; - } - $SIP_user = "$protocol/$extension"; - - $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $asterisk_version=$row[0]; - - # If a park extension is not set, use the default one - if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) - { - $VICIDiaL_park_on_extension = "$park_ext"; - $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; - } - print "\n"; - - # If a web form address is not set, use the default one - if (strlen($web_form_address)>0) - { - $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; - } - else - { - $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - } - $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); - - # If closers are allowed em this campaign - if ($allow_closers=="Y") - { - $VICIDiaL_allow_closers = 1; - print "\n"; - } - else - { - $VICIDiaL_allow_closers = 0; - print "\n"; - } - - - $session_ext = eregi_replace("[^a-z0-9]", "", $extension); - if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} - $session_rand = (rand(1,9999999) + 10000000); - $session_name = "$StarTtimE$US$session_ext$session_rand"; - - $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) - { - ### insert an entry into the user log for the login event - $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly - $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $prev_login_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $prev_login_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - if ($prev_login_ct > 0) - {print "\n";} - else - { - ##### grab the next available vicidial_conference room and reserve it - $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $free_conf_ct = mysql_num_rows($rslt); - $i=0; - while ($i < $free_conf_ct) - { - $row=mysql_fetch_row($rslt); - $session_id =$row[0]; - $i++; - } - $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; - $rslt=mysql_query($stmt, $link); - print "\n"; - - } - - $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - # print "You have logged in as user: $VD_login em phone: $SIP_user à campanha: $VD_campaign
\n"; - $VICIDiaL_is_logged_in=1; - - ### use manager middleware-app to connect the phone to the user - $SIqueryCID = "S$CIDdate$session_id"; - ### insert a NOVO record to the vicidial_manager table to be processed - $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if ($auto_dial_level > 0) - { - print "\n"; - - $closer_chooser_string=''; - $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - print "\n"; - - if (eregi("CLOSER", $VD_campaign)) - { - print "\n"; - } - } - else - { - print "\n"; - - - - } - } - else - { - echo "Web client de VICISELETOR: VICISELETOR Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Pesaroso, não há nenhuma ligação no funil para esta campanha\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Início de uma sessão: \n
"; - echo "Senha:
\n"; - echo "Campanha: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - if (strlen($session_id) < 1) - { - echo "Web client de VICISELETOR: VICISELETOR Início de uma sessão Da Campanha\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; -echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n";echo "\n"; echo "
English Español Français Deutsch Italiano Português Ελληνικά
\n"; - echo "Sorry, there are no available sessions\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "Início de uma sessão: \n
"; - echo "Senha:
\n"; - echo "Campanha: $camp_form_code
\n"; - echo "\n"; - echo "
\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; - } - - $StarTtimE = date("U"); - $NOW_TIME = date("Y-m-d H:i:s"); - ##### Agent is going to log in so insert the vicidial_agent_log entry now - $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); - print "\n"; - - $S='*'; - $D_s_ip = explode('.', $server_ip); - if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} - if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} - if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} - if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} - if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} - $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; - - ##### grab the datails of all active scripts in the system - $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $MM_scripts = mysql_num_rows($rslt); - $e=0; - while ($e < $MM_scripts) - { - $row=mysql_fetch_row($rslt); - $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); - $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; - $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; - $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; - $e++; - } - $MMscriptids = substr("$MMscriptids", 0, -1); - $MMscriptnames = substr("$MMscriptnames", 0, -1); - $MMscripttexts = substr("$MMscripttexts", 0, -1); - - } -} - -################################################################ -### BEGIN - build the callback calendar (12 months) ### -################################################################ -define ('ADAY', (60*60*24)); -$CdayARY = getdate(); -$Cmon = $CdayARY['mon']; -$Cyear = $CdayARY['year']; -$CTODAY = date("Y-m"); -$CTODAYmday = date("j"); -$CINC=0; - -$Cmonths = Array('January','February','March','April','May','June', - 'July','August','September','October','November','December'); -$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - -$CCAL_OUT = ''; - -$CCAL_OUT .= ""; - -while ($CINC < 12) -{ -if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) - {$CCAL_OUT .= "";} - -$CCAL_OUT .= ""; - -if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) - {$CCAL_OUT .= "";} -$CINC++; -} - -$CCAL_OUT .= "
"; - -$CYyear = $Cyear; -$Cmonth= ($Cmon + $CINC); -if ($Cmonth > 12) - { - $Cmonth = ($Cmonth - 12); - $CYyear++; - } -$Cstart= mktime(0,0,0,$Cmonth,1,$CYyear); -$CfirstdayARY = getdate($Cstart); -#echo "|$Cmon|$Cmonth|$CINC|\n"; -$CPRNTDAY = date("Y-m", $Cstart); - -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; -$CCAL_OUT .= ""; - -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";} - $CBL = ""; - $CEL = ""; - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - else - { - $CDCLR="#ffffff"; - if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) - { - $CDCLR="#CCCCCC"; - $CBL = ''; - $CEL = ''; - } - else - { - $CPRNTmday = $Cdayarray['mday']; - if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} - $CBL = ""; - $CEL = ""; - } - - $CCAL_OUT .= ""; - $Cstart += ADAY; - } - } -} -$CCAL_OUT .= ""; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "
"; -$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; -$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 .= "
"; - -#echo "$CCAL_OUT\n"; -################################################################ -### END - build the callback calendar (12 months) ### -################################################################ - - -?> - - - - - - -\n"; - - -?> - -
- - -
- - - -LOGOUT\n"; ?> -
-
- - - - - - - - -
VICISELETORSCRIPT   LIVE     sessão ID: Vive A Chamada
-
- - - - -

VICISELETOR
-
- - - - -
- - Transferência - Conferência
- MAIS PRÓXIMO INTERNO - LOCAL MAIS PRÓXIMO - CODE - Linha De Xfer Do Hangup - Hangup Ambas as Linhas - -
- - Número a chamar-se   - segundos   - channel - - OVERRIDE   - D1 - D2 -
- - Seletor Com Cliente - Seletor Do Cliente Do Parque - CHAMADA DA LICENÇA 3-WAY - Transferência Da Cortina Do Seletor - Blind Transfer VMail Message -
-
-
- - - - -
Ligação Dispositioned Como:

- -
-
-
- - - - - - - -
Chaves Quentes Da Disposição: - Quando ativo, pressione simplesmente a chave de teclado para a:
- - - - - -
-
- - -
Noone está em sua sessão:
- OK -
-
- - -
O cliente pendurou acima:
- OK -
-
- - -

LOGOUT
-
- - -
-
- - -
 
-
- - -
Todas as mudanças feitas ao cliente que a informação abaixo neste tempo não será comitted, você devem mudar a informação do cliente antes de você hangup a chamada.
-
- - -
CHAMADA DA DISPOSIÇÃO :       minimize
- Extremidade-$$$-CHAME A Seleção Da Disposição -
- PARE DE CHAMAR-SE
- RESTAURAÇÃO | - SUBMETA -



  -
-
- - - -
Selecione uma data da rechamada :
- - - Selecione uma data abaixo   -     - Hour: -   - Minutes: -   - -  
- - Comentários dos CB:

- - SUBMETA

- - -

  -
-
- - -
SELEÇÃO DE GRUPO INBOUND MAIS PRÓXIMA
- Seleção De Grupo Inbound Mais próxima -
- CHAMADA MISTURADA(outbound ativado)
- RESTAURAÇÃO | - SUBMETA -



  -
-
- - - - - - - - - - - -
TRANSFERÊNCIA VIVA DA CHAMADA
Canaleta a ser transferida: Canaleta
Extensões:
Menu Das Extensões
-
- Emita à extensão selecionada

- Emita à caixa selecionada do vmail

- Emita a este número:


- REFRESQUE


- Para trás à janela principal

-
Conferências:
(estale sobre um número abaixo para emitir a uma conferência)
Emita minha canaleta demasiado
Menu Das Conferências
-
- - - - -
VICISELETOR SCRIPT
-
- - - - - - - - - - - - - - - - - -
STATUS:
-
-Número Seguinte Do Seletor
- INSPECÇÃO PRÉVIA DA LIGAÇÃO
";} -if ( ($manual_dial_alt_phone) and ($auto_dial_level==0) ) - {echo " ALT DO TELEFONE
";} - - -?> -LIMA DE GRAVAÇÃO:
-
-
-ID REGISTRO:
-
- -Comece Gravar
-
-Formulário Da Correia fotorreceptora
-
-Chamada Do Parque
-Transferência - Conferência
-
-Cliente Do Hangup
-
-Emita DTMF
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n";} -else - {echo "\n";} -?> - -
segundos:   Canaleta:   Tempo De Cust:
Informação Do Cliente:
Título:   Primeiramente:   Mi:  Último:
Endereço1:
Endereço2:   Endereço3:
Cidade:   Estado:   PostCode:
Província:   Vendedor Id:
Telefone:   DialCode:   Alt. Telefone:
Mostra:   Email:
Comentários:
- -
-


  - -
- - - - -
Versão do correia-cliente de VICISELETOR:     CONFIGURAÇÃO:               Usuário:              
-Mostre a informação da canaleta da chamada de conferência
- 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -CHAVES QUENTES INATIVAS - -
- - - -
- - - - -
- - - - - - - - - - - - diff --git a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/voicemail_check.php b/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/voicemail_check.php deleted file mode 100644 index bcf92fcf..00000000 --- a/agc_1-X/trunk/LANG_agc/LANG_agc/agc_pt/voicemail_check.php +++ /dev/null @@ -1,130 +0,0 @@ - 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth)) - { - echo "Inválido Usuárioname/Senha: |$user|$pass|\n"; - exit; - } - else - { - - if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) ) - { - echo "Inválido server_ip: |$server_ip| or Inválido session_name: |$session_name|\n"; - exit; - } - else - { - $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if(!$SNauth) - { - echo "Inválido session_name: |$session_name|$server_ip|\n"; - exit; - } - else - { - # do nothing for now - } - } - } - -if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "Verificação De Voicemail"; -echo "\n"; -echo "\n"; -echo "\n"; -} - - $MT[0]=''; - $row=''; $rowx=''; - if (strlen($vmail_box)<1) - { - $channel_live=0; - echo "caixa do voicemail $vmail_box é inválido\n"; - exit; - } - else - { - $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $vmails_list = mysql_num_rows($rslt); - $loop_count=0; - while ($vmails_list>$loop_count) - { - $loop_count++; - $row=mysql_fetch_row($rslt); - echo "$row[0]|$row[1]"; - if ($format=='debug') {echo "\n";} - } - } - - -if ($format=='debug') - { - $ENDtime = date("U"); - $RUNtime = ($ENDtime - $StarTtime); - echo "\n"; - echo "\n\n\n"; - } - -exit; - -?>