1839 Commits
Author SHA1 Message Date
FusionPBX 31ae516a49 FusionPBX 5.1.0 full release 2023-07-15 19:07:35 -06:00
Norman King d70fa0307b Add var to enable tr 069 on grandstream (#6774)
* added tr069 enable and periodic_inform_enable vars to config templates add variable on dp750 template for enabling tr-069 provisioning.

* add vars to grandstream app default settings

* add if condition to use the variables.

* Update app_config.php
2023-07-15 18:49:39 -06:00
markjcrane 278ae0376b When using dialplan details with the public context ensure call_direction, domain_name and domain_uuids is added to each dialplan detail group 2023-07-15 18:32:25 -06:00
markjcrane 689fe5c6b4 Use call_direction, domain_name and domain_uuuid details are added to the conditions 2023-07-15 18:22:03 -06:00
markjcrane 296b092b22 Add caller ID routing dialplan details. 2023-07-14 20:49:23 -06:00
markjcrane 1f0c30529b Add dialplan condition regex 2023-07-14 20:44:40 -06:00
markjcrane b9e6a89a37 Add extension_type is null for better backwards compatibility 2023-07-14 12:44:24 -06:00
markjcrane 4951647225 Add user_type is null for better backwarads compatibility 2023-07-14 12:38:45 -06:00
FusionPBX 4e861b0dcb Hide device information If the extension type is virtual 2023-07-13 21:40:43 -06:00
FusionPBX f93fd6b00c Require extension_type as default 2023-07-13 21:32:25 -06:00
FusionPBX b1457116d8 Require extension_type default 2023-07-13 21:30:24 -06:00
markjcrane 52c0b3955f Disable authentication if the user type is set to virtual. 2023-07-13 18:30:29 -06:00
markjcrane d3aed6707e Update the extension_type when the value is null 2023-07-13 18:29:12 -06:00
FusionPBX 9b68b04aa4 Update the user_type when the value is null 2023-07-13 17:50:09 -06:00
markjcrane 57614ea8af Add user_type options: default, virtual 2023-07-13 17:22:52 -06:00
markjcrane e06c8ea208 Add extension_type options: default, virtual 2023-07-13 17:11:07 -06:00
markjcrane 025f243bac Prevent PHP 8.1 warnings 2023-07-13 17:00:47 -06:00
FusionPBX 0ab4e245e5 Add a new label-virtual translation 2023-07-13 16:19:56 -06:00
FusionPBX 8841e28f32 Default setting catetogies should use an underscore rather than a space 2023-07-13 08:17:44 -06:00
FusionPBX 75e7e0859c Default Settings show order on hover 2023-07-13 08:15:04 -06:00
jacobbuscher-btandJacob Buscher 28695de14c Add the / character to the ALLOWED_CHARS variable to fix bug with front slashes being stripped. Previously was turning /var/lib/freeswitch into varlibfreeswitch (#6773)
Co-authored-by: Jacob Buscher <jacob@bfitec.com>
2023-07-12 22:15:37 -06:00
FusionPBX 90259527cc Create y000000000000.boot 2023-07-12 21:05:37 -06:00
FusionPBX 0f3d8a1d87 Create y000000000143.cfg for cp965 2023-07-12 21:03:14 -06:00
FusionPBX ddfa077635 Remove undefined translation 2023-07-12 15:42:40 -06:00
wouam31200 83aff11098 BLF Not Showing Correct Status When Using DNS-SRV (#6714)
* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

BLF Not Showing Correct Status When Using DNS-SRV

* Update y000000000095.cfg

 yealink_language

* Update y000000000097.cfg

Add {$yealink_enhanced_dss_keys}

* Update y000000000096.cfg

Add {$yealink_enhanced_dss_keys}

* Update y000000000095.cfg

Add {$yealink_enhanced_dss_keys}

* Update y000000000070.cfg

Add {$yealink_enhanced_dss_keys}
2023-07-12 15:27:23 -06:00
KRooney 5d387ac3dd Update app_languages.php (#6772)
French Update
2023-07-12 15:24:55 -06:00
FusionPBX d20b2f3a23 Create ${mac}.cfg for cp965 2023-07-12 14:43:04 -06:00
FusionPBX ffc7d32bdc Add cp960 2023-07-12 14:40:50 -06:00
FusionPBX 9a2c3f6299 Use isset with REQUEST address and mac 2023-07-12 12:58:02 -06:00
FusionPBX d3cfa9c2bc Update mkdir.lua 2023-07-12 10:47:57 -06:00
FusionPBX 1f62c73b2d Use the email_send_mode 2023-07-11 19:22:43 -06:00
FusionPBX 9c0b0c3a60 Change authentication email_queue to email_send_mode 2023-07-11 19:19:58 -06:00
volga629-1 21be0125b5 Auth direct email or email queue (#6617)
* Auth direct email or email_queue

Authentication email plugin improvement 

* Update email.php
2023-07-11 19:14:20 -06:00
FusionPBX 65ec8133df Update domains array when switching between tenants. 2023-07-11 17:20:49 -06:00
FusionPBX dea23a1e3b Login destination url changed to text. 2023-07-11 15:28:01 -06:00
fusionate 1bc941e244 Menu [Class]: Reslove PHP 8.1 warning on mobile devices. 2023-07-11 20:26:38 +00:00
fusionate 37c2b8a040 Contact - View: Display first & last name. 2023-07-11 20:25:46 +00:00
FusionPBX 04a6701343 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:19 -06:00
FusionPBX e72afde5a7 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:16 -06:00
FusionPBX e6538d3858 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:15 -06:00
FusionPBX 3732d51753 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:12 -06:00
FusionPBX 73c6b87121 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:10 -06:00
FusionPBX cf38aa88ec Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:47:08 -06:00
FusionPBX 59e96d19b0 Add user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:43:11 -06:00
FusionPBX cd28379dd2 Add snom user_shared_line
https://service.snom.com/display/wiki/user_shared_line
2023-07-11 12:41:34 -06:00
FusionPBX 818fb6f203 Change email queue default interval to 5 seconds 2023-07-11 12:34:48 -06:00
FusionPBX e3cfa0d1da Prevent more PHP 8.1 warnings 2023-07-10 18:33:18 -06:00
fusionate 3b6c2acd76 CDR Details: Little better output. 2023-07-07 21:55:32 +00:00
FusionPBX d6969715d7 Update xml_cdr_details.php fix PHP 8.1 warnings 2023-07-07 15:39:38 -06:00
fusionate 9ae6c12cbb Cache [Class]: Resolve PHP 8.1 warning on cache() method. 2023-07-07 19:41:48 +00:00
FusionPBX 7724c6fe5b Few more adjustments for record_name 2023-07-07 12:01:23 -06:00
FusionPBX 5fb8ab41d8 Requires a colon 2023-07-07 09:48:21 -06:00
Alex 3dfe583a42 Update ivr_menu_edit.php (#6769) 2023-07-07 09:39:36 -06:00
FusionPBX 7f60ff23c4 When record_session is true set record_path variable 2023-07-07 09:38:13 -06:00
FusionPBX f00712463c Update recording name and file extension 2023-07-07 09:26:03 -06:00
FusionPBX e5a4890d29 Provisioning templates isset is better than !empty 2023-07-06 18:57:18 -06:00
FusionPBX f998c4f62b Function format_hours convert seconds to an integer and use sprintf for leading zeros. 2023-07-06 15:40:53 -06:00
Anthony 8c8ef2c309 Fixed Warnings (#6768)
* Update device_edit.php

* Update dialplan_edit.php

* Update app_languages.php
2023-07-06 14:51:02 -06:00
FusionPBX ddcd2c6d5a Minor fix for body_text_color 2023-07-06 14:18:32 -06:00
FusionPBX 656e077d40 Use !empty instead of != '' 2023-07-06 14:08:54 -06:00
FusionPBX 53acebd180 Use !empty instead of != '' 2023-07-06 14:03:21 -06:00
FusionPBX b7e3d6133c Prevent PHP 8.1 errrors 2023-07-06 12:25:47 -06:00
FusionPBX 890321e338 Update !empty instead of ! = '' 2023-07-06 11:55:20 -06:00
FusionPBX 5bcb9b8d26 Use !empty instead of is_array 2023-07-06 11:42:43 -06:00
FusionPBX 3c9678bbf2 Prevent an error using str_pad on a null string 2023-07-05 19:02:28 -06:00
FusionPBX ae51a57566 Update voicemail.php 2023-07-05 18:53:26 -06:00
FusionPBX e629e615d4 Update destination_edit.php 2023-07-05 18:12:08 -06:00
fusionate ceb0637c83 Database [Class]: Update for PHP 8.1 2023-07-05 23:12:00 +00:00
markjcrane 49a45f08be Preset auth_string value to make sure it is set 2023-07-05 14:22:44 -06:00
markjcrane 27bc8df629 Update for PHP 8.1 2023-07-05 14:20:05 -06:00
markjcrane 0665ac02e2 PHP 8.1 changes 2023-07-05 14:13:22 -06:00
markjcrane 56d5c8a755 Use and update the description 2023-07-04 15:24:13 -06:00
FusionPBX 6f73009728 Add condition_app and condition_data
This allows caller ID routing with one destination.
2023-07-04 14:45:40 -06:00
fusionate 07ff69b53d Device - Edit: Hide Provision button when using Linphone template. 2023-07-03 20:14:22 +00:00
fusionate c3f4d8a1c2 Device - Edit: Include provisioning htt_auth creds (if enabled) in Linphone QR code. 2023-07-03 19:52:56 +00:00
FusionPBX 408247599b Remove display none use zindex 2023-07-03 12:55:07 -06:00
FusionPBX 999858e01c Remove formatting for the device_address 2023-07-03 12:04:19 -06:00
fusionate 3ea9e7d012 Device - Edit: Updates for PHP 8.1 2023-07-03 18:02:17 +00:00
markjcrane d7b3e25cd4 Allow case insensitive UUID 2023-07-03 08:33:34 -06:00
markjcrane 63bb9b6e81 Add QR code for linphone. Use a PHP QR library. Format the device address 2023-07-03 08:26:19 -06:00
FusionPBX 255b1773ae Update the linphone template its ready to use
- The first nat_policy_0 needs a postfix with _0
- Correct the syntax with the registration password
2023-07-01 10:00:19 -06:00
FusionPBX bcf81d3306 Change new_mac_address to new_address 2023-06-30 20:08:30 -06:00
FusionPBX 2854fd816c Provision file download work with address 2023-06-30 20:06:40 -06:00
FusionPBX 51c349a78e Add default linphone template 2023-06-30 19:40:55 -06:00
FusionPBX fe750a092d Update provision.php add address.xml 2023-06-30 19:01:06 -06:00
FusionPBX 7d90568f05 Add a smarty plugin for md5 2023-06-30 17:34:10 -06:00
FusionPBX e03becd5d1 Add a new device vendor linphone 2023-06-30 17:04:47 -06:00
fusionate b1e6c72408 Devices: New device_address_uuid permission, to enable Address generation on Extension - Edit page. 2023-06-30 22:40:52 +00:00
fusionate 85ed88878d Extension - Edit: Add option to generate Device Address UUID, respecting device limits (if any). 2023-06-30 22:40:17 +00:00
fusionate ffbd2996f1 Extension - Edit: Format display of device address in Provisioning select box. 2023-06-30 21:49:44 +00:00
fusionate b509050827 Device - Edit: Make address field wider, and limit character length. 2023-06-30 21:48:39 +00:00
fusionate 212ceb361d Functions: Enhance is_uuid(), is_mac() and format_device_address() functions. 2023-06-30 21:47:32 +00:00
FusionPBX 6fa3dcdb53 Fix a spelling mistake for empty 2023-06-30 14:26:36 -06:00
FusionPBX 1ecd3c7be9 Remove to allow more flexibility on the device_address 2023-06-30 14:23:19 -06:00
fusionate c3438ec3ae Fax - Edit: Fix issue with Authorized Senders. 2023-06-30 18:52:02 +00:00
fusionate 17af8976d9 Fax Emails: Fix minor syntax issue. 2023-06-30 18:51:25 +00:00
markjcrane f8b657f674 Fix the device.file.download file name 2023-06-30 09:59:57 -06:00
markjcrane 53779d50d3 Change device_mac_address to device_address 2023-06-29 23:40:11 -06:00
FusionPBX 49648e6655 Handle errors better for invalid xml with simplexml_load_string
When the XML object detects invalid XML move the file to the failed directory.

After reading and processing the XML save each call detail record to the database.
2023-06-29 17:25:20 -06:00
FusionPBX e5ca998ef8 Ad ring group destination delay with the follow me delay 2023-06-29 14:13:32 -06:00
FusionPBX ba3afa2565 Requires the path to include the right translation file 2023-06-29 09:54:39 -06:00
Alex 2a577635e3 Update app_languages.php (#6766) 2023-06-29 09:48:05 -06:00
FusionPBX 54beb80b32 Update extension_edit.php
Fix outbound caller ID name select.
Additional PHP 8.1 updates
2023-06-29 09:32:43 -06:00
FusionPBX da6270a7af Use !empty instead of != '' 2023-06-29 08:53:04 -06:00
Antonio Fernandez 1057c4cf8e Improvements to the labelling of various CC pages (#6764)
* Improvements to the labeling of various CC pages
2023-06-28 19:00:16 -06:00
FusionPBX ec04006971 Change the scope of the database variables 2023-06-28 15:29:28 -06:00
fusionate c143b9fe83 Authentication - Database: Resolve PHP 8.1 warning when using API Key login. 2023-06-28 20:54:34 +00:00
FusionPBX 1f0d24a447 Show only the Parent Menus 2023-06-28 14:08:01 -06:00
FusionPBX 0177861b45 Remove switch ${variables} from the bridge statement 2023-06-28 12:47:06 -06:00
FusionPBX 4644cf6e15 Update fax_emails.php 2023-06-28 10:21:00 -06:00
Mihir Gajjar fc8bc10803 Updated Snom D717 template for setting the Smartlabel display mode (#6763)
By Default, Snom D717 has the smartlabel display mode set to "short". Snom D717 has an issue where for short labels it doesn't take the label that we configure in devices. Instead, it tries to look for the value in the system and if it doesn't find a contact or extension associated, it will just show the number itself.
2023-06-28 09:50:09 -06:00
Andy Binder 6f352c2efb Update translate.conf.lua (#6765)
Remove sanitization of number-translation regexes
2023-06-28 09:48:39 -06:00
fusionate b3f9e44db1 Voicemail: Add permissions voicemail_recording_instructions and voicemail_recording_options to control visibility respective fields on Voicemail - Edit page. 2023-06-28 02:47:53 +00:00
fusionate a8f25e9657 Voicemail: Let skip_instructions channel variable still take priority over voicemail_recording_options in database. 2023-06-28 02:45:35 +00:00
fusionate 679df10c6e Voicemail - Edit: Adjust Recording Instructions and Options description. 2023-06-28 02:27:26 +00:00
fusionate 5ef1c225f6 Voicemail - Edit: Add controls to manage Recording Instructions and Options, Only show Alternate Greeting ID if using Default greeting. 2023-06-28 02:11:01 +00:00
fusionate 24197a88d6 Voicemail - Edit: Fix Greeting None option. 2023-06-27 22:23:04 +00:00
fusionate 5bce5b103b Voicemail [Class]: Update for PHP 8.1 2023-06-27 22:22:30 +00:00
FusionPBX a034fbe08b Update the version to 5.1.0 RC2 2023-06-27 11:26:48 -06:00
FusionPBX c393b27bf3 Bug fixed for conference active 2023-06-27 10:15:05 -06:00
fusionate d24acf66bf Authentication: Updates to improve order compatibility. 2023-06-27 02:32:11 +00:00
fusionate dec61c3833 Check Auth: Updates for PHP 8.1 2023-06-27 02:31:25 +00:00
markjcrane a9bd6cbc9a Update the to point to app/switch/resources/conf 2023-06-26 13:37:08 -06:00
FusionPBX eed43da50c Update app_defaults.php 2023-06-26 13:20:34 -06:00
FusionPBX 1f5fd680ab Update app_defaults.php 2023-06-26 13:15:44 -06:00
FusionPBX 68c4e29346 Update path to switch conf directory 2023-06-26 13:08:30 -06:00
FusionPBX 3e64700259 Needs to say empty rather than not empty 2023-06-26 10:24:18 -06:00
FusionPBX 39c81b60c4 Update the path to the conf directory 2023-06-26 10:02:14 -06:00
fusionate 2e2bd53170 Authentication: Additional improvements to order execution and invalid creds. 2023-06-25 01:11:49 +00:00
markjcrane 65a84216bb Update class.phpmailer.php update for PHP 8.1 2023-06-24 16:59:43 -06:00
fusionate b23a18fdf1 Authentication: Minor improvements in bad username handling, effort to integrate messages. 2023-06-24 22:40:44 +00:00
fusionate a7ecdf72f8 Authentication: Remove cancel link from username template (form is always displayed first, if needed). 2023-06-24 21:34:42 +00:00
fusionate aa7def54a6 Authentication - Fix MFA when all methods are enabled. 2023-06-24 21:18:39 +00:00
fusionate 123ac6e00a Default Settings - List: Display order value for array type settings. 2023-06-24 21:12:39 +00:00
markjcrane a72c843b52 Correct the path to the scripts directory 2023-06-24 10:01:15 -06:00
markjcrane b6c521d787 Define the db_sslmode variable 2023-06-24 09:48:27 -06:00
markjcrane 97e0d93400 Set the values in the config class 2023-06-24 09:39:04 -06:00
markjcrane 6e1cfb0354 The db handle is no longer needed for this function 2023-06-24 09:37:42 -06:00
markjcrane 88faf89219 Move scripts to app/switch/resources/scripts 2023-06-24 08:32:56 -06:00
markjcrane 0d39719318 Move resources/templates/conf to app/switch/resources/conf 2023-06-23 13:27:29 -06:00
fusionate 1f20424cbd Login: Nevermind. Simplify login.php even further. 2023-06-23 18:04:10 +00:00
fusionate 3389ab292d Login: Honor login destination setting (if any). 2023-06-23 18:00:37 +00:00
FusionPBX 90c2ef0029 Revert back to tonumber
# counts the characters and tonumber converts a string to a number.
2023-06-23 11:59:10 -06:00
fusionate b22aae01d0 Conference Room - Edit: Allow 0 on Max Members again. 2023-06-23 17:48:14 +00:00
fusionate 71d6415d06 Authentication - TOTP: Add description. 2023-06-23 17:47:31 +00:00
fusionate d17265c3ec Login: Resolve double prompt for authentication code. 2023-06-23 16:54:19 +00:00
fusionate 67e60db16a Authentication - TOTP: Updatse for PHP 8.1 2023-06-23 16:53:09 +00:00
fusionate 4641c3d295 Default Settings - Edit: Updates for PHP 8.1 2023-06-23 16:25:05 +00:00
fusionate 2c9d741158 SIP Status: Updates for PHP 8.1 2023-06-23 02:09:45 +00:00
fusionate 6bcc5aff5e Authentication: Added some polish, Cancel links, PHP 8.1 updates. 2023-06-23 00:14:07 +00:00
fusionate 7c85bc95f6 Extension - Edit: Update for PHP 8.1 2023-06-22 18:35:59 +00:00
Zachary Kitchen 1a65701da8 Added DND & Call Forwarding Codes to GR26XX (#6761) 2023-06-22 10:18:18 -06:00
FusionPBX fd0e30bdb7 Update config class add config.conf 2023-06-22 10:09:14 -06:00
FusionPBX 033774c809 Update send_mail.lua add insert_date 2023-06-21 14:20:40 -06:00
FusionPBX 62a61f451b Change login destination type url to text 2023-06-21 12:07:08 -06:00
FusionPBX 3eb64d1d9a Add fax_sent_view to the fax group 2023-06-21 11:29:17 -06:00
markjcrane fcda82136f Fix contact import and extension import button 2023-06-20 08:11:07 -06:00
FusionPBX bcf7cbaad2 Save database errors to the message variable 2023-06-19 16:08:54 -06:00
markjcrane ec7a088099 Ensure variables to exist 2023-06-19 14:56:16 -06:00
Anthony aa4a959f1c Update domain_limits.php (#6757) 2023-06-19 13:07:01 -06:00
FusionPBX 9520fd9481 Update switch_status.php a few PHP 8.1 changes 2023-06-19 13:06:48 -06:00
FusionPBX b0bfaf8400 Remove redundant check_voicemail, company_directory and hangup.
These are part of the Other category and have been already added to the destination select list in the destinations class.
2023-06-17 23:17:55 -06:00
markjcrane 1452bde1ac Update the database class to find the require.php 2023-06-17 22:29:15 -06:00
markjcrane 38150d25aa Use require.php 2023-06-17 21:50:29 -06:00
markjcrane ab646085be Use dir to include require.php 2023-06-17 21:02:45 -06:00
fusionate 219d65ba18 Login: Restore authentication failed message (for real!). 2023-06-17 23:19:41 +00:00
fusionate 3021f59431 Login: Restore authentication failed message. 2023-06-17 23:16:39 +00:00
markjcrane 8393701d13 Authentication reject on single plugin authorized false 2023-06-17 16:18:02 -06:00
FusionPBX 719b84ed2a Skip redirect and prompt for login 2023-06-17 15:27:56 -06:00
frytimo 0dc9aaabe8 Minor Changes (#6756)
* Update installer to use magic __DIR__

* move setting default step to near top

* spacing

* move session start before text object creation
2023-06-17 14:07:06 -06:00
Andy Binder cfda1ab335 More german translation updates (#6755) 2023-06-17 13:28:37 -06:00
markjcrane c92872ab8f Use require instead of require_once on require.php 2023-06-17 09:11:32 -06:00
markjcrane d6cb17e5b9 Fix a PHP 8.1 error 2023-06-17 09:08:25 -06:00
markjcrane 32051873be Use __dir__ to find resources/require.php 2023-06-16 22:49:09 -06:00
FusionPBX d4231ab0e1 Follow me uses enterprise multiply by 1000 for milliseconds 2023-06-16 14:03:06 -06:00
FusionPBX c69535413c Fix ring group timing for enterprise vs simultaneous 2023-06-16 14:01:38 -06:00
FusionPBX 094a0f4388 Only set the device_vendor when the value is not empty 2023-06-16 13:02:47 -06:00
FusionPBX 2ee90482f1 Get the device_vendor from the database 2023-06-16 12:43:58 -06:00
FusionPBX ad34744272 Use is_xml instead of simplexml_load_string
Reason for the change is it was throwing and error. Also using regex is less resource intensive. Using this to determine the content type.
2023-06-16 11:16:22 -06:00
FusionPBX 4d54821119 Add a is_xml function 2023-06-16 11:13:20 -06:00
fusionate 142b6dd323 Dialplan - Edit: Clean up. 2023-06-15 23:59:06 +00:00
fusionate c1aebc39a3 Outbound Routes - Add: Integrate new Enabled toggle. 2023-06-15 23:44:59 +00:00
fusionate e8cca7bcc6 Inbound Routes - Add: Integrate new Enabled toggle. 2023-06-15 23:44:40 +00:00
fusionate 09ef6074a7 Dialplan - Edit: Integrate new Enabled toggle, PHP 8.1 updates. 2023-06-15 23:43:39 +00:00
FusionPBX 76e6b5924b Initialize recording_description and recording_base64 as a string
This prevents an error inserting a null description and fixes the insert SQL command to fix the insert.
2023-06-15 17:23:25 -06:00
fusionate 91366eddc5 Destinations - List: Fix Trunk Prefix and Area Code column headings. 2023-06-15 22:23:44 +00:00
FusionPBX 09567f45c1 Update index.lua 2023-06-15 15:29:13 -06:00
frytimoandFusionPBX d7bbcd89f5 Use magic constant dir (#6711)
* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__

* use magic constant __DIR__ to load only functions.php

* replace spaces with tab character

* update dirname command to use levels instead of nesting

* use magic constant __DIR__

* update dirname command to use levels instead of nesting

* Update access_control_edit.php

* Update access_control_import.php

* Update access_controls.php

* Update dnd.php

* Update access_controls_reload.php

* Update call_center_agents.php

* Update call_center_agents.php

* Update fax_queue.php

* Update login.php

* Update pdo.php

* Update pdo_vm.php

* Update switch.php

* Update index.php

* Update css.php

* Update v_mailto.php

* Update fax_to_email.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-06-15 11:28:23 -06:00
FusionPBX 85599c69a0 Replace tonumber with #variablename 2023-06-14 19:39:56 -06:00
FusionPBX c746119faa Replace tonumber function with # which casts the string to a number 2023-06-14 19:15:16 -06:00
FusionPBX f8c31c4958 Cast the string to a number to increment call block count 2023-06-14 19:08:37 -06:00
FusionPBX 9f339f4ff2 Fix bold for unread voicemail messages. 2023-06-14 18:53:29 -06:00
FusionPBX ba92ef16f7 Either permisison is sufficient. Use an OR as '||' instead than And '&&' 2023-06-14 17:44:38 -06:00
FusionPBX cdfde3aca2 Fix the syntax for gxw42xx template 2023-06-14 16:33:45 -06:00
FusionPBX c8f71780e3 Add definable call center export variables 2023-06-14 15:54:21 -06:00
markjcrane f63010d915 Fix new install loading music on hold 2023-06-14 15:00:28 -06:00
Andy Binder 13d7703e2d correct translations (#6752) 2023-06-14 14:37:00 -06:00
Andy Binder 9e6c45f924 German email templates (#6753) 2023-06-14 14:34:16 -06:00
FusionPBX 764dd1612a Use port 5080 and 5081 2023-06-14 08:49:46 -06:00
fusionate a96b721025 Template: Modify list_self_check() JS function to exclude primary Enabled toggle (if any). 2023-06-13 22:54:48 +00:00
markjcrane 49e8aa9863 Fix conference room pin numbers 2023-06-13 10:18:05 -06:00
markjcrane 821dd7ed08 PHP 8.2 Deprecated dynamic property 2023-06-12 21:35:38 -06:00
markjcrane f506b00b57 PHP 8.2 Deprecated dynamic properties 2023-06-12 21:27:23 -06:00
markjcrane bb9f48296a PHP 8.2 Deprecated dynamic properties. 2023-06-12 20:59:56 -06:00
fusionate 19bb912d27 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2023-06-12 23:07:04 +00:00
Alex 25b24d68bd Fixed more php 8.1 errors (#6754)
* Update default_setting_edit.php

* Update default_settings_reload.php

* Update modules.php

* Update access_controls_reload.php

* Update call_recordings.php

* Update fax.php

* Update extension_edit.php

* Update extension_imports.php

* Update destination_imports.php

* Update dialplan_outbound_add.php

* Update dialplan_inbound_add.php

* Update voicemail_imports.php

* Update contact_import.php
2023-06-12 17:06:56 -06:00
fusionate 364f2582a3 User - Edit: Create socket to update user state even if user status empty. 2023-06-12 23:06:55 +00:00
fusionate 5d9c8ad770 Extension - Edit: Update for PHP 8.1 2023-06-12 23:04:33 +00:00
markjcrane 6e7d274c5a Remove debug for authentication class. The validation method returns enough details. 2023-06-12 16:27:47 -06:00
fusionate a903d0efbf Call Center Agent - Edit: Fix Contact selection. 2023-06-12 21:03:45 +00:00
fusionate 9b1ac240b3 Call Center Queue - Edit: Updates for PHP 8.1 2023-06-12 21:02:52 +00:00
Alex 5e90483b95 Missing quotes (#6751) 2023-06-09 16:59:09 -06:00
Alex 777b56ae9a Fixed call broadcast and call block php 8.1 errors (#6750)
* Update call_block_edit.php

* Update call_broadcast_send.php

* Update call_broadcast_send.php
2023-06-09 15:01:46 -06:00
fusionate 8b982dd6e3 Database [Class]: Modify copy() method to support enable and description fields without the table name. 2023-06-09 19:42:10 +00:00
fusionate eeba323429 Number Translations: Update for PHP 8.1 2023-06-09 19:40:41 +00:00
fusionate 305a18c6b0 Access Controls: Update for PHP 8.1 2023-06-09 19:40:20 +00:00
fusionate d92961d769 Sofia Global Settings: Fix Copy of disabled record. 2023-06-09 18:42:16 +00:00
fusionate 2cc5035ceb Extension Settings [Class]: Updates for PHP 8.1, fix Copy of disabled record. 2023-06-09 18:41:49 +00:00
fusionate 4b249e1fe4 Extension Settings: Updates for PHP 8.1 2023-06-09 18:40:56 +00:00
fusionate 03d446ec0d Extension - Edit: Updates for PHP 8.1 2023-06-09 18:40:15 +00:00
fusionate 44fe36fc3d Transactions: Hide View button if not desired. 2023-06-09 18:12:38 +00:00
fusionate 4ba06c5335 Sofia Global Settings: Updates for PHP 8.1 2023-06-09 18:06:02 +00:00
fusionate 3f94d93411 Modules: Updates for PHP 8.1 2023-06-09 17:51:01 +00:00
fusionate d8652d72e9 SIP Profiles: Updates for PHP 8.1 2023-06-09 17:50:36 +00:00
fusionate fa93b4e7f5 Misc: Updates for PHP 8.1 2023-06-09 17:29:33 +00:00
fusionate 09ba7069dc Functions: Enhance html_select_other() function. 2023-06-09 17:28:56 +00:00
fusionate e016d3d39c Variables: Updates for PHP 8.1 2023-06-09 17:27:55 +00:00
fusionate 39cb1c3588 Voicemail Greetings: Updates for PHP 8.1 2023-06-09 16:51:59 +00:00
fusionate bd9a407ba5 Voicemails: Updates for PHP 8.1 2023-06-09 16:51:36 +00:00
fusionate 93e59f230a Time Condition - Edit: Updates for PHP 8.1 2023-06-09 15:48:45 +00:00
FusionPBX 5759a636e6 Add missing cc_queue_joined_epoch variable 2023-06-08 18:47:17 -06:00
Alex 66e14c586c Update xml_cdr.php (#6749) 2023-06-08 16:57:06 -06:00
Alex 475cf4d253 Fixed more php 8.1 errors (#6748)
* Update call_center_queue_edit.php

* Update number_translation_edit.php

* Update database_transactions.php

* Update xml_cdr_extension_summary.php

* Update call_flow_edit.php

* Update contact_address_edit.php

* Update device_profiles.php
2023-06-08 16:07:01 -06:00
fusionate a07e7af955 Streams: Updates for PHP 8.1 2023-06-08 20:57:33 +00:00
fusionate ec40d59152 Ring Groups: Hide buttons till checkbox checked, Updates for PHP 8.1. 2023-06-08 20:46:57 +00:00
fusionate 9f9021cb69 Recordings: Updates for PHP 8.1 2023-06-08 20:31:36 +00:00
fusionate 0396809b65 Queue - Add: Integrate new toggle switch for Enabled field. 2023-06-08 20:14:43 +00:00
fusionate 6b07e8d168 Phrases: Updates for PHP 8.1 2023-06-08 19:51:18 +00:00
fusionate 4ac06a9194 Operator Panel: Updates for PHP 8.1 2023-06-08 19:32:39 +00:00
fusionate 1b3af9fb36 Operator Panel: Simplify and enhance filter, updates for PHP 8.1. 2023-06-08 19:16:38 +00:00
fusionate fb3d416c76 Event Guard: Fix typo in language value. 2023-06-08 19:15:47 +00:00
markjcrane 557284070a Times the delay by 1000 instead of 500. When using enterprise use originate timeout 2023-06-08 12:44:19 -06:00
fusionate 1e391aad4f MOH: Updates for PHP 8.1 2023-06-08 18:03:37 +00:00
fusionate 2a2a705f6a MOH: Minor visual adjustment to upload form. 2023-06-08 17:44:04 +00:00
fusionate eda0d90eb2 IVR Menu - Edit: Fix delete. 2023-06-08 17:38:22 +00:00
fusionate b49892ab8a IVR Menu - Edit: Update for PHP 8.1 2023-06-08 17:32:55 +00:00
fusionate 83c05beb46 IVR Menu - Edit: Updates for PHP 8.1 2023-06-08 17:26:12 +00:00
fusionate c1dee4cc6a IVR Menu - Edit: Update for PHP 8.1 2023-06-08 17:19:52 +00:00
markjcrane 230579d9a8 Ring group strategy alphabetical and enterprise by default 2023-06-08 11:10:12 -06:00
markjcrane 4ee30460b8 Improved logic elminated 2 queries and update show all 2023-06-08 00:34:16 -06:00
FusionPBX 7331f90d1b Comment the call center dialplan rewrite 2023-06-07 23:42:52 -06:00
Alex 3b2964748a php 8.1 changes (#6747)
* Update ivr_menu_edit.php

* Update call_block.php
2023-06-07 13:31:20 -06:00
FusionPBX 473033257a Exclude switch default settings.
This category is causing errors and is not needed for this code.
2023-06-07 11:43:15 -06:00
FusionPBX 8014b57a0d Update call_center_queue_edit.php more PHP 8.1 changes 2023-06-07 03:04:43 -06:00
FusionPBX 426f09b2b0 Update call_center_agents.php more code refactoring
Changed search to use variable
Integrate search direct into the SQL
Simplify the domain handling for show all
2023-06-07 02:18:50 -06:00
markjcrane b75b0f63e6 Initialize the array before using them 2023-06-06 23:37:09 -06:00
fusionate 8d51e9d948 Menu [Class]: Updates for PHP 8.1 2023-06-06 22:27:16 +00:00
fusionate 992a7e6f62 Menu Item - List: Updates for PHP 8.1 2023-06-06 22:26:58 +00:00
fusionate 16aa7f8d3a Menu - Edit: Updates for PHP 8.1 2023-06-06 22:26:35 +00:00
fusionate 72bb8904be Group - Edit: Updates for PHP 8.1 2023-06-06 22:12:42 +00:00
fusionate addae78ac8 Groups [Class]: Updates for PHP 8.1 2023-06-06 22:12:29 +00:00
fusionate d327d569f5 Misc: Updates for PHP 8.1 (?: to ??) 2023-06-06 22:05:05 +00:00
fusionate 35a52b46c3 Email Templates: Updates for PHP 8.1 2023-06-06 21:52:55 +00:00
fusionate 9a7311b825 Dialplan [Class]: Updates for PHP 8.1 2023-06-06 21:45:44 +00:00
fusionate 4e77106a4c Default Settings: Updates for PHP 8.1 2023-06-06 21:45:02 +00:00
fusionate 4783d2dbcc Domain Settings: Updates for PHP 8.1 2023-06-06 21:44:42 +00:00
fusionate c7e567b2d2 Domain - Edit: Updates for PHP 8.1 2023-06-06 21:44:10 +00:00
fusionate 8e9f28a5e0 Domains [Class]: Updates for PHP 8.1 2023-06-06 21:43:50 +00:00
fusionate 3fddd36858 Databases: Updates for PHP 8.1 2023-06-06 21:19:23 +00:00
AlexandFusionPBX 22a01b147d Fixed call center queue agents table (#6746)
* Update destination_edit.php

* Fixed php 8.1 errors

* Fixed cdr recording download not working

* Update call_center_queue_edit.php

* Update call_center_queue_edit.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-06-06 11:31:22 -06:00
FusionPBX b14fde8eec Remove reference to fax tasks 2023-06-06 10:41:57 -06:00
markjcrane fb0c2829e6 Remove fax_tasks table 2023-06-06 10:38:33 -06:00
markjcrane 047824cad7 Remove Fax tasks as replaced with the fax queue 2023-06-06 10:33:59 -06:00
fusionate 28ebdbc722 CDR: Restore call recording download. 2023-06-06 16:29:09 +00:00
Alex f86abd84c4 Fixed call recording download and call center show all (#6745) 2023-06-06 10:14:15 -06:00
markjcrane 21fc42f12a Remove fax active replaced by fax queue 2023-06-05 21:36:08 -06:00
FusionPBX 3b7020be21 Update domain_settings.php make sure checked is not empty. 2023-06-05 17:46:27 -06:00
FusionPBX 21f2a922d7 Prevent additional PHP 8.1 errors
Make sure $record['checked'] is not empty
2023-06-05 17:44:06 -06:00
FusionPBX 8f59093604 Update app_defaults.php 2023-06-05 17:14:56 -06:00
FusionPBX 6314053331 Removed code from app_config.php 2023-06-05 12:50:21 -06:00
FusionPBX 658281f46d Update app_defaults.php 2023-06-05 12:45:47 -06:00
Alex fb8d0e2983 fix bugs in php 8.1 changes (#6744)
* Update voicemail_greetings.php

* Update recordings.php

* Update recording_edit.php

* Update phrases.php

* Update phrase_edit.php

* Update music_on_hold_edit.php

* Update fax_queue.php

* Update extensions.php

* Update email_templates.php

* Update email_queue_edit.php

* Update dialplan_inbound_add.php

* Update device_profiles.php

* Update device_profile_copy.php

* Update contact_address_edit.php

* Update call_recordings.php

* Update call_center_agent_edit.php

* Update call_center_agents.php

* Update call_center_queues.php

* Update call_block.php

* Update menu_edit.php

* Update default_setting_edit.php

* Update database_edit.php
2023-06-05 12:41:28 -06:00
FusionPBX 791be82f27 Fix PHP 8.1 errors 2023-06-05 12:39:00 -06:00
FusionPBX a0dc490838 Bug fixed for recordings upload. 2023-06-05 11:37:24 -06:00
fusionate ae10573235 Recordings - App Defaults: Minor adjustment to IF statement. 2023-06-04 01:50:54 +00:00
fusionate 59a07e9cc7 Default Settings: Updates for PHP 8.1 2023-06-04 01:50:00 +00:00
fusionate 8965f68c8d Permission Defaults: Updates for PHP 8.1 2023-06-04 01:49:32 +00:00
fusionate 8b5970630e Grandstream Wave: Updates for PHP 8.1, option to view XML data. 2023-06-04 01:46:51 +00:00
fusionate a4a56d06e3 Contacts: Updates for PHP 8.1 2023-06-04 00:51:12 +00:00
FusionPBX f5f3ef680e Set session variables from default settings switch category 2023-06-03 13:43:37 -06:00
FusionPBX bc43f696ca Bug fixed unset the cidr variable 2023-06-03 10:19:42 -06:00
fusionate 079d9ca3d5 Contacts: Updates for PHP 8.1 2023-06-02 23:54:00 +00:00
markjcrane 79df700a81 Few more adjustments for PHP 8.1 2023-06-02 17:52:38 -06:00
AnthonyandFusionPBX 190e13628d Fixed Warnings (#6742)
* Update device_edit.php

* Update dialplan_inbound_add.php

* Update device_vendor_function_edit.php

* Update voicemail_edit.php

* Update voicemail_edit.php

* Update dialplan_inbound_add.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-06-02 17:08:36 -06:00
Anthony c01df877e4 Fixed Warnings (#6742)
* Update device_edit.php

* Update dialplan_inbound_add.php

* Update device_vendor_function_edit.php
2023-06-02 17:08:11 -06:00
Alex 93f85e6ea4 php 8.1 changes (#6741)
* Update dashboard_edit.php

* Update dashboard_edit.php

* Update dialplan_inbound_add.php

* Update dialplan_outbound_add.php

* Update dialplan_inbound_add.php

* Update modules.php

* Update sip_profile_edit.php
2023-06-02 17:01:15 -06:00
FusionPBX d5a4146c57 Fix errors when fax directory isn't set 2023-06-02 16:44:04 -06:00
FusionPBX 51b22069ee Fix errors when the fax directory doesn't exist. 2023-06-02 16:43:12 -06:00
Anthony bf194cddaf Simplified Variables in xml_cdr.php (#6740) 2023-06-02 16:22:26 -06:00
FusionPBX f8662f20a3 Fix the display of the device table header 2023-06-02 15:43:52 -06:00
FusionPBX 951d3f9321 Fix the table header for extension settings 2023-06-02 15:31:55 -06:00
Alex 42ecba0214 voicemail edit, log viewer, and sip status php 8.1 changes (#6738)
* Update voicemail_edit.php

* Update sip_status.php

* Update message.php

* Update log_viewer.php

* Update log_viewer.php

* Update sip_status.php
2023-06-02 14:53:23 -06:00
Anthony fae05e5341 Fixed Warnings for Recordings, Ring Group Edit and Operator Panel (#6739)
* Update ring_group_edit.php

* Update recordings.php

* Update recording_edit.php

* Update content.php
2023-06-02 14:37:30 -06:00
fusionate 150735c810 Conferences: Updates for PHP 8.1 2023-06-02 20:13:47 +00:00
fusionate 37fd554842 Conference Profiles: Updates for PHP 8.1 2023-06-02 20:00:19 +00:00
fusionate e0e59e6110 Conference Controls: Updates for PHP 8.1 2023-06-02 19:47:40 +00:00
FusionPBX 0a4454ac5c Add a description 2023-06-02 13:42:37 -06:00
FusionPBX 911f94b080 Make sure the voicemail directory exists 2023-06-02 13:36:54 -06:00
fusionate 340765af8e Conference Centers/Rooms: Updates for PHP 8.1 2023-06-02 19:26:58 +00:00
Alex 75da594fea extension_settings and domains php 8.1 changes (#6737)
* Update extension_settings.php

* Update extension_setting_edit.php

* Update extension_edit.php

* Update domain_edit.php

* Update domain_json.php

* Update extension_setting_edit.php
2023-06-02 12:43:35 -06:00
fusionate 358c36ef2b Call Recordings: Updates for PHP 8.1 2023-06-02 18:26:50 +00:00
fusionate bc322e5cd6 CDR - Details: Update for PHP 8.1 2023-06-02 18:26:30 +00:00
fusionate 7a0fbaeb8e Call Forward (FM & DND): Updates for PHP 8.1 2023-06-02 17:46:10 +00:00
FusionPBX 7f16f52b8a Correct the logic to use color 2 if 1 is empty
In the array the color 1 is represented with 0 and color 2 is represented with 1
2023-06-02 10:34:42 -06:00
FusionPBX 237b11705a Set empty default setting enabled to false by default 2023-06-02 10:03:48 -06:00
fusionate 1eae3a70e9 Call Flows - Edit: Updates for PHP 8.1 2023-06-02 00:09:59 +00:00
fusionate 4e0713bb18 Call Flows - List: Fix search. 2023-06-02 00:04:55 +00:00
fusionate 0849bf51a0 Call Centers: Updates for PHP 8.1 2023-06-01 23:59:29 +00:00
fusionate be9390795c Call Broadcast: Updates for PHP 8.1 2023-06-01 23:33:32 +00:00
fusionate b4855290de Call Block: Updates for PHP 8.1 2023-06-01 23:22:59 +00:00
fusionate c8e8c5acd7 Functions: Update format_phone() function for PHP 8.1 2023-06-01 23:22:39 +00:00
FusionPBX 408470b1d2 Update app_config.php 2023-06-01 17:20:49 -06:00
fusionate 69900445b5 CDR: Updates for PHP 8.1 2023-06-01 22:55:19 +00:00
fusionate 85f378c8f2 Switch [Resources]: Update outbound_route_to_bridge() function for PHP 8.1 2023-06-01 22:54:50 +00:00
fusionate 8ca359a5f1 TCPDF: Update for PHP 8.1 2023-06-01 22:53:58 +00:00
Alex d6b73cf296 more php 8.1 changes (#6734)
* Update ivr_menu_edit.php

* Update ringbacks.php

* Update call_block_edit.php

* Update call_broadcast.php

* Update call_broadcast_edit.php

* Update call_center_queue_edit.php

* Update call_center_queue_edit.php

* Update call_center_agent_status.php

* Update call_center_queue_edit.php

* Update call_center_agent_edit.php

* Update call_center_queues.php

* Update call_flow_edit.php

* Update call_broadcast.php

* Update call_forward.php

* Update call_broadcast_send.php

* Update conference_rooms.php

* Update conference_centers.php

* Update conference_control_edit.php

* Update conference_control_details.php

* Update conference_profile_edit.php

* Update conference_profile_param_edit.php

* Update conference_profile_edit.php

* Update database_transaction_edit.php

* Update database_transactions.php
2023-06-01 16:39:05 -06:00
Anthony 9c650a29b1 Fixed Errors for Phrases, Recordings, Operator Panel and Music on Hold. (#6735) 2023-06-01 15:21:29 -06:00
fusionate 072d351b8c Dialplan - Edit: Update for PHP 8.1 2023-06-01 20:35:53 +00:00
fusionate e68c2f33a0 Call Forward - Edit: Update for PHP 8.1 2023-06-01 19:00:44 +00:00
Alex 9df57e679d contacts php 8.1 changes (#6730)
* Update contacts_vcard.php

* Update vcard.php

* Update contact_edit.php

* Update contact_view.php

* Update contact_phone_edit.php

* Update contact_address_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relation_edit.php

* Update contact_emails_view.php

* Update contact_addresses_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_import.php

* Update contact_import.php

* Update contact_email_edit.php

* Update contact_url_edit.php

* Update contact_relation_edit.php

* Update contact_note_edit.php

* Update contact_setting_edit.php

* Update contact_attachment_edit.php

* Update contact_edit.php

* Update contact_phones_view.php

* Update contact_note_edit.php

* Update contact_attachment_edit.php

* Update contact_phones_view.php

* Update contact_edit.php

* Update contacts.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_phone_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_edit.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phone_edit.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_view.php

* Update contacts.php

* Update contacts_vcard.php
2023-06-01 11:50:12 -06:00
FusionPBX 7b25e81a8d Update call_forward_edit.php changes for PHP 8.1 2023-05-31 23:52:32 -06:00
FusionPBX 6793ab363f Order by based on delay and then the destination number 2023-05-31 20:21:32 -06:00
FusionPBX 787fec4d5e Change data type follow_me_timeout from text to numeric 2023-05-31 19:59:11 -06:00
FusionPBX 19cdc81be0 Change follow_me_delay data type from text to numeric 2023-05-31 19:53:37 -06:00
volga629-1 bbc6b5d280 Simplified version of uptime for Linux (#6733) 2023-05-31 18:41:35 -06:00
Anthony f0598117ab Fixed Errors for Streams & Ring Groups (#6728)
* Fixed Errors streams.php

* Update streams.php

* Update stream_edit.php

* Update ring_groups.php

* Update tones.php

* Update ringbacks.php

* Update ring_group_edit.php
2023-05-31 11:00:55 -06:00
Alex 410f5e6f68 more php 8.1 changes (#6727)
* Update call_broadcast.php

* Update call_broadcast_edit.php

* Update conference_center_edit.php

* Update call_flows.php

* Update conference_room_edit.php

* Update conference_sessions.php

* Update conference_session_details.php

* Update conference_rooms.php

* Update conference_controls.php

* Update conference_control_edit.php

* Update conference_control_details.php

* Update conference_control_detail_edit.php

* Update conference_profiles.php

* Update conference_profile_edit.php

* Update conference_profile_params.php

* Update conference_profile_param_edit.php

* Update conferences.php

* Update conference_edit.php

* Update conferences.php

* Update conference_interactive_inc.php

* Update contacts.php
2023-05-31 09:11:50 -06:00
Ben 1d23d548d0 Partial php 8.1 changes (#6729)
* Partial php 8.1 changes

* Update extension_settings.php
2023-05-30 17:52:22 -06:00
FusionPBX a93535d990 Calculate the destination delay using the database 2023-05-30 17:19:10 -06:00
FusionPBX d98e054f34 Update follow me delay calculated with the database 2023-05-30 17:12:52 -06:00
FusionPBX 8fff4dc17b Fix the call flow sound and alternate sound 2023-05-30 10:15:19 -06:00
FusionPBX ae817047ef Update call_flows.php
There is a select box to select which field to toggle.
2023-05-30 09:44:01 -06:00
FusionPBX a4ad93632d FAX status busy increment count
It turns out most of the busies are a bad number. So we need to increment the value and eventually stop retrying.
2023-05-30 09:33:24 -06:00
FusionPBX f7dac01eaa Add a default value to toggle_field 2023-05-29 22:08:27 -06:00
fusionate eb45bc2de0 Switch - outbound_route_to_bridge(): Updates for PHP 8.1 2023-05-29 22:44:03 +00:00
fusionate b90894ae84 Fax Log - View: Updates for PHP 8.1 2023-05-29 22:28:33 +00:00
fusionate 195b81faa0 Fax - Logs: Updates for PHP 8.1 2023-05-29 22:28:00 +00:00
fusionate 38e80c6e1e Fax - Files: Updates for PHP 8.1 2023-05-29 22:27:31 +00:00
fusionate 94eadf2382 Fax - Send: Updates for PHP 8.1 2023-05-29 22:27:06 +00:00
fusionate 3f17c98516 Fax - Edit: Updates for PHP 8.1 2023-05-29 22:26:37 +00:00
fusionate 0406eeb14f Fax Server: Updates for PHP 8.1 2023-05-29 22:25:48 +00:00
fusionate 88a966cbcc Fax Queue: Updates for PHP 8.1 2023-05-29 22:25:05 +00:00
fusionate e9281cb0cb Fax [Class]: Updates for PHP 8.1 2023-05-29 22:24:23 +00:00
fusionate f444f651e5 TCPDF: Updates for PHP 8.1 2023-05-29 22:23:40 +00:00
FusionPBX 488b199950 Update user_logs.php for PHP 8.1 2023-05-29 14:31:10 -06:00
fusionate 980286a2e3 Extension - Edit: Update for PHP 8.1 2023-05-29 20:07:53 +00:00
fusionate 140e726414 User Logs - List: Updates for PHP 8.1 2023-05-29 20:05:49 +00:00
fusionate 951340dc1b System Status: Update for PHP 8.1 2023-05-29 19:59:27 +00:00
fusionate c4f44f9ad5 Dashboard - Recent Calls: Updates for PHP 8.1 2023-05-29 19:57:35 +00:00
fusionate c3fda2c09d Dashboard - Missed Calls: Updates for PHP 8.1 2023-05-29 19:57:10 +00:00
fusionate 3a6d3792db Registrations [Class]: Updates for PHP 8.1 2023-05-29 19:48:47 +00:00
fusionate 437024d3ed SIP Status: Updates for PHP 8.1 2023-05-29 19:48:18 +00:00
fusionate 80dd552e15 Registrations: Updates for PHP 8.1 2023-05-29 19:38:09 +00:00
fusionate 2384def111 Registrations [Class]: Updates for PHP 8.1 2023-05-29 19:37:47 +00:00
fusionate c450d10f93 Log Viewer: Updates for PHP 8.1 2023-05-29 19:12:30 +00:00
fusionate b1cf7d7e1d Functions - format_hours(): Adjust minute formatting. 2023-05-29 19:12:11 +00:00
fusionate f4c141f6ef Extension Summary: Updates for PHP 8.1 2023-05-29 18:30:31 +00:00
fusionate 81d19fdce7 XML CDR [Class]: Updates for PHP 8.1 2023-05-29 18:30:07 +00:00
FusionPBX 55124c5313 Remove destination_delay arithmetic
Caused Error on FreeSWITCH enterprise version.

index.lua: attempt to perform arithmetic on global destination_delay (a string value)

Tried casting the value to a number and it still failed.
2023-05-28 11:26:39 -06:00
FusionPBX 607d19ab3e Comment out destination_delay arithmetic
Caused Error on FreeSWITCH enterprise version.

index.lua:747: attempt to perform arithmetic on global destination_delay (a string value)

Tried casting the value to a number and it still failed.
2023-05-28 11:24:36 -06:00
FusionPBX b85e22ea8b Update gswave link and PHP 8.1 updates 2023-05-27 23:06:45 -06:00
markjcrane 56068684ff Convert base64 description in vars to text 2023-05-27 13:30:07 -06:00
markjcrane 2fd25f3621 Vars PHP 8.1 updates 2023-05-27 13:06:32 -06:00
fusionate c92ebd8f0a Active Conferences - Interactive: Adjust Joined and Quiet formatting. 2023-05-27 18:54:43 +00:00
fusionate f432bdc14a Queues - Interactive: Adjust duration formatting. 2023-05-27 18:53:10 +00:00
markjcrane 81f6294a9b When adding a record hide the members and permissions buttons 2023-05-27 12:26:48 -06:00
fusionate 1c4bf2066e Event Guard - Edit: Updates for PHP 8.1 2023-05-27 18:23:38 +00:00
fusionate 5d75490eab Event Guard - Add additional languages. 2023-05-27 18:23:18 +00:00
fusionate 2ca03f5159 Event Guard - List: Updates for PHP 8.1 2023-05-27 18:22:35 +00:00
fusionate 1b35623c59 Event Guard [Service]: Updates for PHP 8.1 2023-05-27 18:22:10 +00:00
fusionate 268dd25f6f Event Guard [Class]: Updates for PHP 8.1 2023-05-27 18:21:53 +00:00
markjcrane 8eb36dc7c2 Clear the group_array between iterations 2023-05-27 12:16:42 -06:00
markjcrane c679165016 Menu: PHP 8.1 updates 2023-05-27 12:00:02 -06:00
markjcrane 283ed042f2 Deprecate email_logs 2023-05-26 22:04:25 -06:00
fusionate 5b79979c41 Email Queue - Delete: Updates for PHP 8.1 2023-05-27 03:40:18 +00:00
fusionate f9dd931caf Email Queue - Edit: Updates for PHP 8.1 2023-05-27 03:39:52 +00:00
fusionate c1980aa241 Email Queue: Add Email Test feature, updates for PHP 8.1 2023-05-27 03:39:27 +00:00
fusionate 0ca497643c Email [Class]: Updates for PHP 8.1 2023-05-27 03:36:58 +00:00
fusionate 65ab2ccada Email Queue: Language additions for Email Test. 2023-05-27 03:36:11 +00:00
fusionate 6670e18e88 Email Queue: Add new email_test.php file. 2023-05-27 03:35:39 +00:00
Alex b4122d04e0 Update number_translation_edit.php (#6726) 2023-05-26 16:32:59 -06:00
Anthony a001f27730 Update voicemail_imports.php (#6724)
* Update voicemail_imports.php
2023-05-26 16:25:07 -06:00
Anthony 164b8b842c Update voicemail_edit.php (#6723)
* Update voicemail_edit.php
2023-05-26 16:17:53 -06:00
Anthony 75ea925753 Update voicemail messages and greetings (#6725)
* Update voicemail_messages.php

* Update voicemail_greetings.php
2023-05-26 16:13:52 -06:00
Anthony f30614baf0 Update voicemails.php (#6722)
* Update voicemails.php
2023-05-26 13:53:41 -06:00
markjcrane 711ca64ad3 Database Transactions PHP 8.1 changes 2023-05-26 13:48:39 -06:00
Alex 3112c9ae18 php 8.1 changes (#6721)
* Update call_flows.php

* Update call_flow_edit.php

* Update call_forward.php

* Update call_forward_edit.php

* Update call_recordings.php

* Update conference_centers.php

* Update default_settings.php

* Update default_setting_edit.php

* Update access_controls.php

* Update number_translations.php

* Update number_translation_edit.php

* Update setting_edit.php

* Update bridges.php

* Update bridge_edit.php

* Update call_broadcast_edit.php

* Update call_broadcast.php

* Update call_block.php

* Update call_broadcast_edit.php

* Update call_center_agent_edit.php

* Update call_center_agent_status.php

* Update call_recordings.php
2023-05-26 11:48:39 -06:00
Alex b939ac2442 call center php 8.1 changes (#6720)
* Update call_center_agents.php

* Update call_center_queues.php

* Update call_center_queue_edit.php

* Update call_center_agent_edit.php

* Update call_center_agents.php
2023-05-26 10:07:25 -06:00
FusionPBX 7979ff145b Use $this->message
Reason for using this message rather than local message variable is that it get changed and the information we want is preserved in the class variable.
2023-05-26 09:55:18 -06:00
markjcrane ad6ed407d7 Devices a few more PHP 8.1 changes 2023-05-26 09:24:02 -06:00
markjcrane 55e506ff99 Update save_setting_xml 2023-05-26 09:03:26 -06:00
markjcrane 54dc9e1970 Remove commented out debug info 2023-05-25 22:08:18 -06:00
markjcrane 9083885b75 Sofia global settings PHP 8.1 2023-05-25 22:04:33 -06:00
markjcrane 29008867d0 SIP Profiles changes for PHP 8.1 2023-05-25 21:20:56 -06:00
fusionate 5677ddfa8a Domains: Updates for PHP 8.1 2023-05-25 22:43:34 +00:00
markjcrane 411e93c4b4 Additional PHP 8.1 changes 2023-05-25 15:44:33 -06:00
fusionate 3adeb15ace CDR Statistics: Updates for PHP 8.1 2023-05-25 21:34:41 +00:00
fusionate 4d8bad9f1a Agent Status: Updates for PHP 8.1 2023-05-25 21:25:23 +00:00
fusionate bf1ccc04b5 Queues - List: Updates for PHP 8.1 2023-05-25 21:09:05 +00:00
fusionate 035ba1b86b Active Conferences: Updates for PHP 8.1 2023-05-25 21:08:30 +00:00
fusionate fd0118206d Queue - Add: Updates for PHP 8.1 2023-05-25 21:00:54 +00:00
fusionate 82c71368cf Dialplans - List: Update for PHP 8.1 2023-05-25 20:57:05 +00:00
markjcrane 89a1668cf6 A few more updates for PHP 8.1 2023-05-25 14:15:19 -06:00
fusionate 711ffac87c Active Call Center - Queue: Updates for PHP 8.1 2023-05-25 19:43:21 +00:00
fusionate 1c54896102 Active Call Center: Updates for PHP 8.1 2023-05-25 19:42:23 +00:00
fusionate 4b86260336 Active Calls: Updates for PHP 8.1 2023-05-25 19:41:42 +00:00
FusionPBX c4a42dda96 Use the email_queue by default 2023-05-25 13:24:23 -06:00
FusionPBX 677aa45a90 Update send_email.lua 2023-05-25 13:23:16 -06:00
markjcrane 47bc97347f Simplify how show all and search 2023-05-25 12:50:11 -06:00
Alex 5bb29763ad php 8.1 changes (#6719)
* Update email_template_edit.php

* Update menu.php

* Update menu_edit.php

* Update number_translations.php

* Update number_translations.php

* Update email_templates.php

* Update email_templates.php

* Update setting_edit.php

* Update call_block.php

* Update call_block_edit.php

* Update email_template_edit.php

* Update call_block.php
2023-05-25 12:38:32 -06:00
fusionate e3dce560cf Device Profile - Edit: Updates for PHP 8.1 2023-05-25 17:46:27 +00:00
fusionate 48e5f4f2f4 Device Profiles - List: Updates for PHP 8.1 2023-05-25 17:46:06 +00:00
fusionate 7ad7701640 Device - Edit: Adjustment for PHP 8.1 2023-05-25 17:42:37 +00:00
fusionate 798001bb23 Device [Class]: Updates for PHP 8.1 2023-05-25 17:41:58 +00:00
markjcrane d0357b6124 PHP 8.1 changes 2023-05-25 10:52:28 -06:00
markjcrane 7d2b43dc15 More PHP 8.1 changes 2023-05-25 10:34:48 -06:00
Alex caea15af15 php 8.1 changes (#6718)
* Update database_edit.php

* Update databases.php

* Update default_setting_edit.php

* Update email_templates.php
2023-05-25 10:18:46 -06:00
markjcrane d964f354db Fix PHP 8.1 warnings 2023-05-25 10:15:56 -06:00
fusionate 09219263e1 Device Vendor Function - Edit: Updates for PHP 8.1 2023-05-25 15:43:36 +00:00
fusionate 35b04ba3a1 Device Vendor Functions - List: Updates for PHP 8.1 2023-05-25 15:43:11 +00:00
fusionate 0e9df92730 Device Vendor - Defaults: Updates for PHP 8.1 2023-05-25 15:42:50 +00:00
fusionate fea5368a74 Device Vendor - Edit: Updates for PHP 8.1 2023-05-25 15:42:19 +00:00
fusionate 7b18e82c32 Device Vendors - List: Updates for PHP 8.1 2023-05-25 15:41:45 +00:00
fusionate 18b6c4b318 Device [Class]: Updates for PHP 8.1 2023-05-25 15:40:59 +00:00
fusionate 6119f7de7d Database [Class]: Update for PHP 8.1 2023-05-25 15:40:20 +00:00
markjcrane 251feddff8 Return this->message variable as array. 2023-05-24 23:00:08 -06:00
markjcrane 65bc00535f Use empty and not empty 2023-05-24 17:42:37 -06:00
Luis Daniel Lucio Quiroz af101bcd7b Fixes PHP fatal error when editing users (#6700)
* Update user_edit.php

Some PHP implementations return a fatal error when in_array() has the second parameter null.

 $_SESSION['authentication']['methods']  is null by default on new installations.
2023-05-24 17:27:06 -06:00
jrmcclean 3b8b771c92 Update install.php (#6699)
* Changed If statement to Switch Case. 
* Added Win option
* Created new Var $php_dir and $cache_location
2023-05-24 17:21:42 -06:00
Alex 9f84d64981 Access controls php 8.1 changes (#6717)
* Update access_control_edit.php

* Update access_controls.php
2023-05-24 17:13:53 -06:00
markjcrane 843b9b4377 Use conditions with empty and not empty 2023-05-24 15:44:54 -06:00
markjcrane 9e5dec8113 Add some minor fixes 2023-05-24 15:39:10 -06:00
fusionate cc44fc47c9 Device - Import: Updates for PHP 8.1 2023-05-24 21:22:16 +00:00
fusionate e0ccb81dd8 Device - Export: Updates for PHP 8.1 2023-05-24 21:21:58 +00:00
fusionate c65d50160e Device - Edit: Updates for PHP 8.1 2023-05-24 20:52:50 +00:00
fusionate 5dbff0ca1c Devices - List: Updates for PHP 8.1 2023-05-24 20:52:26 +00:00
fusionate c026aab073 Device [Class]: Updates for PHP 8.1 2023-05-24 20:52:04 +00:00
frytimo c03ae6e098 Php 8.1 call forward fixes (#6716)
* various PHP 8.1 warning fixes

* various PHP 8.1 warning fixes and create class constants
2023-05-24 10:24:39 -06:00
markjcrane eafa89a624 Fixed require unique username globally or per domain 2023-05-24 10:13:49 -06:00
markjcrane e6a69de549 Send Presence to the for Agent ID 2023-05-23 22:27:58 -06:00
fusionate 7276160030 Time Conditions - Edit: Updates for PHP 8.1 2023-05-24 00:28:55 +00:00
fusionate 66a0d61ad6 Time Conditions - List: Updates for PHP 8.1 2023-05-24 00:28:35 +00:00
fusionate 85314b3a23 Time Conditions [Class]: Updates for PHP 8.1 2023-05-24 00:28:10 +00:00
fusionate a8adf18fcf Dialplans - List: Include Time Conditions app_uuid. 2023-05-24 00:25:52 +00:00
fusionate ad95542c4c Queue - Add: Updates for PHP 8.1 2023-05-23 23:56:52 +00:00
fusionate ac217f1209 Dialplans - XML: Fix Back button after XML save. 2023-05-23 23:56:30 +00:00
fusionate 9227344748 xml_cdr [Class]: Update for PHP 8.1 2023-05-23 20:20:40 +00:00
fusionate fcc9600f83 Dialplan - XML: Updates for PHP 8.1 2023-05-23 20:16:07 +00:00
markjcrane a650ca062a Add transcribe_enabled default false 2023-05-23 13:15:00 -06:00
fusionate cc5b2ba554 Group Permissions: Fix search, filter after submit and PHP 8.1 updates. 2023-05-23 18:53:50 +00:00
fusionate 2cf6e79c2e Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2023-05-23 18:38:57 +00:00
markjcrane 2608f1ffad Return immediately if switch conf dir is empty 2023-05-23 08:22:23 -06:00
FusionPBX 63ccea687c Add setting grandstream_public_mode 2023-05-22 21:58:46 -06:00
markjcrane dbb3e90ace Add smarty modifer in_array 2023-05-22 21:50:15 -06:00
markjcrane 3311363c27 Rename public_mode to grandstream_public_mode. 2023-05-22 21:08:18 -06:00
fusionate dfdcba5a0c Database [Class]: Update for PHP 8.1 2023-05-23 02:42:19 +00:00
fusionate 18f9c7a26f Functions: Update for PHP 8.1 2023-05-22 23:06:07 +00:00
fusionate d0481896ba Destinations [Class]: Updates for PHP 8.1 2023-05-22 23:05:44 +00:00
fusionate a707462979 Destinations - Import: Updates for PHP 8.1 2023-05-22 23:05:25 +00:00
fusionate 9abea834b5 Destinations - Export: Updates for PHP 8.1 2023-05-22 23:05:10 +00:00
fusionate d0b6874f23 Destination - Edit: Updates for PHP 8.1 2023-05-22 23:04:46 +00:00
markjcrane 7ee2b7c4b3 Add parentheses to empty string detection 2023-05-22 16:26:01 -06:00
markjcrane a419fa985b Use isset when empty as it could be numeric. 2023-05-22 16:16:58 -06:00
markjcrane c045bb4705 Add a new fax user group 2023-05-22 10:45:01 -06:00
FusionPBX 54ce2b15c8 field name is singular domain_name 2023-05-21 17:13:11 -06:00
FusionPBX 044932163c After removing natsort add order by domain name 2023-05-21 17:10:43 -06:00
FusionPBX e7730e9e69 Prevent overwriting variables 2023-05-21 16:52:14 -06:00
FusionPBX e0d8574410 Destinations - change negative condition to a positive one.
Usually best use positive conditions rather as they are easier to follow.
2023-05-21 16:19:54 -06:00
FusionPBX efc332aba7 [Bug FIX] Default Setings fix syntax to get the correct values switch settings. 2023-05-21 15:47:59 -06:00
FusionPBX c6e3fd381b Update scripts dir session variable as it was not set in the install
This would break the install and prevent the scripts getting copied to the right location. That had a chain reaction of breaking multiple additional things.
2023-05-21 10:58:05 -06:00
fusionate 67e77560a6 Database [Class]: Updates for PHP 8.1 2023-05-21 01:13:45 +00:00
fusionate d8a6101460 Dialplan - Add: Updates for PHP 8.1 2023-05-20 23:58:13 +00:00
fusionate c9122ded11 Dialplan - Edit: Updates for PHP 8.1 2023-05-20 23:58:01 +00:00
fusionate dc613c7c44 Dialplans - List: Updates for PHP 8.1 2023-05-20 23:57:44 +00:00
fusionate b235f951a1 Dialplan [Class]: Updates for PHP 8.1 2023-05-20 23:57:27 +00:00
fusionate 878e83fc80 Database [Class]: Updates for PHP 8.1 2023-05-20 23:57:07 +00:00
chansizzle 8673208931 add info and question font awesome icons (#6706) 2023-05-20 14:15:09 -06:00
FusionPBX 6fc9312331 Deprecated natsort
One customer 3 domains were missing and after removing this the all domains showed up in the list. Also no longer needed as the front end for the domain list.
2023-05-19 19:07:56 -06:00
fusionate 04746d9e87 Bridge - Edit: Updates for PHP 8.1 2023-05-19 23:48:18 +00:00
fusionate 61bc6c2b5b Bridges [Class]: Updates for PHP 8.1 2023-05-19 23:48:01 +00:00
fusionate 6311514ff6 Bridges - List: Updates for PHP 8.1 2023-05-19 23:47:47 +00:00
Finn 886c609a44 add a robots meta tag to reduce chances of private fusionpbx instances appearing in public Google search results (#6710) 2023-05-19 17:33:12 -06:00
Finn 75fff1c33a add template variables to override DTMF method on certain grandstream devices (#6709) 2023-05-19 17:32:20 -06:00
Anthony d1960cc3e7 Update app_languages.php (#6707) 2023-05-19 16:50:36 -06:00
FusionPBX 3b53247dee Use !isset instead of empty
Reason for this change is empty treats 0 as null.
2023-05-19 16:10:38 -06:00
FusionPBX 25fdc12f18 Strict identical condition required
Otherwise this condition matches a numeric value of 0.
2023-05-19 15:29:38 -06:00
Anthony 672dc9fa4d Corrected translations (#6705)
* Update app_languages.php
2023-05-19 14:52:45 -06:00
Alex c6bf3f50f4 Fix translations (#6704)
* Update app_languages.php
2023-05-19 13:54:10 -06:00
FusionPBX 64a8254aa6 Search agent_id or agent_name to improve flexibility 2023-05-19 11:59:06 -06:00
Ben 9a44cd409e fixed a few translations (#6703) 2023-05-19 10:36:17 -06:00
FusionPBX 8649db18d8 Fax Queue is enabled if the service is enabled
That means this setting is no longer needed.
2023-05-19 09:48:52 -06:00
FusionPBX 62b95fa690 Handle call center variables with a value of _undef_ 2023-05-18 23:41:21 -06:00
markjcrane cf580e6c8c Move failed call detail records to a failed directory 2023-05-18 17:44:36 -06:00
FusionPBX 778b5832be database save method returns result details 2023-05-18 16:29:03 -06:00
Ben d900a7cffc corrected translations (#6698) 2023-05-18 15:37:22 -06:00
Anthony 60adb692ec Corrected translations & added missing translations in core/app_languages.php (#6701)
* Update app_languages.php
2023-05-18 15:36:59 -06:00
Alex 05063e35d2 Update translations (#6694)
* Update app_languages.php
2023-05-18 15:36:17 -06:00
fusionate f8a3d95e83 Upgrade [CLI]: Fix minor language file issue. 2023-05-18 20:25:18 +00:00
FusionPBX f09b7a699f Update ivr_menus.php fix show all 2023-05-18 09:28:42 -06:00
markjcrane 9a97c44952 Fix the provision template list 2023-05-18 01:42:48 -06:00
markjcrane 0dec70827d Change approach for handling the user_uuid 2023-05-18 00:49:20 -06:00
markjcrane 5c7dfe339b Use the database to format the date time with the time zone 2023-05-17 20:41:52 -06:00
markjcrane f1ac3d92dd Destinations more minor changes 2023-05-17 16:32:05 -06:00
markjcrane 10a4ceae65 Default destination type to inbound. Use is_array where it is required 2023-05-17 16:03:36 -06:00
fusionate 74959e69c7 Extension - Import: Updates for PHP 8.1 2023-05-17 21:42:32 +00:00
fusionate 766cf7ef66 Extensions - Export: Updates for PHP 8.1 2023-05-17 21:06:22 +00:00
fusionate ca6ecc8548 Gateway - Edit: Updates for PHP 8.1 2023-05-17 21:01:43 +00:00
fusionate 662d6e71de Gateways [Class]: Updates for PHP 8.1 2023-05-17 21:00:49 +00:00
fusionate c3018b6ae2 Upgrade (CLI): Update for PHP 8.1 2023-05-17 20:43:17 +00:00
fusionate 4bac37850a Upgrade (GUI): Updates for PHP 8.1 2023-05-17 20:37:17 +00:00
fusionate 1618c84e07 Database [Class]: Fix typo. 2023-05-17 20:36:48 +00:00
fusionate c42fd0abdc Menu [Class]: Updates for PHP 8.1 2023-05-17 20:36:14 +00:00
fusionate 9122baa9d7 Modules [Class]: Updates for PHP 8.1 2023-05-17 20:35:45 +00:00
fusionate 86a09e5635 Dialplan - Inbound: Updates for PHP 8.1 2023-05-17 20:35:25 +00:00
markjcrane af8a6991b1 Initialize the array if its empty 2023-05-17 14:18:46 -06:00
markjcrane 3fc342ad3e prevent an error using trim on a value that could a string or an array 2023-05-17 13:38:17 -06:00
markjcrane 6cbf572512 Remove fax_retry.lua supporting FAX Queue only 2023-05-17 12:37:31 -06:00
markjcrane 7d18e3eedc Destinations update for PHP 8.1 2023-05-17 11:31:53 -06:00
markjcrane 6d7e125743 Fix all PHP 8.1 messages for upgrade.php 2023-05-17 10:07:49 -06:00
fusionate 6816921f47 Extension - Edit: Updates for PHP 8.1 2023-05-17 07:02:45 +00:00
fusionate 603199f1d4 Extension [Class]: Updates for PHP 8.1 2023-05-17 07:02:26 +00:00
fusionate 3487b8ae53 persistformvar [Function]: Updates for PHP 8.1 2023-05-17 07:02:02 +00:00
fusionate d853209c3f Token [Class]: Update for PHP 8.1 2023-05-17 07:00:45 +00:00
fusionate a26c953291 Voicemail [Class]: Updates for PHP 8.1 2023-05-17 06:59:40 +00:00
fusionate c6eba58cf7 Extensions - List: Updates for PHP 8.1 2023-05-17 05:26:08 +00:00
fusionate 4c50b6e83a Extension [Class]: Updates for PHP 8.1 2023-05-17 05:25:48 +00:00
fusionate 31f4368851 User - Edit: Updates for PHP 8.1 2023-05-17 05:10:15 +00:00
markjcrane 2afda399e6 IVR Menu code changes for PHP 8.1 2023-05-16 22:55:19 -06:00
fusionate 8bd20b97cd Users [Class]: Updates for PHP 8.1 2023-05-17 04:51:41 +00:00
fusionate d6306c7efd User Settings - Edit: Updates for PHP 8.1 2023-05-17 04:44:43 +00:00
fusionate 1faddafbe1 User Settings [Class]: Updates for PHP 8.1 2023-05-17 04:44:19 +00:00
fusionate ea0c03c3ea User - Edit: Clean up. 2023-05-17 04:43:23 +00:00
fusionate c2776e993f User - Edit: Fix duplicate Language records and Time Zone being deleted. Also updates for PHP 8.1. 2023-05-17 04:05:52 +00:00
fusionate 9465e36b37 Dashboard - Edit: Updates for PHP 8.1 2023-05-17 00:00:40 +00:00
markjcrane 10c39f9bcb Code cleanup to solve a few minor issues 2023-05-16 16:14:39 -06:00
fusionate c827f6bf21 Message [Class] - Fix bug with messages set by static add method. 2023-05-16 21:00:43 +00:00
fusionate f74db00fb1 Dashboard - Edit: Updates for PHP 8.1 2023-05-16 20:51:02 +00:00
Luis Daniel Lucio Quiroz 3f544496b7 DB and protection (#6696)
so this small change has 2 purposes.
first, I found the hard way, that PHP PDO is not always coded with the same criteria between versions and databases.  While PDO PGSQL on PHP 8.x may work, PDO SQLITE on PHP 7.4 may not and so on.. This will make sure that the value there is an integer.

Second, since these two values are taken from the _GET, which is in the URL string, it will protect against "imaginative" users.
2023-05-16 13:05:07 -06:00
fusionate ab29d70f40 Dashboard - Updates for PHP 8.1 2023-05-16 18:55:10 +00:00
fusionate fac4b6bcd0 Token [Class] - Updates for PHP 8.1 2023-05-16 18:54:45 +00:00
fusionate bc34789bdc Permission [Class] - Updates for PHP 8.1 2023-05-16 18:54:27 +00:00
fusionate 3dc38973e1 Authentication [Class] - Updates for PHP 8.1 2023-05-16 18:54:11 +00:00
fusionate f7951324ea Domains [Class] - Updates for PHP 8.1 2023-05-16 18:42:32 +00:00
fusionate a87ae4794e Permission [Class] - Updates for PHP 8.1 2023-05-16 18:41:34 +00:00
jonathanblack1000 70067117f5 Fix time zone setting for domain (#6695)
* Fix time zone setting for domain

Recent updates broke time zone setting for domain settings
2023-05-16 12:40:30 -06:00
fusionate 7d37d7a521 Require - Updates for PHP 8.1 2023-05-16 18:39:41 +00:00
fusionate 8482b6eb46 Footer - Updates for PHP 8.1 2023-05-16 18:39:29 +00:00
fusionate 47e0347195 Logout - Updates for PHP 8.1 2023-05-16 18:38:06 +00:00
markjcrane 155f15a407 Fix CDR paging and minor code changes 2023-05-16 10:07:32 -06:00
markjcrane 7aac235f14 Check if the digit isset and not an empty string. 2023-05-16 00:48:26 -06:00
markjcrane 3cf0334686 Check if the sounds directory exists 2023-05-16 00:36:27 -06:00
markjcrane 6fa40778f7 Need to use empty persistformvar 2023-05-16 00:08:07 -06:00
markjcrane 93b8c4a4f8 Update IVR Menu Edit 2023-05-15 23:51:18 -06:00
markjcrane 74b3ce154c Update file.php minor code improvements 2023-05-15 23:17:37 -06:00
markjcrane 0c585bcb07 IVR Menu fix some errors and prevent some warnings 2023-05-15 23:11:23 -06:00
markjcrane 78bb6ec80c Fix PHP 8.1 ringback errors 2023-05-15 22:53:00 -06:00
markjcrane c5f7e61c82 Update group files prevent null errors. 2023-05-15 22:38:46 -06:00
FusionPBX b8d03a0384 Add absolute_codec_string PCMU,PCMA 2023-05-15 12:11:40 -06:00
FusionPBX 200bd891f3 Update css.php fixed menu_main_background_color_hover 2023-05-13 22:42:43 -06:00
FusionPBX 64c159931c Update database.php strlen replace with isset
Used isset instead of empty because empty treats a numeric value of 0 as empty.
2023-05-13 22:13:40 -06:00
FusionPBX 714add73fb Update css.php favor empty function 2023-05-13 21:28:54 -06:00
FusionPBX 8a449172a0 Update gateway_edit.php 2023-05-13 20:52:18 -06:00
FusionPBX 059aea351e Update gateway_edit.php for PHP 8.1 2023-05-13 20:50:06 -06:00
FusionPBX ce4de56b7c Update gateways.php 2023-05-13 20:46:18 -06:00
FusionPBX 2e270b07f0 Update gateway_edit.php for PHP 8.1 2023-05-13 20:43:39 -06:00
FusionPBX aa52764215 Update gateways.php for PHP 8.1 2023-05-13 20:42:16 -06:00
FusionPBX 67e2d731b5 Update persist_form_var.php 2023-05-13 20:39:46 -06:00
FusionPBX a94c465759 Update gateways.php for php 8.1 2023-05-13 20:23:10 -06:00
FusionPBX 5755ae3f48 Update schema.php for PHP 8.1 2023-05-13 17:31:27 -06:00
FusionPBX 5a82d31502 Update user_setting_edit.php for PHP 8.1 2023-05-13 17:21:54 -06:00
FusionPBX ab2bd0ef5e Update footer.php use the empty function 2023-05-13 17:20:17 -06:00
FusionPBX 01c3ed5c48 Update user_imports.php for php 8.1 2023-05-13 17:02:48 -06:00
FusionPBX 04dc606831 Update user_settings.php 2023-05-13 14:05:41 -06:00
FusionPBX 0035a93d60 Update users.php for PHP 8.1 2023-05-13 13:55:08 -06:00
FusionPBX 445b63ec3a Update dialplan.php to prevent PHP 8.1 warnings 2023-05-13 12:55:33 -06:00
FusionPBX c63ab15768 Update app_defaults.php 2023-05-13 12:40:14 -06:00
FusionPBX 7a8b2b7d79 Update database.php prevent more php 8.1 warnings. 2023-05-13 12:35:17 -06:00
FusionPBX 0162ac42d8 Update domain_json prevent warnings for PHP 8.1 2023-05-13 12:33:21 -06:00
FusionPBX e7ed4fe568 Update domain_setting_edit with improved syntax 2023-05-13 12:13:38 -06:00
FusionPBX 0a37d8c8d5 Code in domain_settings evolving 2023-05-13 11:28:12 -06:00
FusionPBX f6a48235d2 Update domains for 8.1 support 2023-05-12 23:42:41 -06:00
FusionPBX ca43df30f2 Default Settings updated for PHP 8.1 2023-05-12 23:27:19 -06:00
fusionate 2bcfaf27f2 User - Edit: Updates for PHP 8.1 2023-05-13 04:55:04 +00:00
fusionate adfdb7bae5 Functions: Updates for PHP 8.1 2023-05-13 04:53:18 +00:00
fusionate 196125952b Message [Class]: Updates for PHP 8.1 2023-05-13 04:52:43 +00:00
fusionate 2fbd1b238d Dashboard: Updates for PHP 8.1 2023-05-13 04:51:15 +00:00
FusionPBX c1a979a643 dialplan: update for php 8.1 2023-05-12 21:21:32 -06:00
FusionPBX ff2c52eda8 Update domains.php 2023-05-12 20:32:44 -06:00
FusionPBX a4fddc7897 Update authentication.php 2023-05-12 20:30:17 -06:00
fusionate ecf60103a1 Template: Updates for PHP 8.1 2023-05-13 02:29:44 +00:00
FusionPBX 44a46d491b Use !empty in the if statement 2023-05-12 20:24:39 -06:00
FusionPBX e9839e3b30 Refine the authentication ldap class 2023-05-12 19:34:05 -06:00
FusionPBX cd27922ce6 Refine the authentication email class 2023-05-12 19:33:14 -06:00
FusionPBX d9946b0207 Refine the authentication database class 2023-05-12 19:31:26 -06:00
FusionPBX ebf552e448 Refinements for the authentication class 2023-05-12 19:30:29 -06:00
FusionPBX 5c34c991cf Update pdo.php 2023-05-12 18:34:54 -06:00
FusionPBX d10e8bfdd4 Update authentication.php 2023-05-12 17:03:02 -06:00
FusionPBX 3185ed5a92 PHP 8.1 changes 2023-05-12 16:57:07 -06:00
fusionate 11a49bfacd Theme [CSS]: Updates for PHP 8.1 2023-05-12 22:50:24 +00:00
FusionPBX a2bb8e5f90 Limit subquery to one result
This prevent a cardinality error.
2023-05-12 16:22:50 -06:00
Anthony 237603dad0 Update app_languages.php (#6693) 2023-05-12 15:33:39 -06:00
Alex a46c5dbfc9 Update translations (#6688)
* Update app_languages.php
2023-05-12 15:14:59 -06:00
FusionPBX 590faa4e83 Set the export_format
To prevent null and prevent unintended behavior set an empty string to as the default export format.
2023-05-12 14:30:16 -06:00
frytimo 9dc8bcf7e9 Fix xml cdr for PHP 8.1 (#6692)
* fix multiple warnings

* fix multiple warnings

* ensure array key exists

* ensure array key exists

* assign boolean variable for showall in url

* change boolean to show_all instead of showall

* revert some changes. Create default leg value and mos_score

* validate page integer

* revert back to showall from get
2023-05-12 13:28:42 -06:00
FusionPBX 4f60390b34 Check if the tables_exists 2023-05-11 22:33:08 -06:00
FusionPBX 48fb933266 Remove static and use this. 2023-05-11 19:58:09 -06:00
FusionPBX 40d9121c8f Convenient debug info for testing 2023-05-11 19:55:37 -06:00
Anthony ad06162b29 Update app_languages.php (#6690) 2023-05-11 19:13:55 -06:00
FusionPBX ffd9a2c4b5 [bug fix] get the domain from the username (#6691)
* [bug fix] get the domain from the username

When the URL domain doesn't match the user's domain

Authentication can use domain from the username.

username:
user@domain
2023-05-11 18:58:22 -06:00
fusionate 733b206664 Functions: Updates for PHP 8.1 2023-05-12 00:45:09 +00:00
fusionate 1986dc1ae7 Dashboard: Updates for PHP 8.1 2023-05-12 00:44:44 +00:00
Anthony beac6eedeb Update app_languages.php (#6689)
* Update app_languages.php
2023-05-11 16:14:05 -06:00
FusionPBX a9baddb6e0 prevent domain_uuid nil error
If the domain_uuid is null then use a random uuid to prevent an error and allow domain_uuid is null SQL to still run
2023-05-11 13:23:13 -06:00
FusionPBX 2a3d9e8e3d Fix the a mistake in the en-us translation 2023-05-11 11:51:55 -06:00
fusionate 5badf55c3c Authentication [Class]: Updates for PHP 8.1 2023-05-11 13:40:17 +00:00
fusionate c01c2d7d31 Dashboard - Domain Limits: Updates for PHP 8.1 2023-05-11 13:39:40 +00:00
FusionPBX 5dae7314a1 Add project_path and login_destination_url 2023-05-10 23:11:36 -06:00
FusionPBX 663bcf929e Add project_path and login_destination_url 2023-05-10 23:10:44 -06:00
FusionPBX cc77a060e1 Add project_path and login_destination_url 2023-05-10 23:09:43 -06:00
FusionPBX cb32d58f21 Add project_path and login_destination_url 2023-05-10 23:08:57 -06:00
FusionPBX 5cac8f61e7 Use empty and isset 2023-05-10 22:30:42 -06:00
FusionPBX eccae62149 Replace is_array with !empty 2023-05-10 22:25:10 -06:00
FusionPBX 020b1414aa Use empty instead of is_array 2023-05-10 22:22:21 -06:00
FusionPBX 6f554eefa8 Use empty instead of strlen or is_array 2023-05-10 22:18:42 -06:00
FusionPBX 442147391c Change the and to an or and add an isset 2023-05-10 22:11:01 -06:00
FusionPBX b86cd20e8e Use isset instead of is_uuid 2023-05-10 22:01:12 -06:00
FusionPBX a9fbb07a55 Use isset and empty 2023-05-10 21:58:00 -06:00
FusionPBX 9902e823b9 Use empty function for the request username and key 2023-05-10 21:53:39 -06:00
Alex ac38507462 Update translations (#6682)
* Update translations

* Update app_menu.php

* Update app_languages.php
2023-05-10 18:20:44 -06:00
frytimo 872e676f59 Fix missing php tags (#6687)
* fix missing php tags

* fix missing php tags
2023-05-10 18:19:57 -06:00
fusionate dae1cc9909 Dashboard - Caller ID: Updates for PHP 8.1 2023-05-10 23:27:52 +00:00
fusionate 1b460941d5 Dashboard - Ring Group Forward: Updates for PHP 8.1 2023-05-10 23:25:22 +00:00
fusionate f5a508ed0b Dashboard: Updates for PHP 8.1 2023-05-10 23:23:15 +00:00
fusionate 9ec44fed71 Dashboard - System Counts: Updates for PHP 8.1 2023-05-10 23:06:59 +00:00
fusionate c3e0a845d1 Dashboard - Call Forward: Updates for PHP 8.1 2023-05-10 23:05:51 +00:00
fusionate 26595860cc Dashboard - Switch Status: Updates for PHP 8.1 2023-05-10 22:59:49 +00:00
fusionate e7b72de33c Modal [Class]: Updates for PHP 8.1 2023-05-10 22:59:12 +00:00
fusionate 71b14727a7 Dashboard - System Status: Updates for PHP 8.1 2023-05-10 22:40:02 +00:00
fusionate 6d4463a5b7 Auto Loader [Class]: Updates for PHP 8.1 2023-05-10 22:39:48 +00:00
fusionate c894161060 Dashboard - System Status: Updates for PHP 8.1 2023-05-10 22:38:11 +00:00
fusionate 4de76b44f2 Auto Loader [Class]: Updates for PHP 8.1 2023-05-10 22:37:47 +00:00
fusionate 80ce576ea5 Dashboard - Missed Calls: Updates for PHP 8.1 2023-05-10 22:34:27 +00:00
fusionate c391faccfc Dashboard - Recent Calls: Updates for PHP 8.1 2023-05-10 22:32:44 +00:00
fusionate 8f50a96d51 Dashboard - Voicemails: Updates for PHP 8.1 2023-05-10 22:27:19 +00:00
fusionate 198ee84d9a Dashboard: Updates for PHP 8.1 2023-05-10 22:23:22 +00:00
fusionate 8021a71647 Menu [Class]: Updates for PHP 8.1 2023-05-10 22:17:19 +00:00
fusionate 43961ec6f2 Message [Class]: Update for PHP 8.1 2023-05-10 22:02:13 +00:00
fusionate bac9c83f33 Modal [Class]: Update for PHP 8.1 2023-05-10 21:58:51 +00:00
fusionate 46ff8cb278 Message [Class]: Update for PHP 8.1 2023-05-10 21:58:37 +00:00
FusionPBX 15e11da84b Redirect to login
login.php has been deprecated.
2023-05-09 22:27:09 -06:00
FusionPBX 2d3f623174 Update for PHP 8.1 2023-05-09 18:50:06 -06:00
FusionPBX c57fa0fc39 Update for PHP 8.1 2023-05-09 18:39:24 -06:00
FusionPBX 32672b7472 Update for PHP 8.1 2023-05-09 17:11:55 -06:00
FusionPBX 821720db1d Update for PHP 8.1 2023-05-09 17:06:19 -06:00
fusionate be4bf7fa7f Bridges - List: Update for PHP 8.1 2023-05-09 22:52:32 +00:00
fusionate 5f2a3fde90 Button [Class]: Update for PHP 8.1 2023-05-09 22:52:04 +00:00
Ben 5811b3d377 Added traslations (#6685) 2023-05-09 14:48:32 -06:00
Ben 42936ca6fa added translations (#6686) 2023-05-09 14:48:00 -06:00
Ben f28fa76890 added traslation for ro-ro and a few minor corrections (#6684) 2023-05-09 14:47:12 -06:00
Anthony 3404a997ac Updating core/users/app_languages.php (#6683)
* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php
2023-05-09 13:19:10 -06:00
Ben 017c58e44c added ro-ro translations (#6680) 2023-05-09 11:51:22 -06:00
Ben 0ed58954e3 Updated translations (#6681) 2023-05-09 11:50:58 -06:00
Alex 3e0ec8b752 Add missing translations (#6673) 2023-05-09 11:39:02 -06:00
FusionPBX 55dc76f099 Provide default values 2023-05-09 11:36:39 -06:00
FusionPBX b732c0afe9 [Bug] value of 0 treated as empty
When empty is used its treating 0 as an empty value and then the value is set to null.  Will work on the changes further to prevent this problem.
2023-05-09 11:14:41 -06:00
FusionPBX 13d73a33e2 If the group is null set to 0 2023-05-09 09:50:16 -06:00
FusionPBX 43d33fb121 Remove smarty php cache 2023-05-09 09:13:40 -06:00
Ben 0880485e73 added translation (#6678) 2023-05-09 08:44:41 -06:00
FusionPBX bc0c2ea588 $db variable needed by schema class 2023-05-09 08:39:42 -06:00
FusionPBX 89af27e94e Update button.php 2023-05-08 23:03:00 -06:00
FusionPBX 06bbdec276 Update for PHP 8.1 2023-05-08 22:55:00 -06:00
FusionPBX 9e4e8558e5 Remove debug 2023-05-08 22:30:39 -06:00
Ben 651c8ba971 updated translations (#6679) 2023-05-08 19:11:11 -06:00
FusionPBX fd0615587e Update require.php 2023-05-08 19:02:58 -06:00
FusionPBX 0413b998e8 Ensure PROJECT_ROOT is defined 2023-05-08 18:50:32 -06:00
FusionPBX edb12399ce Add not empty debug 2023-05-08 17:21:52 -06:00
Anthony 1c6c542d15 Update app_languages.php (#6676)
* Update app_languages.php

* Update app_languages.php
2023-05-08 16:30:50 -06:00
Ben e69a509b9d Added translations (#6677) 2023-05-08 16:30:15 -06:00
FusionPBX 26e3a0881d Error reporting for user hide deprecated 2023-05-08 15:07:59 -06:00
FusionPBX a1cea6bf56 Set dialplan_continue false 2023-05-08 14:36:35 -06:00
FusionPBX 46e3c9dc48 Upgrade: Fix PHP 8.x issue 2023-05-08 14:22:48 -06:00
FusionPBX 2c9f6a157a Enable database authentication by default
If no authentication settings are enabled it also defaults to database authentication.
2023-05-08 12:10:44 -06:00
Anthony cb30f00513 Update app_languages.php (#6674) 2023-05-08 11:52:46 -06:00
Anthony 600c2b3a7e Update app_languages.php (#6675) 2023-05-08 11:52:20 -06:00
markjcrane 423606631b Update version of smarty to 4.3.1 2023-05-08 09:50:42 -06:00
fusionate 28e6cb9b48 Upgrade: Fix PHP 8.x issue on str_replace function in app_defaults.php. 2023-05-08 13:24:29 +00:00
fusionate decebec7db Call Centers: Fix PHP 8.x issue on explode function in app_defaults.php. 2023-05-08 13:23:07 +00:00
fusionate 8ddbe07d3d PDO: Fix PHP 8.x issue on explode function. 2023-05-08 13:21:10 +00:00
fusionate 2047921cde Dashboard - Switch Status: Fix Registrations count error when no registrations. 2023-05-08 13:12:20 +00:00
FusionPBX b9670cf385 Correct the dialplan detail order
The difference between a 1 and a 0 can sometimes be amazing.
2023-05-06 21:00:48 -06:00
FusionPBX eb84bf476b Add hangup_after_bridge and continue_on_fail
Add both of these variables when using destination bridge application.
2023-05-06 20:38:01 -06:00
FusionPBX d9cc3314d3 Add favicon (#6671)
* Add favicon

* Update totp_secret.htm

* Update totp.htm

* Update login.htm

* Update email.htm

* Update totp.php

* Update ldap.php

* Update email.php

* Update database.php
2023-05-06 18:31:48 -06:00
FusionPBX a866875383 Allow login with email authentication 2023-05-06 14:45:25 -06:00
FusionPBX 3aa5024cb2 Allow login with email authentication 2023-05-06 14:44:30 -06:00
FusionPBX eeef486384 Allow login with email authentication 2023-05-06 14:43:20 -06:00
FusionPBX 0757c79271 Allow login with user email. 2023-05-06 14:40:21 -06:00
Alex 09d953c4dd Update app_languages.php (#6668) 2023-05-06 13:13:11 -06:00
FusionPBX 2bc91f2612 Auto create TOTP secret (#6670)
* Auto create TOTP secret

Auto create TOTP secret after successful database authentication when the TOTP secret has not been set.
2023-05-06 12:24:26 -06:00
Anthony fddafec0b6 Update app_languages.php (#6667) 2023-05-05 16:01:00 -06:00
Alex 10a2d87ee6 Add missing translations (#6662)
* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php

* Update app_languages.php
2023-05-05 15:22:22 -06:00
Anthony e37b930b07 Update app_languages.php (#6666) 2023-05-05 15:21:50 -06:00
FusionPBX 0038395009 If numeric then don't need to escape
Numeric should be safe as a pass thru.
2023-05-05 13:23:44 -06:00
FusionPBX b40005c11e Account for numbers 2023-05-05 13:18:15 -06:00
jonathanblack1000 0f3b212586 Fix sort on call broadcast display (#6663)
* Fix sort on call broadcast display

* Grandstream Template Updates

For grp/gxp, added settings for intercom auto answer and multicast paging
For gxw42xx - Added off-hook auto-dial settings to all lines
For wp820 - Fixed incorrect P-codes and added setings for wifi roaming
Contributed new template for gxv3480
2023-05-05 11:23:41 -06:00
fusionate 8614f617a2 Undo: Gateways: Convert State to string to escape function. 2023-05-05 17:02:24 +00:00
fusionate f29a78a6af Functions: Adjust escape function to handle non-strings (XML objects). 2023-05-05 17:00:39 +00:00
fusionate 6e7c50cba5 Gateways: Convert State to string to escape function. 2023-05-05 16:50:57 +00:00
fef8165be2 Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated

* Passing null to parameter #1 ($string) of type string is deprecated

* php 8.1 fixes

* php 8.1 fixes - replace strlen($var) > 0 with !empty($var)

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - strlower with null

* php 8.1 fixes - strreplace with null

* php 8.1 fixes - passing null to base64_decode

* php 8.1 fixes - check for false and check for null on $this->dir

* php 8.1 fixes - remove assignment of $db variable to modules object

* php 8.1 fixes - avoid sending null to substr

* php 8.1 fixes - change ${var} to {$var}

* php 8.1 fixes - check for null before preg_replace

* php 8.1 fixes - remove setting db variable on domains object

* php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null

* php 8.1 fixes - set empty string if $_REQUEST['show'] is not available

* php 8.1 fixes

* php 8.1 fixes - correct $_POST checking syntax

* php 8.1 fixes - correct $_POST variables

* php 8.1 fixes

* Use brackets consistently

* Update user_setting_edit.php

* Change to not empty

* Update device.php

* Update text.php

---------

Co-authored-by: Tim Fry <tim@voipstratus.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-05 10:46:37 -06:00
FusionPBX ebbb2f1a72 Add additional languages 2023-05-03 22:50:18 -06:00
FusionPBX 93d1e1259a Call broadcast minor update 1.1 2023-05-03 17:42:55 -06:00
FusionPBX 37cbb7e847 Update call_broadcast_edit.php 2023-05-03 17:40:40 -06:00
FusionPBX 33fd5e8fa3 Change to Phone Numbers 2023-05-03 17:33:29 -06:00
FusionPBX 7f37607b4e Update the permissions 2023-05-03 17:29:47 -06:00
FusionPBX 712018cb19 Use the permissions when saving data 2023-05-03 17:28:19 -06:00
frytimo 37646c0893 Frytimo pr remove unused variables and fix clobbering (#6656)
* config->exists returns true or false but no action taken and variable
is unused

* remove unused variable db_type

* remove unused variable db_name

* remove unused variable db_username

* remove unused variable db_password

* remove unused variable db_secure

* remove unused variable db_cert_authority

* remove unused variable db_host

* remove unused variable db_path

* remove unused variable db_port

* remove unused variable db. The upgrade method never uses the db variable
and instead uses a new database connection each time.

* remove uninitialized parameters variable

* domain_count never used

* variable context is never used in the method or any app_defaults

* variable $row is clobbered by inner foreach loop

* variable domain_name is never used in method scope

* variable domain_array seems to be uninitialized in this scope so set an
empty string value so function lower_case is not receiving null.
2023-05-03 14:41:39 -06:00
FusionPBX 82810fbcb3 Re-add missing icon and order 2023-05-03 14:25:49 -06:00
Ben 9119a1bd65 Added languages and translations Turkish, Greek, English-GB (#6650)
* Added languages and translations Turkish, Greek, English-GB
2023-05-03 13:50:53 -06:00
jonathanblack1000 824f4257e0 Fix Call Broadcast file upload (#6661)
Fixed file import. Previously would import with \n separator instead of \r\n (in PHP 7.1), which breaks dialing.
2023-05-03 13:10:36 -06:00
FusionPBX bc255fba73 Update Arabic translation for email queue 2023-05-03 12:52:47 -06:00
markjcrane 14f6dee027 Add additional translations 2023-05-03 12:49:04 -06:00
frytimo a258a067a5 restore any missing default groups when permissions are restored (#6657) 2023-05-03 11:35:59 -06:00
BenandFusionPBX a802e275f6 Addedlanguages and translations for Turkish, German-CH (#6651)
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-03 11:27:35 -06:00
BenandFusionPBX 719163331a added German-ch and Turkish language and translations (#6652)
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-03 11:13:35 -06:00
frytimo 1c6c903709 Frytimo pr fix headers already sent (#6655)
* remove space causing headers already sent

* remove space causing headers already sent
2023-05-03 11:10:17 -06:00
Anthony c742f4e03e Update app_menu.php (#6660)
* Update app_menu.php
2023-05-03 11:05:26 -06:00
Anthony 6c8c6085cb Update app_menu.php (#6659)
* Update app_menu.php
2023-05-03 11:00:35 -06:00
Alex 19963168d3 Update app_menu.php (#6658)
* Update app_menu.php

* Update app_menu.php
2023-05-03 10:56:54 -06:00
markjcrane 1513bd3301 Add Chinese, Korean, and Japanese translations 2023-05-03 10:36:25 -06:00
markjcrane 28fe89066e Add Chinese, Korean, and Japanese translations 2023-05-02 22:05:16 -06:00
markjcrane 381b3bdd9f Add menu translations 2023-05-02 20:30:13 -06:00
markjcrane 41e87e7f01 Add additional languages 2023-05-02 20:22:44 -06:00
FusionPBX 5a3b35cb83 Add additional languages (#6654) 2023-05-02 16:12:06 -06:00
Ben 2d592027fb Added Turkish and Greman-ch language (#6653) 2023-05-02 16:11:19 -06:00
Ben 4c01af52f0 Added Greek and Turkish language and translations (#6649) 2023-05-02 12:05:56 -06:00
FusionPBX f313d06bdd Add additional translations 2023-05-01 21:25:25 -06:00
FusionPBX f12384b282 Add additional translations 2023-05-01 21:16:25 -06:00
FusionPBX 4051b1d4e0 Add additional translations 2023-05-01 21:05:56 -06:00
FusionPBX ad6c7415a6 Add additional languages 2023-05-01 21:03:56 -06:00
FusionPBX dc7d596ace Add additional translations 2023-05-01 21:02:16 -06:00
FusionPBX 915b8d3fe6 Minor update to be more consistent 2023-05-01 20:57:21 -06:00
FusionPBX afe9a412c6 Add additional languages 2023-05-01 20:54:22 -06:00
FusionPBX bc4ed0c8c1 Add additional languages 2023-05-01 20:51:40 -06:00
FusionPBX 30758cfd4c Add missing languages 2023-05-01 20:48:35 -06:00
FusionPBX f61ee80185 call_direction dialplan add condition
Don't update the call_direction if already set to inbound.
2023-05-01 10:37:54 -06:00
FusionPBX 501e13eaee Update missing translations. 2023-04-30 22:02:16 -06:00
FusionPBX 5203eae005 Add missing translations 2023-04-30 22:00:36 -06:00
FusionPBX 3a2dcc23e1 Add missing languages. 2023-04-30 21:58:54 -06:00
FusionPBX 0bb2443dc0 Add Asia/Tel_Aviv and Asia/Jerusalem to IDT-3 2023-04-30 15:41:59 -06:00
FusionPBX 4c0f1ce46f Update Asia/Jerusalem from IDDT to IDT 2023-04-30 15:15:39 -06:00
FusionPBX 2f7cb99e00 Add missing languages 2023-04-30 00:23:41 -06:00
FusionPBX 66322d63d9 Update app_languages.php 2023-04-30 00:10:36 -06:00
FusionPBX a384772c07 Update app_languages.php 2023-04-30 00:08:33 -06:00
FusionPBX 5b9e9f54a8 Add missing languages 2023-04-29 23:51:25 -06:00
FusionPBX 55313a34a0 Add missing translations 2023-04-29 23:47:52 -06:00
FusionPBX 651f6dda3b Update app_languages.php 2023-04-29 23:44:33 -06:00
FusionPBX 532ad89330 Update app_languages.php 2023-04-29 23:41:22 -06:00
FusionPBX ee10e9c23a Fix Ukranian translations 2023-04-29 23:35:26 -06:00
FusionPBX a1167b8f11 Update app_languages.php 2023-04-29 23:32:24 -06:00
FusionPBX acf05f470a Remove broken language characters 2023-04-29 21:45:54 -06:00
Krushali Shah 1f302c903f enable/disable codec settings for all accounts (#6628)
The template for codec enable settings was taking a value as 1 if it was set in the settings. It was not taking the actual value inside it. So I have edited the templates to check the value if it's set to true.
2023-04-29 20:32:04 -06:00
lyleatFusionPBX ff944683b8 Update app_menu.php (#6646) 2023-04-29 18:29:31 -06:00
Anthony 610edaae60 Update app_languages.php (#6640) 2023-04-29 18:26:50 -06:00
fusionate 4c36b41313 Streams: Add missing language translations. 2023-04-29 03:20:04 +00:00
fusionate 365d5ee316 Switch: Add missing language translations. 2023-04-29 01:24:37 +00:00
fusionate 74a7d3b612 System: Add missing language translations. 2023-04-29 01:14:09 +00:00
lyleatFusionPBX 68ebe39481 Update app_menu.php (#6645) 2023-04-28 18:18:54 -06:00
Ben 793940f525 added translations (#6644) 2023-04-28 17:20:59 -06:00
fusionate cea439d213 Time Conditions: Add missing language translations. 2023-04-28 23:14:41 +00:00
Alex ce540fe25b Add missing translations (#6635)
* Update app_languages.php

* Update app_languages.php
2023-04-28 16:11:53 -06:00
Ben de791a2201 Added translations (#6641) 2023-04-28 16:10:31 -06:00
Ben c253e8e975 added translations (#6642) 2023-04-28 16:10:03 -06:00
Ben f4e9069cec added translations (#6643) 2023-04-28 16:09:44 -06:00
Ben 18ff648488 Added translations and Greek (#6638) 2023-04-28 12:03:32 -06:00
Ben 6d05163a21 Added translations and Greek (#6639) 2023-04-28 12:03:06 -06:00
Harry Foster 83af204be1 Honor the default settings for password complexity and strength when copying extensions (#6632) 2023-04-28 11:21:35 -06:00
Ben 3210441627 Added traslations and Greek (#6637) 2023-04-28 11:19:38 -06:00
Ben a86ef65e76 added translations (#6636) 2023-04-28 11:19:08 -06:00
Ben 0b3cc45032 Filled in traslations (#6634) 2023-04-28 11:17:29 -06:00
frytimoandTim Fry 675ace1d9a Fix the quotes in language file (#6633)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-28 08:26:02 -06:00
frytimoandTim Fry 69bd42af05 remove unneeded destruct methods as GC has higher performance (#6631)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-27 20:18:53 -06:00
Alex c0443e4da9 Add missing translations (#6629)
* Add missing translations

* Update app_languages.php
2023-04-27 20:15:26 -06:00
fusionate 4a67359a78 Domain Settings: Implement ability to Duplicate settings. 2023-04-27 21:04:35 +00:00
fusionate 3711bf3664 Default Settings: Minor adjustment to Copy domain select box default. 2023-04-27 21:02:26 +00:00
fusionate b6950a4083 Default Settings: Fix missing Enabled value when duplicating disabled setting(s). 2023-04-27 20:22:30 +00:00
FusionPBX 5cfdccdc2a [bug] base32 encoded TOTP secret
Some applications rejected the TOTP secret. Use the Base2n class to create a better base32 encoded TOTP secret.
2023-04-27 01:14:06 -06:00
FusionPBX b3a0d67ac9 FusionPBX version 5.1.0 RC1 2023-04-26 22:45:01 -06:00
chansizzle 414829383c Add fax_download_view permission (#6605)
* Add fax_download_view permission

Add fax_download_view permission to allow hiding the "File Name (Download)" column on Fax Inbox and Fax Sent pages. Some users prefer hiding this field as they also have the "View" column that they can click on to view and download PDFs of the faxes.
2023-04-26 21:47:45 -06:00
Alex e40749a18b Add missing translations (#6619)
* Update app_languages.php
2023-04-26 21:08:48 -06:00
FinnandFinn ae7c57eb45 Add support for XMLApp to grp2615 provisioning template (#6623)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-04-26 20:44:09 -06:00
frytimoandTim Fry 81d3adbd35 cast string to float for memory usage shell_exec call (#6626)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2023-04-26 20:26:53 -06:00
Ben a9908cb745 Added translations (#6622) 2023-04-26 19:31:20 -06:00
fusionate 333e989221 Tones: Add missing language translations. 2023-04-26 23:12:01 +00:00
fusionate 96d64a0b21 Variables: Add missing language translations. 2023-04-26 23:10:09 +00:00
fusionate 0dcc3892da Voicemail Greetings: Add missing language translations. 2023-04-26 22:46:34 +00:00
fusionate c8b5b58320 Voicemails: Add missing language translations. 2023-04-26 22:36:20 +00:00
fusionate dc327aec6d CDR: Add missing language translations. 2023-04-26 21:55:55 +00:00
Ben 2e50454e1c added languages (#6618) 2023-04-26 15:08:58 -06:00
Ben 3cc543c1e5 added translations (#6621) 2023-04-26 15:08:33 -06:00
FusionPBX 019ca725d8 Remove the seed for srand it is done automatically 2023-04-26 13:40:05 -06:00
FusionPBX 4433737c43 Removed quotes
The quotes are optional and looks a little nicer so they have been removed.
2023-04-26 11:46:53 -06:00
FusionPBX 2973ca1e4d [bug] after moving sanitize remove the original one 2023-04-26 11:28:55 -06:00
FusionPBX b4ccdd244b [bug] error reporting options user, dev, all (#6616)
An enhancement that adds simple options to show what errors to show in the web interface. This also fixes a bug that causes an error in PHP8.
2023-04-26 11:19:45 -06:00
FusionPBX 4859282306 [bug] Allow specific safe variables
This is a bug fix for recent security changes. These particular variables are essential to the SIP profile: record-template.
2023-04-26 10:20:13 -06:00
FusionPBX 4a71d7a49a Add sound_prefix variables 2023-04-25 11:24:17 -06:00
FusionPBX c1f81c963f When language is selected add sound_prefix 2023-04-25 11:10:18 -06:00
FusionPBX 9800311adb Add a more flexible footer value 2023-04-25 01:25:59 -06:00
Luis Daniel Lucio Quiroz 0c28221ae2 Fix adding Faxes (#6614)
$fax_email_outbound_authorized_senders is only filled when fax_extension_advanced permission is set. However, the edit part doesn't verify that sizeof(NULL) creates a fatal error.

Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/fusionpbx/app/fax/fax_edit.php:286 Stack trace: #0 {main} thrown in /var/www/fusionpbx/app/fax/fax_edit.php on line 286

This patch verifies that $fax_email_outbound_authorized_senders is an array before sizeof() evaluates it. You can now add faxes with the fax_extension_advanced disabled.
2023-04-24 21:06:58 -06:00
Mendel 2edfb9a0c2 Update Yealink variables w70b (#6615)
* Update {$mac}.cfg
2023-04-24 21:04:37 -06:00
FusionPBX 225870213b Change the fax dialplan order
Change to 40 is in case people use a fax number that conflicts with outbound routes
2023-04-24 11:58:52 -06:00
FusionPBX d11d4b167d Add option to get the version number 2023-04-24 09:45:48 -06:00
FusionPBX 1b025e0aa2 Update class name FixedBitNotation to base2n 2023-04-23 02:31:44 -06:00
FusionPBX 3c2c1f01f2 Add setup, disable and hide 2023-04-23 01:43:15 -06:00
FusionPBX c270aed781 Add language values for user totp 2023-04-23 01:38:17 -06:00
FusionPBX 0295c17393 Add field user_totp_secret 2023-04-23 01:28:45 -06:00
FusionPBX e405e375f6 Add totp and enhance api key 2023-04-23 01:26:51 -06:00
FusionPBX 81f42a4148 Use the google_authenticator php class 2023-04-23 01:17:22 -06:00
FusionPBX b6542299ba Center the authentication_code 2023-04-23 01:13:55 -06:00
FusionPBX 1058c1bc87 Add google_authenticator PHP class
This class is licensed under Apache version 2.0
2023-04-23 01:11:52 -06:00
FusionPBX 869a1e1350 Create base2n.php
Add an MIT binary to text PHP class
2023-04-23 01:05:46 -06:00
FusionPBX 600d5db942 Use enabled for extensions and domain_enabled for domains 2023-04-21 18:07:45 -06:00
FusionPBX 18430f2abe Change Access Control from domains to providers. 2023-04-21 17:43:34 -06:00
FusionPBX 8e04ade980 Update the polycom digitmap 2023-04-21 12:32:16 -06:00
FusionPBX 929ac552ea Depreaced node_domain
This is handled automatically to make it easier and prevent mistakes
2023-04-21 09:58:08 -06:00
FusionPBX 4718999c9e Remove access_control_nodes node_domain
This is handled automatically to make it easier and prevent mistakes
2023-04-21 09:56:37 -06:00
FusionPBX 121ffe5d3f Remove access_control_nodes node_domain
This is handled automatically to make it easier and prevent mistakes
2023-04-21 09:55:04 -06:00
fusionate 11e01e416d Email Templates: Add Category filter. 2023-04-21 14:03:14 +00:00
FusionPBX 7c10962a5f Add domains automatically to the acl 2023-04-20 23:42:27 -06:00
FusionPBX bba5b22d77 Change talking_clock_date to a global dialplan 2023-04-20 21:12:31 -06:00
FusionPBX 9b7ab3d204 Update 350_please_hold.xml 2023-04-20 21:11:38 -06:00
FusionPBX 840d2dcd31 Change please_hold to a global dialplan 2023-04-20 21:11:05 -06:00
FusionPBX 3771e7af13 Change is_transfer to a global dialplan 2023-04-20 21:09:28 -06:00
FusionPBX 559a963a87 Change cf to a global dialplan 2023-04-20 21:07:02 -06:00
FusionPBX b0f51ebfcd Change att_xfer to a global dialplan 2023-04-20 21:05:37 -06:00
FusionPBX 9b4c6c2e7e Change dx to a global dialplan 2023-04-20 21:03:33 -06:00
FusionPBX 3909f12992 Change call_return to a global dialplan 2023-04-20 21:01:14 -06:00
FusionPBX a8eebe9da6 Make redial a global dialplan 2023-04-20 20:57:01 -06:00
FusionPBX ff958a8c96 Make directory dialplan global 2023-04-20 20:52:39 -06:00
FusionPBX c65b316217 Change to global 2023-04-20 20:47:41 -06:00
FusionPBX 98180d0ea2 Delete 410_freeswitch_conference.xml 2023-04-20 20:35:07 -06:00
FusionPBX d906b8e60d Add a missing required bracket 2023-04-20 16:00:23 -06:00
fusionate c705e8712c Dialplan Manager: Add Context filter to search form. 2023-04-20 21:02:49 +00:00
FusionPBX 8dbd85484e xml.santize allow required variables 2023-04-20 14:20:14 -06:00
FusionPBX c989649176 Make call_privacy dialplan global 2023-04-19 23:50:41 -06:00
FusionPBX 2eea25e108 Make follow-me dialplan global 2023-04-19 23:32:06 -06:00
FusionPBX d4ab968fe2 Update 200_agent_status.xml 2023-04-19 23:22:02 -06:00
FusionPBX 15dae6e74a Update 210_agent_status_id.xml 2023-04-19 23:21:36 -06:00
FusionPBX f8b3649f1b Update 215_agent_status_break.xml 2023-04-19 23:21:05 -06:00
FusionPBX 9cf9d4c332 Update 370_is_secure.xml 2023-04-19 23:09:50 -06:00
FusionPBX b8816c4089 Update 370_tone_stream.xml 2023-04-19 23:08:58 -06:00
FusionPBX 7d58793a37 Update 360_milliwatt.xml 2023-04-19 23:08:14 -06:00
FusionPBX e6acab33ae Update 360_is_zrtp_secure.xml 2023-04-19 23:07:09 -06:00
FusionPBX 4ac9b4ea2c Update 490_do-not-disturb.xml 2023-04-19 23:04:46 -06:00
FusionPBX cb3f458d4e Update 500_call-forward.xml 2023-04-19 23:04:25 -06:00
FusionPBX f51f48646a Make vmain a global dialplan 2023-04-19 22:56:40 -06:00
FusionPBX d5a28f3d91 Make xfer_vm a global dialplan 2023-04-19 22:56:22 -06:00
FusionPBX d29bc2987c Make vmain_user a global dialplan 2023-04-19 22:55:50 -06:00
FusionPBX c6d9b31498 Make echo a global dialplan 2023-04-19 22:55:28 -06:00
FusionPBX 50749f5374 Make delay_echo a global dialplan 2023-04-19 22:55:06 -06:00
FusionPBX 2313d45752 Make hold_music a global dialplan 2023-04-19 22:54:30 -06:00
FusionPBX cb85b66b16 Dialplan send_to_voicemail use global context 2023-04-19 22:46:35 -06:00
FusionPBX 28d323617a Dialplan caller-details use global context 2023-04-19 22:40:06 -06:00
fusionate 18225f82f2 Email Class: Fix typo that effects embedded base64 image attachments. 2023-04-20 01:33:22 +00:00
fusionate f5f6b33676 Dashboard: Change Contract All button label to Collapse All 2023-04-19 22:24:23 +00:00
FusionPBX cd044b35aa Change uuid to app_uuid 2023-04-19 10:38:38 -06:00
FusionPBX ad715d7fbb Update 130_distinctive-ring-local.xml 2023-04-19 10:35:13 -06:00
FusionPBX d674d67143 Add dialplan distinctive-ring-local 2023-04-19 10:31:25 -06:00
FusionPBX 44961e6acb Make call-direction a global dialplan 2023-04-19 09:59:33 -06:00
Norman King 30db2c5a6b remove incorrect whitespace for line_3_hanging_group_mode var (#6612) 2023-04-18 15:40:35 -06:00
Alex 3b2f66a3b8 Update contact qr code (#6613) 2023-04-18 15:39:46 -06:00
FusionPBX 6f489f0cf3 Remove unset removes the session settings 2023-04-18 11:28:24 -06:00
FusionPBX fd20067433 Remove unused login_destination_url 2023-04-18 09:41:25 -06:00
FusionPBX e336cb6999 Remove destination url 2023-04-18 09:40:33 -06:00
FusionPBX a9dc2ec479 Add login form to ldap 2023-04-18 09:36:09 -06:00
FusionPBX 33de786791 Add the logo soure, width and height 2023-04-18 09:23:04 -06:00
FusionPBX 1cebbb7c45 If set use the SESSION username 2023-04-17 22:15:02 -06:00
FusionPBX edb65edeec Update app_config.php 2023-04-17 16:30:35 -06:00
FusionPBX 8498d3edb6 Add default settings authentication methods 2023-04-17 16:04:13 -06:00
FusionPBX 30e75b1288 After sanitize allow ${accountcode} 2023-04-17 15:12:43 -06:00
FusionPBX ca0f5d5363 Use and set the SESSION username 2023-04-17 11:30:27 -06:00
FusionPBX 6bdab612b5 Use the session username when it is set 2023-04-17 11:22:27 -06:00
Antonio Fernandez 6a556e55ad Fixing Yealink T46s codecs in template (#6611) 2023-04-17 11:13:07 -06:00
markjcrane 00801b5b04 Add mutli-factor authentication. 2023-04-16 01:10:39 -06:00
FusionPBX 74f6630df4 Add a comment for the xml library 2023-04-14 22:33:32 -06:00
FusionPBX 61469d8cb9 Add the xml library description 2023-04-14 22:31:13 -06:00
FusionPBX 94288b7e96 Add a description 2023-04-14 22:29:11 -06:00
FusionPBX 050e242a13 Context tag deprecated use context attribute 2023-04-14 15:08:16 -06:00
FusionPBX 3bd64de10b Context tag deprecated use context attribute 2023-04-14 15:07:11 -06:00
FusionPBX 4d3f2e1e0b Add a shutdown function fax send 2023-04-14 12:24:24 -06:00
fusionate 8a3ea373f6 Fax Queue - List: Apply case to Status filter select options, minor layout adjustment. 2023-04-13 21:20:21 +00:00
fusionate f181f533ae Email Queue - List: Apply case to Status filter select options. 2023-04-13 21:19:39 +00:00
fusionate 00fc9c0dda Email Queue - List: Responsive optimizations. 2023-04-13 21:04:26 +00:00
fusionate 1f7f047d58 Fax Queue - List: Responsive optimizations. 2023-04-13 21:04:09 +00:00
fusionate 53acce3369 Fax Queue - List: Apply case to Status column value. 2023-04-13 20:44:16 +00:00
fusionate 757fd38c51 Email Queue - List: Apply case to Status column value. 2023-04-13 20:43:58 +00:00
fusionate 076b69ae93 Email Queue - Edit: Format mutliple To addresses better, Status to select field. 2023-04-13 20:32:54 +00:00
fusionate 9a9cff7ebd Email Queue - List: Truncate long To address values with ellipsis. 2023-04-13 20:32:10 +00:00
fusionate 0356d3ea7e Fax Queue - Edit: Change Status field to select box. 2023-04-13 20:31:13 +00:00
fusionate 3d593b35d1 Theme: Remove width limit on textarea. 2023-04-13 20:30:28 +00:00
fusionate c4ca3313fe Email Queue - List: Limit width of To column. 2023-04-13 18:56:14 +00:00
FusionPBX 2582720028 Add permission domain_select 2023-04-12 18:35:32 -06:00
fusionate 19e58af546 Email Queue Attachments - Add CID and Mime Type fields. 2023-04-12 20:06:41 +00:00
markjcrane 2d2c5fc06e Add email attachment cid and mime type 2023-04-12 14:04:56 -06:00
fusionate a5d2558112 Fax Queue - Added new Sending status to select filter. 2023-04-11 20:25:53 +00:00
FusionPBX d662a641e6 Add fax_status sending
While in sending mode it will not send again. The fax hangup hook will update the status to trying again if the fax fails or is set to failed if it reaches max tries.
2023-04-11 14:01:54 -06:00
FusionPBX 00364f318c Create MN_Generic.cfg 2023-04-11 09:39:20 -06:00
FusionPBX 064bf7204a Update MN_{$mac}.cfg 2023-04-11 09:38:16 -06:00
FusionPBX 67f3bc6808 Add Mitel 5330e 2023-04-11 09:38:04 -06:00
FusionPBX 81f3bdffc9 snom_dialtone_on_hold default to false 2023-04-11 09:34:46 -06:00
FusionPBX 5eca8b1ade snom_dialtone_on_hold default to false 2023-04-11 09:33:23 -06:00
FusionPBX d8634b1fc2 Add default setting snom_dialtone_on_hold
Hold usually should not automatically go to dial tone. Unexpected behavior as most phones don't do this.
2023-04-11 09:31:44 -06:00
FusionPBX dbeb793710 Get the destination_number when needed
If the user doesn't have permission to set the destination_number then get it from the database
2023-04-10 12:09:14 -06:00
emak 800e742387 Disable fax sending when domain is disabled (#6606)
* Add warning_bar style for disabled fax sending

Add styles for .warning_bar class when fax server sending is disabled due to disabled domain.

* Disable fax sending if domain is disabled

When domain is disabled, users should not be able to send faxes either.

* Add text for fax sending disabled warning
2023-04-10 09:31:16 -06:00
FinnandFinn cd0e603521 add a missing import to some of the xml_handling lua scripts. (#6607)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-04-10 09:30:34 -06:00
FinnandFinn 13c25f77c3 Hide field for key subtype when $show_key_subtype is false (#6608)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-04-10 09:29:02 -06:00
FusionPBX 09d5108fb3 Remove polycom functions speed dial
Polycom key functions in their own web interface only show automata and normal.
2023-04-08 13:03:23 -06:00
FusionPBX b9776041c1 xml.sanitize on ivr_menu_option_digits
The sanitize breaks  /^(\d{4})>$/ as removes the $
2023-04-07 13:42:01 -06:00
FusionPBX 3d62b16259 xml.santize removed from direct_dial_regex
This wasn't needed since direct_dial_regex is built from ivr_menu_option_digits that have a statement ensuring they are numeric.
2023-04-07 13:30:30 -06:00
FusionPBX b6012976fb Allow an empty ringback value 2023-04-07 12:36:20 -06:00
FusionPBX 1af129b94f Only include ringback if it has a value 2023-04-07 12:28:27 -06:00
fusionate 36a4768917 MOH: Move None option to Others option group. 2023-04-05 00:39:00 +00:00
fusionate f5e21d8a49 MOH: Add None option. 2023-04-05 00:32:00 +00:00
FusionPBX 005cd93c3e Bug fixed for hold_music for ring groups 2023-04-04 13:53:26 -06:00
FusionPBX 88da43b924 Change name to type and add subtype 2023-04-04 11:08:37 -06:00
FusionPBX 423bcd8aa8 Rename name to type 2023-04-04 10:59:24 -06:00
FusionPBX d704ffa1c9 Remove domain limit
Limit is likely not needed unless someone has a really large number of domains.
2023-04-04 09:56:16 -06:00
FusionPBX 408122c60c Add subtype to vendor functions and device keys. (#6409)
* Add subtype to vendor functions and device keys.

Added to support phones that require a subtype for provisioning the phone.

* Add device_key_subtype

* Update device_edit.php

* Update device_profile_edit.php

* Update device_vendor_edit.php

* Update device_vendor_function_edit.php

* Update device_vendor_functions.php

* Update device_vendor_restore.php

* Update index.php

* Update provision.php

* Update app_languages.php

* Update app_config.php
2023-04-04 08:57:41 -06:00
Antonio Fernandez de08aa6a1d Added support for secondary outbound proxy on Snom D series phones. (#6603) 2023-04-03 20:58:36 -06:00
Luis Daniel Lucio Quiroz 3a8dfca16d SQL query missing toll_allow (#6604)
The SQL query is missing the toll-allow setting from the virtual fax extension. All dialplans that have that condition will fail.
This patch makes sure the variable is present if need it.
2023-04-03 19:14:26 -06:00
FusionPBX 751596cd89 Use CDR list add call block caller ID number 2023-04-03 13:17:42 -06:00
FusionPBX 253635bde4 Disable bxfer-return by default
This returns the call back to the person that tried to do a blind transfer. Enable this dialplan if its a behavior you want.
2023-04-03 11:22:46 -06:00
FusionPBX e2c22776ce Country code note required but highly recommended 2023-04-03 09:44:08 -06:00
FusionPBX a78d3a221e Default to destination_number
Set the default value back to destination_number.  There are cases where ${sip_to_user} and ${sip_req_user} may work better with the SIP diversion header. However seeing issues for some people when not using destination_number. It maintains original behavior so setting it back to the original default.
2023-04-03 02:08:19 -06:00
FusionPBX fe065819af Update grandstream_stun_server value 2023-04-02 22:36:26 -06:00
FusionPBX f657e15b7b Replace duplicated uuid with unique ones 2023-04-02 22:16:14 -06:00
David JacobandFusionPBX f0c1ebd3a1 Provisioning template changes (#6588)
* Provisioning template changes

Grandstream
GAC2500 - Added account sip port to grandstream template after account server name
GRP2612 - Added Variable for grandstream dial timeout
GRP2612 - Added Variable for grandstream lock volume
GRP2612w - Added Variable for grandstream dial timeout
GRP2612w - Added Variable for grandstream lock volume
GRP2613 - Added Variable for grandstream lock volume
GRP2614 - Added Variable for grandstream dial timeout
GRP2614 - Added Variable for grandstream lock volume
GRP2614 - Added Variable for granstream call popup enabled
GRP2615 - Added Variable for grandstream dial timeout
GRP2615 - Added Variable for grandstream lock volume
GRP2616 - Added Variable for grandstream lock volume
GRP26xx - Added Variable for grandstream lock volume
GXP2160 - Changed template to default enable options keepalive
GXP2160 - Added option for multicast listen address with "if isset" for variable on P1569
GXP2160 - Added Variable for grandstream lock volume
GXP2160 - added variable grandstream_weather_enable to enable/disable weather function in phones
GXP2170 - Added Variable for grandstream dial timeout
GXP2170 - Added Variable for grandstream lock volume
GXP2170 - Added Variable for grandstream stun server
GXP2170 - Added Variable for granstream call popup enabled
GXP2170 - Added option for multicast listen address with "if isset" for variable on P1569
GXP2170 - added variable grandstream_weather_enable to enable/disable weather function in phones
GXP3240 - Added account sip port to grandstream template after account server name

HTek
UC903 - Added account sip port to htek template after account server name
UC903 - Added variable to specify account 1 ringtone
UC903 - Added ** as pickup code - Not defined
UC903 - Added variable for screen timeout
UC903 - Enabled call waiting tone P8850 - its off by default for some reason
UC903 - fixed variable P2 to set the admin password on the phone from default settings, was not defined
UC903 - Added variable to change the pc port mode if expansion module needed P231
UC903 - Fixed expansion module key types - not defined
UC923 - Added variable to specify account 1 ringtone
UC923 - Added variable to change the pc port mode if expansion module needed P231
UC923 - Added ** as pickup code - Not defined
UC923 - Added variable for screen timeout
UC923 - Enabled call waiting tone P8850 - its off by default for some reason
UC923 - fixed variable P2 to set the admin password on the phone from default settings, was not defined
UC923 - Fixed expansion module key types - not defined
UC924 - Added variable to specify account 1 ringtone
UC924 - Added variable to change the pc port mode if expansion module needed P231
UC924 - Added ** as pickup code - Not defined
UC924 - Added variable for screen timeout
UC924 - Enabled call waiting tone P8850 - its off by default for some reason
UC924 - fixed variable P2 to set the admin password on the phone from default settings, was not defined
UC924 - Fixed expansion module key types - not defined
UC926 - Added variable to specify account 1 ringtone
UC926 - Added variable to change the pc port mode if expansion module needed P231
UC926 - Added ** as pickup code - Not defined
UC926 - Added variable for screen timeout
UC926 - Enabled call waiting tone P8850 - its off by default for some reason
UC926 - fixed variable P2 to set the admin password on the phone from default settings, was not defined
UC926 - Fixed expansion module key types - not defined

Snom
D735 - Added code given to use by snom to light the BLF green when avail and red when in use

Fanvil

X210 - Added default setting for fanvil blf pickup code
X210 - Added if exist in template for fanvil x210 the pickup code var

* grandstream_stun_server variable already exists

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-04-02 22:12:13 -06:00
FusionPBX 4dbee9b596 Fix bridge statements from recent change
Example bridge statement broken by the sanitize

before
sofia/internal/$1${regex(${sofia_contact(101@dev.local)}|^[^@]+(.*)|%1)}

after
sofia/internal/1{regex({sofia_contact(101@dev.local)}|^[^@]+(.*)|%1)}
2023-03-31 19:00:23 -06:00
FusionPBX 3e0b41ef0f Refactor cidr and number-alias 2023-03-31 18:29:23 -06:00
yois615 7a26c271de [call_recordings] Add destination to view (#6601) 2023-03-31 15:46:31 -06:00
fusionate 120a25e6db [security] Implement Sanitize in XML Handler Scripts 2023-03-31 21:03:21 +00:00
FusionPBX eac6f09832 Update how dialplan_detail_type is sanitized
These detail types are safe: ${sip_to_user} and ${sip_req_user}
2023-03-31 13:34:22 -06:00
FusionPBX abbaccde9d Move xml::santize
Need to preserve ${caller_id_number} and ${strftime(%Y-%m-%d-%H-%M-%S)} so moved the xml::santize
2023-03-31 13:25:42 -06:00
FusionPBX 08fce99db7 Allow sip_to_user and sip_req_user 2023-03-31 11:10:58 -06:00
FusionPBX ab67243911 Add the registration_expires variable 2023-03-30 14:58:09 -06:00
FusionPBX fce7b43c2e Add the registration_expires variable 2023-03-30 14:56:54 -06:00
Ben 737adf44f3 Add registration expiry with register_expires (#6596) 2023-03-30 14:09:00 -06:00
Ben 3a1f3d1feb Add registration expiry with register_expires - corrections (#6597) 2023-03-30 14:08:33 -06:00
Ben b4670b1203 Add registration expiry with register_expires (#6598) 2023-03-30 13:50:07 -06:00
Ben bb4e854198 Add registration expiry with register_expires (#6599) 2023-03-30 13:49:49 -06:00
Ben d1d42eb1d3 Update {$mac}.xml (#6600) 2023-03-30 13:49:25 -06:00
FusionPBX 8165dcc251 Re-add permission voicemail_destinations used
This permission is used by the Destination Select List.
2023-03-30 13:15:52 -06:00
yois615 d92c32764a [database] Handle NULL literal in params (#6581) 2023-03-30 12:50:47 -06:00
Alex 43eb2a5b9d [security] sanitize the xml (#6595)
* Update call_center_queue_edit.php

* fix typo

* Update call_flow_edit.php

* Update conference_center_edit.php

* Update conference_edit.php

* Update destination_edit.php

* Update fax.php

* Update ivr_menu_edit.php

* Update ring_group_edit.php

* Update app_defaults.php

* Update ivr_menu_copy.php

* Update destination_imports.php

* Update app_defaults.php
2023-03-30 12:46:36 -06:00
FusionPBX 3091370f14 Fix the ntp_server setting 2023-03-30 10:56:43 -06:00
FusionPBX e710c20a0d Minor version update to 5.0.10 2023-03-30 09:34:24 -06:00
agree ca36d10121 [security] prevent xml injection and executing switch api cmds (#6594) 2023-03-29 23:24:04 -06:00
FusionPBX de70dd2910 Using for backwards compatibility
Added for more graceful upgrade as people update their menu to use the new dashboard.
2023-03-29 20:50:13 -06:00
FusionPBX 7d31d6958b User log auto white list for limited time.
This is so that temporary IP addresses are not permanently allowed.
2023-03-29 19:13:10 -06:00
Finn 54be67935b Improve error handling when a recording download fails (#6592) 2023-03-29 17:46:51 -06:00
FusionPBX ac129143a7 Add registration expiry with register_expires 2023-03-29 16:59:59 -06:00
FusionPBX 21cdf81256 Remove redundant syslog command 2023-03-28 18:26:34 -06:00
FusionPBX 850beb081b Set global dialplan to global context (#6593)
* Set global dialplan to global context

* Update 530_talking_clock_date_and_time.xml
2023-03-28 14:03:55 -06:00
FusionPBX 14cbce3fdd Add fax_status select list trying and busy 2023-03-28 13:12:30 -06:00
FusionPBX 7800633304 Add label busy and trying 2023-03-28 13:11:16 -06:00
FusionPBX 75fcb46b47 Account for fax_status busy 2023-03-28 13:01:49 -06:00
FusionPBX 7a3c67f6c5 Preserve the fax_result_code and set USER_BUSY 2023-03-28 12:49:46 -06:00
FusionPBX d03fca2970 Always update the fax_status
We want to show fax_status to be updated to show busy if the call was busy.
2023-03-28 12:46:54 -06:00
FusionPBX a1505ea945 Preserve the fax_result_code 2023-03-28 12:23:05 -06:00
FusionPBX 366577891f Do not overwrite the fax_result_code 2023-03-28 12:21:59 -06:00
FusionPBX 2f37571b64 Set fax result text to USER_BUSY 2023-03-28 12:14:57 -06:00
FusionPBX 5c14e0b8cf Update result text to USER_BUSY 2023-03-28 12:11:34 -06:00
markjcrane 1eece9111d Use global context 2023-03-28 11:38:29 -06:00
FusionPBX d07996d9d8 Update context to global 2023-03-28 11:27:41 -06:00
FusionPBX 48c3c11cfc Update context to global 2023-03-28 11:27:18 -06:00
FusionPBX 0b9ea07576 Update context set to global 2023-03-28 11:26:44 -06:00
trideeindhovenandJeroen Hermans fba26b3f84 Better NL translations (#6590)
Co-authored-by: Jeroen Hermans <jeroen@perfectvoip.nl>
2023-03-28 10:24:11 -06:00
trideeindhoven 8c0f8e8505 Keep device vendor when using alternate device (#6591) 2023-03-28 10:23:37 -06:00
FusionPBX d5850f154c Update the array path after removing context tag 2023-03-27 16:49:36 -06:00
markjcrane d31e854488 Finish move context to an extension attribute 2023-03-27 14:28:24 -06:00
fusionate d40c3c76fa Minor code adjustment to previous commit. 2023-03-27 20:27:30 +00:00
fusionate 0f02253e4e SIP Profiles - Edit/Copy: Prevent duplicate names. 2023-03-27 20:22:35 +00:00
markjcrane 4fe99907e1 Move context to an extension attribute 2023-03-27 14:14:36 -06:00
fusionate 9714da4309 Default/Domain/User Settings: Offer select for boolean values. 2023-03-27 17:10:10 +00:00
Luis Daniel Lucio Quiroz 945ff01553 Update app_defaults.php (#6577) 2023-03-24 20:07:16 -06:00
FinnandFinn c1de249792 A few improvements to some grandstream configs + new devices (#6584)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-03-24 20:06:15 -06:00
Antonio Fernandez 5c77562535 New Snom phone support plus fix for older snom model (#6587)
* Added support for privacy_out config parameter

* Added support for Snom M Series KLE Phones/Base

* minor fix to app_config.php
2023-03-24 20:04:54 -06:00
chansizzle e905e7e3c8 upgrade menu sorted (#6586)
Sets the list of menus to upgrade sorted ascending, and leaves 'default' menu as default selected for consistency and ease.
2023-03-24 20:00:52 -06:00
FinnandFinn 8cdcd86ba9 update custom transcription provider for async transcriptions and retry logic (#6583)
Co-authored-by: Finn <finn@acceleratenetworks.com>
2023-03-24 12:43:17 -06:00
frytimo 5e23824940 contacts app_defaults breaks PDO db (#6585) 2023-03-24 09:18:23 -06:00
FusionPBX 051cb01fdc Use the subcategory when refreshing the session
Beset to be specific when using unset to clear values in the session
2023-03-23 21:40:50 -06:00
FusionPBX cedef761a6 FAX Queue retry_limit set to 5 2023-03-22 20:25:21 -06:00
FusionPBX 3247357c5d Remove action == add 2023-03-22 10:01:43 -06:00
FusionPBX 26b0988075 destination_country_code is required 2023-03-22 09:53:28 -06:00
FusionPBX 9e01767688 Update call_block_edit.php 2023-03-21 11:58:29 -06:00
FusionPBX 42ca53567d Re-enable the other destinations
Permission re-added as its used for the destination select list.
2023-03-20 10:33:54 -06:00
fusionate 9c8f4e9060 Event Guard - Fix Unblock multiple checked. 2023-03-17 21:07:35 +00:00
ednt c923293050 Update email_logs.php (#6578)
Due to a change of table field name the SQL generates an postgres error
2023-03-16 22:14:01 -06:00
fusionate c41121a00f Dialplan - Feature code to control agent Break status. 2023-03-16 20:23:39 +00:00
FusionPBX 9a565cdb14 Update send_email.lua 2023-03-16 11:22:14 -06:00
FusionPBX 628592e1af Update daylight savings start and stop dates.
Search engine search term:
daylight savings 2023
daylight savings 2024
2023-03-16 10:44:42 -06:00
FusionPBX e3696871c9 If record_length is not set then still set record path and name
This affected outbound calls in some cases.
2023-03-15 14:48:26 -06:00
FusionPBX 6d114f0d11 Fix outbound call result status 2023-03-15 13:30:53 -06:00
FusionPBX 07280b0754 Regex removed broke call recording 2023-03-13 12:50:52 -06:00
FusionPBX b449bef03e Use preg_replace instead of escape (#6575)
Escape broke auto matching fields use preg_replace instead.
2023-03-10 09:54:49 -07:00
FusionPBX d8a45a5872 Add variable ${caller_id_name} 2023-03-09 18:39:58 -07:00
televoice_pl e91ed6e5a3 Update device.php (#6570)
"cisco spa" check must be before "cisco" otherwise "cisco spa" is ignored
2023-03-09 14:20:24 -07:00
Luis Daniel Lucio Quiroz c4422e65f8 Remove redundant SQL condition (#6573)
In this condition you already have  p.dialplay_uuid = s.dialplay_uuid  and you have p.dialplay_uuid = CONST, no need tor s.dialplay_uuid=CONST,

In small databases, this could be trivial; but in significant databases, this saves a lot of processing.
2023-03-09 14:13:50 -07:00
FusionPBX 801c19da80 Add voicemail_destination view, add, edit and delete 2023-03-09 11:10:48 -07:00
fusionate 98f4ae6bb7 Dialplans: Fix search by dialplan Number. 2023-03-08 16:54:21 +00:00
fusionate 934d653b21 Script - is_local: Add space. 2023-03-03 18:32:23 +00:00
fusionate 731d6d1e47 Domains - Edit: Update Call Center Agent Contact on domain rename. 2023-03-01 22:43:43 +00:00
fusionate 242ceb7ccb Voicemails - List: Additional permission check. 2023-03-01 22:35:44 +00:00
fusionate 49ed64bba9 Voicemails - List: Misc minor adjustments. 2023-03-01 22:13:27 +00:00
fusionate e2c1157227 Voicemail Email: Use (First Assigned) Extension User Time Zone, where set. 2023-03-01 04:04:15 +00:00
fusionate b7e63aff1a Email Queue - Edit: Textarea for Body field. 2023-03-01 03:19:40 +00:00
levishoresandLevi Shores 181998cb37 Yealink blf active variable (#6567)
* Updated blf_active_backlight with variable

* Fixed variable name

---------

Co-authored-by: Levi Shores <levi@dtpartners.com>
2023-02-28 10:24:07 -08:00
fusionate 58f43ba642 Event Guard - Clarify Filter select options. 2023-02-28 17:51:21 +00:00
Daniel CandDaniel c57f8fee22 Fix fax queue selection not sending list and some french translation. (#6565)
* Fix sending selected faxes from the queue

* Fix some french translations

---------

Co-authored-by: Daniel <git@myrandor.com>
2023-02-28 00:00:51 -07:00
zrd740 bc7b6d9529 Added 2 new variables for T54W provisioning (#6560)
Added 2 new variables for changing the idle clock {$yealink_idle_clock} and transparency of the dsskeys {$yealink_idle_dsskey_title_transparency}
2023-02-23 20:28:58 -07:00
fusionate c6cbecc5d5 Upgrade: Toggle checkmarks by row click. 2023-02-23 15:23:00 +00:00
fusionate f6b065085b Dashboard - Missed & Recent Calls: Fix minor inconsistencies. 2023-02-23 14:50:16 +00:00
FusionPBX e72094543a Add key to the name 2023-02-21 20:45:54 -07:00
FusionPBX 99f88edcc3 More specific add key to the name 2023-02-21 20:44:27 -07:00
FusionPBX aa51f96212 Customizable empty rows for device keys (#6561)
* Customizable empty rows for device keys

* New default setting profile_add_rows and profile_edit_rows
2023-02-21 20:27:55 -07:00
FusionPBX 67bfd31765 Fix syntax problem 2023-02-21 19:44:41 -07:00
FusionPBX 2ca41f446b Add user voicemail to menu 2023-02-21 15:47:31 -07:00
FusionPBX eb828db2d7 Minor version update to 5.0.9 2023-02-21 15:17:33 -07:00
demonsporkandFusionPBX 95579ca716 Fix cdr delete for recordings schema change and minor refactoring (#6532)
* Fix cdr delete for recordings schema change and minor refactoring

* Update changes to prevent losing changes.

Also remove trailing spaces

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-02-21 10:38:25 -07:00
frytimo 8e86fe6243 Remove '&' on new (#6559)
Remove '&' on static function new.
2023-02-21 09:39:15 -07:00
fusionate 593b90230e Dashboard - Domain Limits: Default Settings for chart. 2023-02-20 22:28:32 +00:00
fusionate fc7a8106fb Dashboard - Domain Limits: Rework style to match other widgets. 2023-02-20 22:21:54 +00:00
fusionate 2c76741976 Dashboard - Caller ID: Rework style to match other widgets. 2023-02-20 19:49:32 +00:00
FusionPBX e91f78bafe permission exists xml_cdr_domain false 2023-02-20 12:29:32 -07:00
FusionPBX d4458782b8 Change is_group to permission_exists
Use the xml_cdr_domain permission instead of is_group admin or superadmin.
Using the permission is more flexible.
2023-02-20 12:12:43 -07:00
fusionate 29b5b774eb Upgrade: Detect alternate successful response. 2023-02-20 18:43:51 +00:00
FusionPBX cd517ea403 Show the latest 24 hours for CDR statistics 2023-02-18 17:28:15 -07:00
fusionate ecad712b26 Dashboard: Adjust Expand/Contract All button based on widget Hidden state, as well. 2023-02-18 00:18:29 +00:00
fusionate 2d4bd75ac9 Dashboard: Fix Save position without change. 2023-02-18 00:11:36 +00:00
FusionPBX 1d36ca2dc9 Preprend the settings to the email response 2023-02-17 16:58:44 -07:00
fusionate da4f02521f Dashboard - Settings: Fix Enabled state on edit. 2023-02-17 23:53:08 +00:00
FusionPBX c430c5c07f Add email settings to the saved email response 2023-02-17 16:45:52 -07:00
fusionate f027c75aa4 Dashboard - Ring Group Forward: Show chart even without data, hide Save button without data. 2023-02-17 23:17:06 +00:00
fusionate 0334768c30 Dashboard - Ring Group Forward: Rework style to match other widgets. 2023-02-17 23:02:25 +00:00
fusionate a677c6abc3 Dashboard - Call Forward: Add permissions to chart data. 2023-02-17 23:01:40 +00:00
Alex 7326cb845a Set default for enabled (#6556)
* Set default for enabled

* Update conference_profile_edit.php

* Update call_block_edit.php

* Update conference_control_edit.php

* Update conference_control_detail_edit.php

* Update conference_profile_edit.php

* Update conference_profile_param_edit.php

* Update conference_edit.php

* Update destination_edit.php

* Update device_edit.php

* Update device_profile_edit.php

* Update device_vendor_edit.php

* Update email_template_edit.php

* Update extension_edit.php

* Update module_edit.php

* Update phrase_edit.php

* Update ring_group_edit.php

* Update sip_profile_edit.php

* Update stream_edit.php

* Update time_condition_edit.php

* Update var_edit.php

* Update voicemail_edit.php

* Update call_block_edit.php

* Update default_setting_edit.php

* Update domain_setting_edit.php

* Update domain_edit.php

* Update user_edit.php

* Update bridge_edit.php

* Update sip_profile_edit.php

* Update sofia_global_setting_edit.php

* Update call_flow_edit.php

* Update email_template_edit.php

* Update call_flow_edit.php

* Update bridge_edit.php

* Update email_template_edit.php

* Update sip_profile_edit.php

* Update sofia_global_setting_edit.php

* Update bridge_edit.php

* Update call_flow_edit.php

* Update conference_control_edit.php

* Update sip_profile_edit.php

* Update stream_edit.php

* Update default_setting_edit.php

* Update email_template_edit.php

* Update extension_setting_edit.php

* Update default_setting_edit.php

* Update dashboard_edit.php

* Update dashboard_edit.php

* Update default_setting_edit.php
2023-02-17 14:21:41 -07:00
FusionPBX ef866e12d7 Remove code that was commented out 2023-02-17 12:59:22 -07:00
FusionPBX 97dbe7b31a Save the email response (#6558)
* Save the email response

* use the response variable from the email class

* Rename email_debug to email_response

* Update app_languages.php

* Show the email response

* Save the email response
2023-02-17 12:47:11 -07:00
FusionPBX 7dbfd22acb Add email status search trying 2023-02-17 11:55:47 -07:00
FusionPBX bc84d609d0 Update app_languages.php 2023-02-17 11:54:09 -07:00
FusionPBX 712b1e7281 Update xml_cdr_statistics.php (#6557)
* Update xml_cdr_statistics.php

* Build the xml cdr statistics with a query
2023-02-16 22:09:00 -07:00
David Jacob ae98ad2d49 Fix page issue of hold music heard (#6555)
Adding "mintwo" flag will tell the system that there has to be a minimum of two people in the conference to keep it open. This fixes the problem of when a user initiates a *8[ext] to someone and the far end hangs up and the initiator does not hang up the line they will hear hold music till they hang up.  Adding this will disconnect the intercom page if either party hangs up the call.
2023-02-16 15:51:01 -07:00
FusionPBX 5fe06f76c1 Update app_config.php 2023-02-16 11:50:03 -07:00
FusionPBX 7901818eec Update app_config.php 2023-02-16 11:49:05 -07:00
FusionPBX 20ba2acf3c Add provision user_name
User level username for endpoint embedded web server.
2023-02-16 11:42:36 -07:00
fusionate a65c4cc532 Fax Server - List: Better parameter string. 2023-02-15 19:46:54 +00:00
fusionate ee466d69b0 Fax Server - List: Add Show All, fix search. 2023-02-15 19:33:11 +00:00
FusionPBX eab4b53d3a Update {$mac}.cfg 2023-02-15 11:27:35 -07:00
FusionPBX 66695f00c9 Create {$mac}.cfg 2023-02-15 11:26:15 -07:00
FusionPBX f15b012c9f Enable the input_toggle_style by default 2023-02-15 11:04:02 -07:00
Alex a8deadc38c Update ivr_menu_edit.php (#6554)
* Update ivr_menu_edit.php

* Update extension_setting_edit.php

* Update domain_setting_edit.php
2023-02-15 09:52:49 -07:00
FusionPBX 615a776af4 Add database connections and size 2023-02-15 09:51:36 -07:00
FusionPBX aee22fe540 Add databases and database connections 2023-02-15 09:50:47 -07:00
FusionPBX bb5588fe58 Add path, version and size 2023-02-15 09:49:47 -07:00
FusionPBX eda9ee41fb Default settings will override channel variables
These two settings when enabled
- message_caller_id_number 
- message_date_time

Override the following channel variables
- vm_say_caller_id_number
- vm_say_date_time
2023-02-14 18:19:48 -07:00
FusionPBX 9ef904fed1 Backwards comptability for these channel variables
- vm_say_caller_id_number
- vm_say_date_time
2023-02-14 17:33:25 -07:00
agree 4c29c3c4cf [security] import pages xss prevention (#6553) 2023-02-14 15:34:53 -07:00
Alex a229d1e46c Add enabled toggle to more pages and bug fix (#6552)
* Add enabled toggle to more pages and bug fix

* Add device profile enable toggle

* fixed enable on bridge_edit.php

* Fixed enable on call_block_edit.php

* Fixed enable on call_flow_edit.php

* Fixed enable on conference_center_edit.php

* Add conference room enabled toggle

* Fixed enable on conference_control_detail_edit.php

* Fixed enable on conference_control_edit.php

* Fixed enable on conference_profile_edit.php

* Add conference profile param enabled toggle

* Fixed enable on conference_edit.php

* Fixed enabled on device_edit.php

* Fixed enable on extension_edit.php

* Fixed enable on gateway_edit.php

* Fixed enable on number_translation_edit.php

* Fixed enable on phrase_edit.php

* Fixed enable on ring_group_edit.php

* Fixed enable on sip_profile_edit.php

* Fixed enable on stream_edit.php

* Fixed enable on time_condition_edit.php

* Fixed enable on var_edit.php

* Fixed enable on voicemail_edit.php

* Fixed enable on user_edit.php

* Fixed enable on user_setting_edit.php

* Update user_edit.php

* Update bridge_edit.php

* Update call_flow_edit.php

* Update conference_control_edit.php

* Update stream_edit.php

* Fixed enable on default_setting_edit.php

* Fixed enable on domain_edit.php

* Fixed enable on email_template_edit.php

* Fixed enable on module_edit.php
2023-02-14 11:19:02 -07:00
FusionPBX 7afcad0743 Add database information (#6551)
* Add database information

Show the database version.

* Add title-database

* Update app_config.php
2023-02-14 10:30:38 -07:00
fusionate f8f906a29c Dialplan - Wakeup Call: Remove sample rate from path. 2023-02-14 16:48:55 +00:00
fusionate 854802ea7f Recordings - Enable Default/Domain/User setting to control filename prefix and password. 2023-02-14 01:27:37 +00:00
fusionate 0f6ac8920c Dialplan - Wakeup Call: Use dynamic path. 2023-02-14 01:22:48 +00:00
Alex 129d173624 Add enable toggle to more pages (#6549)
* Add bridge enabled toggle

* Update call_block_edit.php

* Add call flows enabled toggle

* Add conference center enabled toggle

* Add conference control detail enabled toggle

* Add conference control enabled toggle

* Add conference enabled toggle

* Add phrase enabled toggle

* Add stream enabled toggle

* Add voicemail enabled toggle

* Add destination enabled toggle

* Add time condition enabled toggle

* Add default settings enabled toggle

* Add domain enabled toggle

* Add email template enabled toggle

* Add module enabled toggle

* Add number translation enabled toggle

* Add sip profile enabled toggle

* Add switch var enabled toggle
2023-02-13 18:02:01 -07:00
fusionate fe616a6ce8 Dialplan - Wakeup Call: Correct sounds_dir variable used in previous commit. 2023-02-14 00:51:37 +00:00
fusionate 9438b6979b Dialplan - Wakeup Call: Remove deprecated pin_number reference. 2023-02-14 00:35:30 +00:00
FusionPBX e1713bfc0b Add text area for email error 2023-02-13 13:21:29 -07:00
FusionPBX 7bca5305ec Add the email error
Log the email error to identify what went wrong with the email.
2023-02-13 13:03:04 -07:00
FusionPBX 8396f1b572 Fix the search and status for paging 2023-02-11 12:00:53 -07:00
Alex 2acda5ea06 Add dashboard, device, extension, and gateway enabled toggle (#6548)
* Update system_counts.php

* Update call_forward.php

* Add dashboard widget enabled toggle

* Add device enabled toggle

* Add extension enabled toggle

* Add gateway enabled toggle

* Update extension_edit.php

* Update extension_edit.php

* Update device_edit.php

* Update gateway_edit.php
2023-02-10 11:14:43 -07:00
FusionPBX ce52b2f750 Change formatting for user and admin password 2023-02-10 10:31:56 -07:00
FusionPBX 7b6774050e Set ivr_menu_enabled default to false 2023-02-10 10:08:54 -07:00
FusionPBX f5afe618e1 Set ring_group_enabled default to false 2023-02-10 09:58:03 -07:00
FusionPBX 9c19eff170 Add toggle ring group enabled 2023-02-10 09:43:14 -07:00
FusionPBX 06949a96d9 Add toggle ivr menu enabled 2023-02-10 09:41:32 -07:00
FusionPBX 1ad7f84011 Add user setting enabled toggle 2023-02-10 09:35:01 -07:00
FusionPBX 2055aff48a Add user enabled toggle. 2023-02-10 09:20:10 -07:00
FusionPBX f14d050979 Don't show null domain_uuid 2023-02-09 16:13:31 -07:00
FusionPBX 9026f3b505 Don't show null domain_uuid
Don't show user logs for login attempts that weren't assigned to a domain. Show null domain_uuid when using show all.
2023-02-09 16:11:41 -07:00
Alex d35c7577bf Fixed call forward chart not showing up (#6547)
Fixed a bug where the chart doesn't show up when all the values are equal to 0.
2023-02-09 13:38:48 -07:00
FusionPBX a727c4c38a Add domain_uuid useful for debug 2023-02-09 12:58:07 -07:00
FusionPBX 9c73670845 Move the fax_queue update before originate
Reason for the change is to make sure the api_hangup_hook lua script update of the email queue doesn't conflict.
2023-02-09 12:40:42 -07:00
FusionPBX f862d65f4b If fax succes is 1 then fax_status set to sent 2023-02-09 12:28:22 -07:00
fusionate 3ea56af2c3 Gateways - List: Show Register value. 2023-02-09 18:36:24 +00:00
denisent 00b5b79886 separating status and hangup permissions (#6522)
* separating status and hangup permissions

Creating a status permission so status can be displayed independently from hangup cause. The combination of status within the hangup permissions has confused some conversations with admins and superadmins.

* separating status and hangup permissions

Creating a status permission so status can be displayed independently from hangup cause. The combination of status within the hangup permissions has confused some conversations with admins and superadmins.
2023-02-08 19:03:40 -07:00
Luis Daniel Lucio Quiroz 9aa88dc537 Make the XML CDR Importer more resilient (#6543)
So I discovered 2 things,

1. If a user adds the default config cdr-field-array with the content of a database field Let's pretend they want to show the xml_cdr_uuid column (for support purposes) - it could be any column, the SQL construction will fail as not Postgresql, Not MariaDB/MySQL allow having a column repeated twice. Adding array_unique() fixes this issue.

2. This one is for developers: If a developer wants to create more columns in the v_xml_cdr table and make them visible in the CDR app, common sense tells to add the default setting cdr-field-array to show it. As the code is now, this will look into the freeswitch variables and overwrite it with NULL. I am adding a condition that verifies if the value has been already assigned, if it is, it won't overwrite it. This allows any developer who may be interested in extending the CDR to simply extend the class without touching it; very handy to keep the original code untouched.
2023-02-08 18:43:25 -07:00
fusionate ea59d3bf58 Conferences - List: Display CDR link in Tools column, if allowed. 2023-02-09 00:30:56 +00:00
FusionPBX 324b720cda Fix the syntax $ needs to inside the variable brackets 2023-02-08 16:28:47 -07:00
fusionate b0c1a74f63 Access Controls - Reload: Clean up. 2023-02-08 22:17:49 +00:00
fusionate 5494a72941 Access Controls - List: Add Reload button. 2023-02-08 21:56:36 +00:00
FusionPBX 1078bacd70 Move database.name add adiditional comments 2023-02-07 22:56:44 -07:00
FusionPBX 78b4651106 Use additional conditions so sqlite will work or postgresql
Also added trim to prevent a trailing space from breaking the dsn string for sqlite.
Also added debug lines helpful for testing.
2023-02-07 22:50:05 -07:00
FusionPBX aacb232fc3 Add debug info and change method to access the table
Changing the method to access the table with dot notation is just a style should work either way.
2023-02-07 22:47:03 -07:00
FusionPBX 09c41b88ef Add contact-params (#6545)
Adding contact params for control over this setting.
2023-02-06 22:24:16 -07:00
fusionate 46854d4025 Voicemail - Edit: Renenable Listen Link option in select, like Extension edit page. 2023-02-06 23:24:49 +00:00
garryavx 7d08ffc53c Update app_config.php (#6544)
changed description to make destination_number a variable, and added warning that you must use a global default setting, domain setting will not work.
2023-02-06 14:49:48 -07:00
markjcrane 87192bd07d Add autoanswer setting to more phones 2023-02-03 16:30:40 -07:00
markjcrane d8f3f698e3 Add settings for autoanswer 2023-02-03 16:17:48 -07:00
fusionate a4c4e4c52a Functions: Modify permission_exists() function to support an array of permissions. 2023-02-03 18:50:56 +00:00
fusionate 658cb83894 Recordings: Display *732 password in description. Permission: record_pin 2023-02-02 21:20:31 +00:00
fusionate a7437be120 Interactive Conference - Add left margin to video icon, like others. 2023-02-02 20:06:40 +00:00
FusionPBX 0a6148bbc4 Use the switch database defined in config.conf 2023-02-01 19:51:33 -07:00
FusionPBX d9ba8b8880 Disable destination_number by default
This dialplan is meant to not record any calls any feature code calls. This means all calls starting with a * prefix.  However if you set the call to record all on the extension wouldn't you expect it to record all calls? Including when picking up a call. Or when intercepting call? or when un-parking a call. Had a someone call that had used a * prefix on an outbound route because they did that this condition prevented the call from being recorded which they didn't expect when the extension was set to record all calls. Tempted to remove it entirely but have instead disabled it by default for now.
2023-02-01 11:39:34 -07:00
FusionPBX 530ba85969 Option to disable dialplan conditions 2023-02-01 11:33:36 -07:00
fusionate f0797aee40 Conferences/Rooms - Edit & List: Make View button/link destination (Interactive or Active Conferences) determined by permissions. 2023-01-31 20:14:32 +00:00
fusionate 2092156157 Active Conferences: Show Conference/Room name and extension numbers. Conferences - Edit: Fix View button. Conferences - List: Add View link. 2023-01-31 19:59:08 +00:00
Alex 3fe43be2a8 Update default chart colors (#6542)
* Update default chart colors

* Update app_config.php

* Update index.php
2023-01-31 11:08:00 -07:00
fusionate a48ba691b4 Dashboard: Show Expand/Contract All button for all user groups. 2023-01-31 02:45:06 +00:00
fusionate 6bc1e53244 Default Settings - Copy: Move function to list view and use copy method in class. 2023-01-31 01:41:43 +00:00
fusionate d04b6db96a Dashboard: Call Forward widget, Edit position without reload, misc adjustments. 2023-01-31 00:19:09 +00:00
FusionPBX ba344fd56b Add option for /usr/share and /usr/local/share 2023-01-29 16:48:25 -07:00
FusionPBX badc0ee6c4 Add option for /usr/share and /usr/local/share 2023-01-29 16:46:39 -07:00
fusionate 5b3cd98a29 Default Setting - Edit: Add Clone button to duplicate setting. 2023-01-29 07:37:38 +00:00
fusionate eca0080b39 Theme: Fix icon reference for Domain button. 2023-01-28 23:06:36 +00:00
FusionPBX e3b600eaff Exclude Call center agent as missed call
The call could have been answered by another call center agent.
2023-01-28 14:49:35 -07:00
fusionate 87716d051d Extension - Edit: Clarify more descriptions. 2023-01-28 21:38:46 +00:00
fusionate 4ba6148f57 Extension - Edit: Add clarity to Max Registrations and Limit Max descriptions. 2023-01-28 21:31:00 +00:00
fusionate 4b7bac9ba1 Extension - Edit: Remove extra line breaks. 2023-01-28 21:18:01 +00:00
fusionate b35aafc391 Dashboard: Click chart to expand/contract details. 2023-01-28 01:52:13 +00:00
fusionate 9f7133ac4f Login: Change destination setting type. 2023-01-28 00:19:00 +00:00
FusionPBX 8a95ff6453 Move the login destination with the other default settings 2023-01-27 17:18:44 -07:00
FusionPBX 2db8d523ff Use a preset uuid for login destination 2023-01-27 17:12:58 -07:00
FusionPBX 49f3aa1fcf Update app_config.php 2023-01-27 17:06:39 -07:00
fusionate 6825825891 Device Profile - Edit: Implement device_key_icon permission on Icon column of Keys. 2023-01-27 22:42:05 +00:00
fusionate 107b8a48f2 Voicemail: Default/Domain Settings to control CID Number and Date & Time playback/order. 2023-01-27 22:17:51 +00:00
fusionate c4b8c7add1 Default/Domain/User Settings - Edit: Change Type field to select box. 2023-01-27 21:50:43 +00:00
FusionPBX 02a9372634 Fix call block search and search by more fields.
Search by new fields.
- call_block_direction
- call_block_app
- call_block_data

Remove search by country code as its type numeric and casting it to text is likely to lower performance.
2023-01-27 13:08:22 -07:00
demonspork a3811128af Support upcoming change in freeswitch - bridge_uuid changes to bridge_uuids array (#6531) 2023-01-27 10:18:35 -07:00
emakandFusionPBX 21b639cd8e user_exists: Add extension_caller_id_name and extension_caller_id_number (#6540)
* Add extension_effective_caller_id_name and extension_effective_caller_id_number

Adds 2 new variables to the user_exists dialplan:

* extension_caller_id_name
* extension_caller_id_number

This allows us to access these channel variables from the event socket and get the caller id name and number of the dialed extension when an inbound call comes in to that extension.

* Update 010_user_exists.xml

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-01-27 10:11:53 -07:00
FusionPBX 433e42d933 Update sv voicemail language 2023-01-26 16:40:45 -07:00
FusionPBX 9a6628b592 Update app_config.php 2023-01-26 11:50:15 -07:00
FusionPBX a46d0856d3 Add new language_destinations permission 2023-01-26 10:34:01 -07:00
FusionPBX 9ae3cf8da3 Add destination languages 2023-01-25 23:08:38 -07:00
FusionPBX e488985708 Add title-languages translations 2023-01-25 22:57:24 -07:00
FusionPBX 9672dcc299 Use /es/mx/maria by default
Copied the wrong one in a previous commit. FreeSWITCH has sound files for es/mx/maria so we will use this by default.
2023-01-25 08:41:42 -07:00
FusionPBX 0279384ed6 Update es.xml 2023-01-25 08:37:24 -07:00
markjcrane 4ad93b421d For spanish use /es/ar/mario by default 2023-01-25 08:36:31 -07:00
fusionate 7dac0db939 Default Settings: Use Reload icon on Reload button. 2023-01-25 15:16:43 +00:00
fusionate 7fc8ad9c77 Default Settings: Change icon on Domain button. 2023-01-25 15:12:20 +00:00
FusionPBX 9781d965ff Added to support the Disabled option 2023-01-24 11:22:57 -07:00
FusionPBX 3bfa2fc525 Added to support the Disabled option 2023-01-24 11:21:49 -07:00
fusionate 8f2e1b0cd1 IVR Menu: Implement Enabled toggle control on Options. 2023-01-23 23:45:57 +00:00
fusionate b393089769 Ring Group - Edit: Set value to FALSE when Destination switch is off. 2023-01-23 22:44:57 +00:00
FusionPBX 14e752197e Minor version change to 5.0.8 2023-01-23 13:48:34 -07:00
fusionate dc1307028a Default/Domain/User Settings: Implement select field for input_toggle_style options. 2023-01-23 19:31:18 +00:00
FusionPBX d31d028a0c Upgrade: Enable ring group destinations by default 2023-01-22 11:19:50 -07:00
fusionate df6bc02489 Ring Groups: Enhance Destination Enabled Switch 2023-01-21 01:30:34 +00:00
581c919132 Add iphone style toggle to enable/disable ring groups destinations #6394 (#6395)
* Add iphone style toggle for destinations in ring groups

* Add iphone style toggle for destinations in ring groups

* only select enabled destination when make ring group calls

* add destination_enable filed in table v_ring_group_destinations schema

* Change destination_enabled value on to true.

* Update app_config.php

* Change destination_enabled from on to true

* Change destination_enabled to boolean

* Delete fix.css

* Will style this

* Update template.php

Co-authored-by: flagman <flagman@flagman.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
Co-authored-by: K-flagman <43560934+kapetrosyan@users.noreply.github.com>
2023-01-20 18:25:13 -07:00
Alex 7d22b514a4 Update index.php (#6539) 2023-01-20 15:01:11 -07:00
FusionPBX c5ebafa893 Add spa_vlan_enable, spa_vlan_id and spa_vlan_pc_id 2023-01-20 11:50:52 -07:00
FusionPBX a527bb5122 Remove cisco spa settings
These settings have been moved to app/cisco/app_config.php
2023-01-20 11:40:17 -07:00
FusionPBX 41ac46b204 Move the cisco spa default settings
Moved to own app/cisco/app_config.php
2023-01-20 11:38:52 -07:00
FusionPBX 28aa3dce38 Add spa_vlan_enable, spa_vlan_id and spa_vlan_pc_id 2023-01-20 11:24:25 -07:00
FusionPBX ec6daa7be0 Add missing required permission. 2023-01-19 16:00:59 -07:00
FusionPBX 62a8b95a16 Use effective_caller_id_name for local caller ID name
A local call does not have caller_id_name set automatically so we need to use effective_caller_id_name
2023-01-19 14:48:18 -07:00
fusionate 2980555287 Call Broadcast: Implement Date/Time Picker for Start Time field. 2023-01-18 22:25:55 +00:00
fusionate f2d98ebcdf Domain Selector: Restore previous click functionality and appearance. 2023-01-18 00:34:34 +00:00
FusionPBX a5c6314861 Remove fail_on_single_reject
For one customer this broke voicemail as it never went to voicemail.
2023-01-17 17:18:59 -07:00
Alex 25cdd2dbda Add details state dashboard widget setting (#6537)
* Update index.php

* Update dashboard_edit.php

* Update app_config.php

* Update app_languages.php
2023-01-17 13:50:44 -07:00
FusionPBX dc3b95da36 Use tabs for indentation 2023-01-17 12:07:35 -07:00
denisent d27fddda45 added missing local voicemail B leg image (#6533) 2023-01-16 21:03:36 -07:00
fusionate 4b52636022 Log Viewer: Update copyright date. 2023-01-17 00:06:01 +00:00
fusionate e8c59469c4 Call Center Agent - Edit: Clarify Announce Sound Description. 2023-01-16 23:44:24 +00:00
fusionate 96ba877a30 CDR: Update copyright date. 2023-01-16 23:10:11 +00:00
fusionate bbcfa128e5 Vars: Update copyright year. 2023-01-16 22:15:46 +00:00
FusionPBX e914fcde5e Fix the fax queue status and search 2023-01-14 15:27:02 -07:00
FusionPBX c29c00dac1 Use $_REQUEST instead of $_POST or $_GET 2023-01-14 15:12:24 -07:00
FusionPBX 0873d67552 Add a link to fax_queue 2023-01-14 15:05:27 -07:00
FusionPBX e5b4f36b4b Add label-queue 2023-01-14 15:04:05 -07:00
FusionPBX a51fba9745 Add permission fax_queue_domain 2023-01-13 18:12:42 -07:00
FusionPBX 3d144e58b0 Show faxes assigned to the user 2023-01-13 18:11:01 -07:00
FusionPBX 3b2e92a67d Use $_SERVER['DOCUMENT_ROOT'] 2023-01-13 14:24:33 -07:00
FusionPBX a28e248867 Use $_SERVER['DOCUMENT_ROOT'] 2023-01-13 14:23:27 -07:00
FusionPBX e1b0f08321 Update the config.conf include 2023-01-13 13:58:06 -07:00
FusionPBX 86b8c2bea6 Update the fax-queue config.conf include 2023-01-13 13:56:34 -07:00
FusionPBX 1aa1467872 Allow inbound_route_view and outbound_route_view permissions 2023-01-11 23:35:29 -07:00
FusionPBX 59129449fd Rebuild the dialplan SQL 2023-01-11 20:21:14 -07:00
FusionPBX dad60ef40a config fs_path convert to boolean
The fs_path setting from config.conf is picked up from the config as a string. The directory.lua code expects the value as boolean so we are converting it to a boolean so it can be used in that way.
2023-01-11 19:52:42 -07:00
denisent 422b41cf8f malformed sql messed up fax server columns (#6535) 2023-01-11 15:04:34 -07:00
FusionPBX bb3b813ce4 Update year range to include years passed
This is needed so that if going back to an old time condition see the year it previously had. This provides opportunity to update or remove the old time condition. This provides time to remove the old setting and not confuse it with new years.
2023-01-09 16:49:18 -07:00
FusionPBX d796eee8a0 Security: validate the user
Safest approach is to validate the user for the current domain.
2023-01-08 11:49:34 -07:00
FusionPBX 60aa8f6ab2 Remove the domain from the user_id 2023-01-08 11:46:57 -07:00
FusionPBX cf69ee46dc Use the call recordings view 2023-01-07 08:44:20 -07:00
Alex 37ab508d1b Update chart.js v3 to v4 (#6529)
* Update chart.min.js

* Update missed_calls.php

* Update recent_calls.php

* Update system_counts.php

* Update system_cpu_status.php

* Update system_status.php

* Update domain_limits.php

* Update voicemails.php
2023-01-06 13:18:53 -07:00
Alex 310d4d00e7 Fix chartjs-adapter-date-fns (#6528) 2023-01-05 15:52:59 -07:00
Alex b43d6f3267 Update chart.min.js (#6527) 2023-01-05 14:54:46 -07:00
Alex bae38f3b65 Update chart.js (#6526)
* Update chart.min.js

* Update chartjs-adapter-date-fns.bundle.min.js

* Update chart.min.js
2023-01-05 14:45:50 -07:00
FusionPBX 0dbbdd000e Create shell_esc.lua 2023-01-04 19:48:36 -07:00
FusionPBX 1e49e686c9 Add additional values to Registrations array
Items added to registrations array
* network-ip
* sip-auth-user
* ping-status
2023-01-04 14:05:16 -07:00
Alex 08a6cdb864 Update system_counts.php (#6525) 2023-01-04 09:42:58 -07:00
Harry Foster 13bcd5d244 Updated device key save to be a submit function for the form. (#6524)
The reason for this is the default behaviour for 'return' or 'enter' is to delete the device entirely. This makes using a barcode scanner impossible, or user error resulting in a lot of lost time.
2023-01-04 09:19:48 -07:00
FusionPBX 2b1b4b9315 Blind transfer on fail return call to sender 2023-01-03 18:34:05 -07:00
FusionPBX 819d7aeb4c Update spandsp 2023-01-02 23:58:38 -07:00
FusionPBX 784bdafccf Use the time zone and format the date 2023-01-02 23:21:40 -07:00
FusionPBX a93bce2ae4 Disable grandstream_enable_call_features
When enabled it breaks ability to dial 72/73/74 or 97/98 and other feature codes
2023-01-02 11:52:08 -07:00
demonspork 7e58f6d773 Fix edge case permissions problem with extension_advanced (#6512)
* Fix edge case permissions problem with extension_advanced
2022-12-31 11:57:41 -07:00
zrd740 7908de0965 Update t41p {$mac}.cfg to correct IPv4 / IPv6 bug (#6516)
I was having an issue where my T41P phones were getting provisioned with IPv4 & IPv6 - even though I specified in default settings yealink_ip_address_mode=0 for IPv4 only. Checked the y000000000036.cfg, which was setting it correctly. The issue was that {$mac}.cfg was overriding the correct setting. There were several instances of "network.ip_address_mode = 2" in this file, which specifies ipv4&ipv6. I changed all 5 of those entries in this file to pull from the default setting {$yealink_ip_address_mode} rather than just setting a static value of 2. I don't know why it has this listed in this file 5 times. But, this change resolved my issue and will force the T41P provisioning to follow FusionPBX default settings.
2022-12-31 11:51:08 -07:00
yois615 cb1777c794 [call_flow] Adjust lamp on web changes (#6519)
Trigger event on status change from WebUI
2022-12-31 11:49:33 -07:00
Alex 21dfbc2d61 Update system_counts.php (#6517) 2022-12-31 11:47:33 -07:00
yois615 885c950a15 [call_center] Add uuid to lamp turn (#6518)
Agent log out from queue would have delayed lamp turn off.
Solution credit:
https://www.pbxforums.com/threads/agent-status-blf.549/page-2#post-11458
2022-12-31 11:46:58 -07:00
yois615 967445ab34 [call_center] Use agent_name or agent_id (#6520)
When logging into call center from phone, index.lua
only supports identity with agent_id.  We allow passing
agent_name as well to assist with BLF configuration.
2022-12-31 11:44:37 -07:00
yois615 2a0616b050 [call_center_active] Queue pickup (#6521) 2022-12-31 11:42:44 -07:00
Vincent 68f7ca517e Update all model templates of Flyingvoice. (#6509)
* Fix the registration failed after provision Flyingvoice phone.

* Fix the parameter configuration of Flyingvoice not displayed in the Default Settings

* Fix: after configuring SIP line 1 of Flyingvoice phone, other SIP lines are disable and the configuration parameters of Flyingvoice are not displayed by default settings.

* Fix after configuring SIP line 1 of Flyingvoice phone, other SIP lines are disable.
* Fix the configuration parameters of Flyingvoice are not displayed by default settings.

* Fix: when only one sip line's shared line is enable, the shared lines of all SIP lines will be enable.

* Fix: unable to generate configuration file of Flyingvoice due to syntax error.

* Add the P1X, P2X, P3X, P5X, i86Box, iMetalBox, audioKit Series for Flyingvoice in Devices.

* Update all model templates of Flyingvoice.
2022-12-31 11:32:58 -07:00
markjcrane 7c44a0b642 Add missing CDR image 2022-12-31 10:32:56 -07:00
FusionPBX 52308e2f15 Set new_json from the array
Fixes the new_json value that is added to the database transactions table.
2022-12-29 23:55:11 -07:00
FusionPBX ef1dbca245 Fix paging records for call recordings 2022-12-29 12:05:51 -07:00
FusionPBX ba9548c196 Minor version update to 5.0.7 2022-12-29 11:21:58 -07:00
FusionPBX 6a3f7e95a4 When greeting is used a short sleep is required
Without the sleep may miss the beginning of the recording.
2022-12-23 10:03:29 -07:00
FusionPBX 0afe985352 Make the SQL queries more readable 2022-12-22 13:15:14 -07:00
FusionPBX 9f0217aa44 user_dashboard has been replaced by core/dashboard 2022-12-22 13:09:35 -07:00
FusionPBX f714ef6798 Fix problems with the app_uuid and domain_uuid
app_uuid was null, and domain_uuid getting the wrong uuid.
2022-12-22 13:04:24 -07:00
FusionPBX c9fe34f271 Change call_routing to call_forward. 2022-12-22 13:02:27 -07:00
demonspork 19354fa37c Update local_extension fail_on_single_reject (#6514)
Update local_extension fail_on_single_reject to handle stale registrations and other failures. Previously any failure mode would cause the call to drop to all registrations.
2022-12-22 00:27:50 -07:00
FusionPBX 8c749a2d02 Hide domain from list for user without permission
Use session domain_uuid by default when saving a new stream.
2022-12-22 00:18:43 -07:00
FusionPBX ba8adb9df6 Make streams more admin group safe. 2022-12-22 00:13:06 -07:00
FusionPBX a44ca60441 Category and Search pass-through (#6511)
* Update default_settings.php

* Update default_setting_edit.php
2022-12-20 14:12:47 -07:00
FusionPBX ee17eb2665 Security, sanitize fax file path and name 2022-12-18 15:39:11 -07:00
FusionPBX 347874d42f Fix mkdir by includ function an use after includes 2022-12-18 12:13:01 -07:00
FusionPBX fa8ef47510 Make Aastra config files more like other provision templates (#6510)
* Update {$mac}.cfg
2022-12-16 13:13:55 -07:00
demonspork 5ccd29f20f Add : colon to menu item links to fix external links (#6508) 2022-12-15 18:29:46 -07:00
demonspork 0719510ab5 Update file_cache.lua (#6507)
* Update file_cache.lua

Updated file_cache.lua to use default settings for compatibility with the removal of config.lua/local.lua. Also refactored some code for readability/nesting

* reload remote server list on cache clear
2022-12-14 10:10:34 -07:00
FusionPBX a83982ea1b Set where and order_by to public 2022-12-14 09:58:27 -07:00
FusionPBX 30ddc55e03 Update 035_call_direction.xml
Change call_direction dialplan to set the value to local only if the value is empty.
2022-12-12 10:10:03 -07:00
FusionPBX 5ed0b299aa Update and rename 030_call_direction.xml to 035_call_direction.xml 2022-12-12 10:08:23 -07:00
FusionPBX a593f567d1 Add the greeting to the database when uploaded 2022-12-09 18:55:49 -07:00
FusionPBX b3d201b909 Add Voicemail Greeting mp3 option 2022-12-09 15:01:27 -07:00
Alex 045c87c98c Update SortableJS to 1.15.0 (#6506) 2022-12-09 10:42:09 -07:00
FusionPBX 49e8222219 Clear the speed_dial cache. 2022-12-08 22:12:22 -07:00
FusionPBX 3f4c74dac8 Simplify the speed_dial cache key 2022-12-08 21:07:25 -07:00
demonspork a62235e983 Typo Fix in recordings.php (#6504) 2022-12-08 16:16:13 -07:00
FusionPBX 7997d808ce Make this a case insensitive 2022-12-08 07:44:55 -07:00
FusionPBX 7b928dc6b4 Fix conference active buttons.
Security validation wasn't quite right so it prevented the mute, unmute and other conference actions from working.
2022-12-07 22:29:59 -07:00
FusionPBX b7147022cc include document root and config.conf 2022-12-07 21:52:34 -07:00
chansizzle b8c2fc182a allow fax FROM to have more characters (#6503)
Fax cover sheet FROM field - increase the number of characters
2022-12-07 11:13:16 -07:00
FusionPBX 433918a151 Special characters not required by default.
Long enough password special characters can be optional
2022-12-07 00:46:02 -07:00
FusionPBX 1cb9c932b8 Use the new ivr_menu answer setting. 2022-12-06 13:31:05 -07:00
FusionPBX 92123052e1 Add answer to IVR Menu dialplan.
Whether to add application answer to the IVR Menu dialplan.
2022-12-06 13:27:14 -07:00
FusionPBX bccc736fea Update xml_cdr.php 2022-12-05 17:52:36 -07:00
FusionPBX 5fabba6bb9 Default to default sip_to_user
The value sip_req_user is not working out as a good default. Change this to better default is sip_to_user.
2022-12-05 09:43:50 -07:00
FusionPBX 7cb9836574 Update version to 1.1
Deprecate the v_call_recordings table
2022-12-03 19:23:58 -07:00
FusionPBX 3b9357976d Use the new call recordings view 2022-12-03 19:19:29 -07:00
FusionPBX afa57b26a4 Update call recordings with more details
- Use the view_call_recordings view
- Add caller id name, number and destination
- Add more to the search
- Improve responsiveness
- Remove count to improve speed
2022-12-03 18:46:58 -07:00
FusionPBX 259dd1fbab Add view_call_recordings 2022-12-03 18:44:17 -07:00
FusionPBX 77cbcad4dc Add Caller ID Name, Number, and Destination 2022-12-03 18:42:07 -07:00
FusionPBX 0f60b2b34d Add record_length numeric
And remove call_recordings save
2022-12-03 18:36:42 -07:00
FusionPBX c910f2177a Add record_length type numeric 2022-12-03 18:24:09 -07:00
garryavx 93dc310178 Update {$mac}.cfg (#6248)
Added a line to set SRTP encryption. the default setting yealink_srtp_encryption was not setting properly to my T56a devices. I downloaded my config files and did not find an entry for srtp at all.

compared with the t54w template and it did have a srtp setting. So I pretty much stole the line from the T54w template and dumped it in here.

The T54w template is vastly superior to this one and this probably needs a rewrite to bring it in line.

Tested on my T56a and it at least gets the job done.
2022-12-03 14:50:53 -07:00
hershyheilpern ec91cbb962 Update {$mac}.xml (#6495)
Add variable options for Line Echo Canceller & Network Echo Suppressor
2022-12-03 14:48:23 -07:00
Vincent e8d01efc58 Add the P1X, P2X, P3X, P5X, i86Box, iMetalBox, audioKit Series for Flyingvoice in Devices. (#6502)
* Fix the registration failed after provision Flyingvoice phone.

* Fix the parameter configuration of Flyingvoice not displayed in the Default Settings

* Fix: after configuring SIP line 1 of Flyingvoice phone, other SIP lines are disable and the configuration parameters of Flyingvoice are not displayed by default settings.

* Fix after configuring SIP line 1 of Flyingvoice phone, other SIP lines are disable.
* Fix the configuration parameters of Flyingvoice are not displayed by default settings.

* Fix: when only one sip line's shared line is enable, the shared lines of all SIP lines will be enable.

* Fix: unable to generate configuration file of Flyingvoice due to syntax error.

* Add the P1X, P2X, P3X, P5X, i86Box, iMetalBox, audioKit Series for Flyingvoice in Devices.
2022-12-03 14:46:40 -07:00
FusionPBX 7767c7dc33 Disable yealink_provision_url by default.
- When this is disable it will use the domain of the tenant.
- If the domain of the tenant is not resolvable then yealink_provision_url is needed.
- One reason to disable it is the domain_name has to be manually updated to the correct domain.
2022-12-02 17:39:02 -07:00
chansizzle 61b1c5547b Update call_block.php (#6500)
show all domains when using show all
use the correct permission for show all access
2022-11-30 09:35:38 -07:00
FusionPBX 6aab62d12f Set default setting to enabled to true.
Set default setting to enabled to true for yealink_missed_call_power_led_flash_enable.
2022-11-30 09:30:49 -07:00
FusionPBX 8c7677bbb2 Disable until its less disruptive for multiple tabs 2022-11-29 15:03:46 -07:00
FusionPBX 7b9892b414 Add domain_json_token_name and domain_json_token_hash 2022-11-28 21:09:19 -07:00
FusionPBX 57756eb2a8 Add domain json token to the template 2022-11-28 21:07:18 -07:00
FusionPBX 421b5dd024 Use domain_view permisison for better versatility. 2022-11-28 21:05:05 -07:00
FusionPBX 7b9203e84f Correc the permission name 2022-11-28 20:11:32 -07:00
FusionPBX 2885115ed8 Live on demand domain search. 2022-11-28 14:56:52 -07:00
FusionPBX bbde291760 Create domain_json.php 2022-11-28 14:52:53 -07:00
FusionPBX cb7881ce02 Minor version update to 5.0.6 2022-11-28 14:31:13 -07:00
Marvin Skeete dba7375faa Update SIP Transport and Added Idle Screen vars (#6498)
<!--# P130 = 0-->
{if $account.1.sip_transport == 'udp'}P130 = 0{/if}
{if $account.1.sip_transport == 'tcp'}P130 = 1{/if}
{if $account.1.sip_transport == 'tls'}P130 = 2{/if}
{if $account.1.sip_transport == 'dns srv'}P130 = 1{/if}

<P340>{$grandstream_enable_idle_screen_download}</P340>
<P1349>{$grandstream_download_idle_at_boot}</P1349>
2022-11-24 21:07:22 -07:00
emak bfbfd8a99b Add French translations for email_address labels (#6494) 2022-11-21 19:25:43 -07:00
FusionPBX 61652e1eb3 Update and rename 505_call-forward-all.xml to 515_call-forward-all.xml 2022-11-18 12:00:51 -07:00
FusionPBX c50e737beb Update and rename 500_follow-me-destinations.xml to 520_follow-me-destinations.xml 2022-11-18 11:57:21 -07:00
FusionPBX 696ad43044 Add queue email address 2022-11-18 00:12:53 -07:00
FusionPBX 700e964221 Add queue_email_address to call_center_queues 2022-11-18 00:02:43 -07:00
FusionPBX e32351eee0 Add label-queue_email_address 2022-11-17 23:36:10 -07:00
FusionPBX 440883fba8 Add iptables chain add and exit functions 2022-11-17 21:59:46 -07:00
FusionPBX ff2aa6a5db Start specific gateway using sofia profile startgw
Old way to start gateway was re-scanning the SIP profile.
2022-11-16 14:54:22 -07:00
zrd740 c447dccd21 Update y000000000068.cfg (#6473)
Fixed a typo in call pickup variable setup for T41S to make it consistent with other yealink phone templates
2022-11-15 22:23:43 -07:00
agree 095e1f6016 [directory.lua] Add domain_uuid to export_vars (#6493) 2022-11-15 22:22:11 -07:00
FusionPBX 135686c252 Replace the commas for display with a space.
Browser will handle different display sizes better with a space.
2022-11-15 11:01:26 -07:00
FusionPBX 2d3b41a3ee Use wild card with sofia_contact by default. 2022-11-15 10:37:37 -07:00
FusionPBX 520b5d71f3 Add access control Import button 2022-11-14 17:40:41 -07:00
FusionPBX 895530ce71 Create access_control_import.php 2022-11-14 17:39:31 -07:00
FusionPBX ddcc5d3065 Fix number alias by removing code that broke it. 2022-11-14 16:48:09 -07:00
FusionPBX 6a8bf567ae Set user, admin and var passwords if isset is true 2022-11-11 10:22:16 -07:00
FusionPBX 9e5f931626 Use the callers Caller ID for local calls
With set to false the callers original outbound caller ID information is used. 
Keep original callers caller ID is now set as the default.
With these enabled to true the caller ID is picked from the extension being called.
2022-11-09 10:44:58 -07:00
FusionPBX c4a46297a0 Add PHP ODBC 2022-11-08 09:45:04 -07:00
FusionPBX 88bc541d0d Create database object if not set. (#6492)
* Create database object if not set.
2022-11-08 09:40:12 -07:00
Dan 4a1913b447 Update to jQuery 3.6.1 (#6491)
This commit updates FusionPBX to use jQuery 3.6.1 and also adds a fallback to the other variable name for offhook autodial on the HT802.
2022-11-07 08:58:38 -07:00
FusionPBX b241b921fa Create user_json.php 2022-11-07 08:57:01 -07:00
FusionPBX 0eaab4e60a Add contact relation search 2022-11-06 00:08:36 -06:00
FusionPBX 1ec48d46c9 Update contact_edit.php 2022-11-06 00:04:40 -06:00
FusionPBX acf9a046e0 Add contact relation search 2022-11-05 18:27:21 -06:00
FusionPBX f3c2c4930d Create contact_json.php 2022-11-05 18:26:09 -06:00
FusionPBX ce77a7ca75 A better way to add a page timeout 2022-11-04 10:59:32 -06:00
FusionPBX 786d60120a Update kickall
- Original kickall had an extra set command and was missing the domain name.
- Shouldn't be needed because conference is set to end when moderator leaves
- For this reason disabled by default.
- Additional kickall with sched_api is a time limit for the call
2022-11-04 10:57:52 -06:00
agree d9e43cda4c set dbh if there isn't a global dbh set (#6489) 2022-11-03 10:49:22 -06:00
FusionPBX b88c79938b Use this for better backward compatiblity
Will keep this file for a while to give people an easier upgrade.
It will be removed again but will give some time for features to be upgraded.
2022-11-02 21:05:54 -06:00
FusionPBX d3ee256286 Remove these as they break PHP 7.0
Doesn't just break PHP 5.6 it also breaks PHP 7.0
2022-11-01 15:52:56 -06:00
FusionPBX acf3781bd3 Use the destination_prefix permission 2022-11-01 12:07:56 -06:00
FusionPBX ef98de7a8f Update to match other recent SPA phones 2022-10-31 10:02:38 -06:00
FusionPBX 3796d6424e Add RTP_Packet_Size set to 0.020 2022-10-31 09:56:37 -06:00
FusionPBX cb96c4a848 Inbound routes use destination sip_req_user
This setting allows adjusting the variable that is used for match the inbound number. For many years inbound routes have used destination_number as the variable to match inbound calls. When SIP diversion header is used the destination_number is not always dependable. The variable sip_to_user is more dependable but still fails with how some providers have implemented the SIP diversion header. It appears the sip_req_user is the seems to be the most dependable.
2022-10-28 09:10:54 -06:00
FusionPBX b620b36f28 Use SQLite by default for FreeSWITCH 2022-10-26 13:52:30 -06:00
FusionPBX 3859f72c5a Minor version increment to 5.0.5 2022-10-26 10:01:44 -06:00
Tuan Nguyen c797953291 Fix Call Center max wait time with no agent reached (#6487)
Fix xml_handler when edit Max Wait Time With No Agent Reached when edit Call Center
2022-10-26 09:57:36 -06:00
FusionPBX 1ec440684b Replace X-accountcode with accountcode
Deprecating the "X-" Prefix (RFC 6648)
https://www.rfc-editor.org/rfc/rfc6648
2022-10-26 09:56:19 -06:00
Alex b3f16569fd Update multiple registration (#6488)
* Update {$mac}.cfg
2022-10-24 16:09:01 -06:00
FusionPBX 95dd6094e0 Removing this because it breaks Missed Call results
Missed calls should include hangup_cause NO_ANSWER
2022-10-24 15:27:41 -06:00
levishores 63e6c5ab66 Update blf_subscribe.lua (#6482) 2022-10-24 13:09:33 -06:00
FusionPBX bdbc1c2d4d Fix dual registration 2022-10-24 10:45:04 -06:00
FusionPBX f40621141f Update the include path 2022-10-22 23:56:10 -06:00
FusionPBX 720eb58a89 Re-organize the inlcudes. 2022-10-22 23:52:01 -06:00
FusionPBX 150e3cfed7 Re-organize the includes 2022-10-22 23:50:31 -06:00
FusionPBX 9cd8261eda Update email_queue.php 2022-10-22 23:47:58 -06:00
FusionPBX 5a71e16f15 Use the config.conf file 2022-10-22 23:45:59 -06:00
FusionPBX bc378823bd Check teh config method result.
Show the error message if the result is false.
2022-10-22 19:23:03 -06:00
FusionPBX d87ecbb3f2 Add a message variable. 2022-10-22 19:21:48 -06:00
FusionPBX bfe557edc3 install class method return boolean 2022-10-22 19:13:32 -06:00
FusionPBX 9880cd630a Update install.php 2022-10-22 18:46:22 -06:00
FusionPBX dd87f510c6 Update install.php 2022-10-22 18:39:03 -06:00
FusionPBX a0e3cd1268 Use is_writable on the config directory
- If the directory is writable and config.php exists then use it to write the config.conf file.
- Otherwise provide a message on the commands to run to create the config.conf file.
2022-10-22 18:16:52 -06:00
FusionPBX e807f9c14a Move the config.php section 2022-10-22 17:48:47 -06:00
FusionPBX e84927a216 Use the new install class
- Move the code to build config.conf file
- If the config.php file exists use it to create the config.conf file
2022-10-22 16:49:24 -06:00
FusionPBX 2178427977 Add content to the config method 2022-10-22 16:44:19 -06:00
FusionPBX 7685e7fcdb Delete iso_countries.php 2022-10-22 15:23:04 -06:00
FusionPBX 4892c468eb Create the install class 2022-10-22 15:22:47 -06:00
FusionPBX fdf5f5f1f1 Update configuration.htm 2022-10-22 15:06:24 -06:00
FusionPBX 127d55579f Add button style to the install 2022-10-22 14:16:53 -06:00
FusionPBX b44a4da6e1 Add local CSS to install.php 2022-10-22 13:19:13 -06:00
FusionPBX d345542098 Update css.php 2022-10-22 10:49:09 -06:00
FusionPBX d8acec2630 Update install.php 2022-10-21 12:28:14 -06:00
FusionPBX 7485757458 Change the timeout to 20 seconds 2022-10-21 11:43:53 -06:00
FusionPBX 4afc040efa Add SMTP Timeout and SMTPKeepAlive 2022-10-21 11:43:14 -06:00
FusionPBX 88b43cfa14 If no handle return false
Splitting up the condition and return false for each condition works in all tests.
2022-10-20 16:18:55 -06:00
FusionPBX b004e8f3ba Add message Unable to connect... 2022-10-20 16:07:23 -06:00
FusionPBX 87360643ab Update upgrade.php 2022-10-19 22:25:28 -06:00
FusionPBX 2ea90bfc52 Copy of the domain array and used it in dialplan import 2022-10-19 13:48:15 -06:00
frytimoandTim Fry 2bdf0d382e add isset($_REQUEST['debug']) before testing value for true (#6486)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-10-19 11:49:31 -06:00
FusionPBX 2816a54a8f Use the now() for PostgreSQL
This prevents and error for SQLite
2022-10-19 11:29:22 -06:00
FusionPBX 7e88b594dd Use the database_dir variable 2022-10-19 11:07:43 -06:00
FusionPBX 14552806a1 Update upgrade.php 2022-10-19 11:06:38 -06:00
FusionPBX 353be53ba8 Use sqlite by default
FusionPBX uses PostgreSQL by default
FreeSWITCH uses SQLite by default
2022-10-19 11:06:24 -06:00
FusionPBX 0bba8702a1 Add sqlite support
Example use in config.conf file.

database.1.type = sqlite
database.1.path = /var/lib/freeswitch/db
database.1.name = core.db
2022-10-19 10:57:04 -06:00
FusionPBX 87ccce1867 Fix the sub data insert. 2022-10-18 13:04:16 -06:00
FusionPBX 47c13a7270 Set update_date now() when the status is updated 2022-10-18 07:58:03 -06:00
FusionPBX 8df6c6be4f Update configuration.htm 2022-10-15 22:01:03 -06:00
FusionPBX dfe990b277 Update database.htm 2022-10-15 22:00:57 -06:00
FusionPBX ef3bd6ddaf Update index.php 2022-10-15 21:14:43 -06:00
FusionPBX 2197aa0c74 Update login.php 2022-10-15 21:12:09 -06:00
FusionPBX 9436090b7b Update index.php 2022-10-15 21:11:06 -06:00
FusionPBX eacff4c797 Code is causing a larger issue removed for more testing. 2022-10-14 12:38:01 -06:00
FusionPBX a373958ffd Use $_SERVER['DOCUMENT_ROOT'] 2022-10-14 11:51:17 -06:00
FusionPBX 49e146c8c2 Write the new config.conf file.
Remove config.php and add the new code to write the config.conf file.
2022-10-14 11:18:42 -06:00
FusionPBX 5f12776252 change label-domain to domain_name. 2022-10-14 10:37:35 -06:00
FusionPBX 07916dec2e Add server variables and project path 2022-10-14 10:30:52 -06:00
FusionPBX 80b76cd156 Add domain 2022-10-14 10:28:30 -06:00
FusionPBX 69246119f6 Fix the domain label 2022-10-14 10:23:14 -06:00
FusionPBX 61d8b54dcb Fix the include path 2022-10-14 10:10:40 -06:00
FusionPBX 03ac05fc64 Moved to resources/require.php
Found a better home for this code.
2022-10-14 10:08:03 -06:00
FusionPBX 3b8d3b70ea Include additional functions
Moved here from resources/functions.php
2022-10-14 10:07:14 -06:00
FusionPBX ef040f2b7a Command line or web server both includes can work the same 2022-10-13 16:50:47 -06:00
FusionPBX 3e8ea2015f Use the error reporting defined in config.conf 2022-10-13 16:23:20 -06:00
FusionPBX 0a25c48b5d event socket make fp public 2022-10-13 12:52:52 -06:00
FusionPBX 58d0a1ad8c Make sure resource exists before using feof
This code changes prevents this error.

Warning: feof() expects parameter 1 to be resource, bool given
2022-10-13 11:26:53 -06:00
FusionPBX 598eb4ab31 Wrap is_array arround foreach 2022-10-13 08:43:32 -06:00
FusionPBX 2a2069fe9e Use is_array around foreach 2022-10-12 14:59:13 -06:00
FusionPBX d207508ac5 Use require_once instead of include for functions.php 2022-10-12 13:46:16 -06:00
FusionPBX 2d88fc35d8 Get http_protocol from default settings 2022-10-12 11:40:38 -06:00
FusionPBX 1fd0b9976b Add http_protocol as a default setting 2022-10-12 11:38:14 -06:00
FusionPBX d3c4fa011d Update index.php 2022-10-12 10:46:19 -06:00
FusionPBX 40680f1e00 Change comment from config.php to config.conf 2022-10-12 10:45:40 -06:00
FusionPBX 0ef99c7649 Update the description 2022-10-12 10:43:14 -06:00
FusionPBX f54f1e6fc5 Replace config.php with config.conf 2022-10-12 10:41:49 -06:00
FusionPBX 2bcf6743a5 Ensure DOCUMENT_ROOT and PROJECT_PATH exist 2022-10-12 10:24:30 -06:00
FusionPBX 1dee0683ef Add missing resources/require.php 2022-10-12 09:47:19 -06:00
frytimoandTim Fry 4a8e148ccf remove is_numeric check for voicemail id (#6484)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-10-11 21:32:32 -06:00
FusionPBX dc748c2376 Method text send the core/upgrade
Also remove the additional includes not necessary because of the auto loader in resources/require.php
2022-10-11 17:54:13 -06:00
FusionPBX 0a47fc22b3 Get the DOCUMENT_ROOT and PROJECT_PATH 2022-10-11 17:10:39 -06:00
FusionPBX b373e3c7fe Needed to get DOCUMENT_ROOT and PROJECT_PATH 2022-10-11 15:53:18 -06:00
FusionPBX 227aa97adc Use class_exists around auto_loader 2022-10-11 15:34:55 -06:00
FusionPBX b8e8c726be Update the include handling. 2022-10-11 11:54:01 -06:00
FusionPBX b300961d75 Use server DOCUMENT_ROOT variable. 2022-10-11 11:45:37 -06:00
FusionPBX fa870da5c9 Use server DOCUMENT_ROOT variable
Move includes to the near the top of the page
2022-10-11 11:44:54 -06:00
FusionPBX f75f623767 Remove root.php and include require.php once 2022-10-11 11:27:57 -06:00
FusionPBX eadc950298 Remove deprecated domain_count 2022-10-11 11:09:48 -06:00
FusionPBX 0a2798575c Remove domain_count
Not needed only request domain_uuid if value is null
2022-10-11 11:07:48 -06:00
FusionPBX 122a8c1e03 Set the temp_dir variable 2022-10-11 10:59:51 -06:00
FusionPBX 2f55ba03c8 Allow copy setting to a domain for single tenant 2022-10-11 10:20:02 -06:00
FusionPBX 8179da3ef8 Allow domain copy even for single tenant systems. 2022-10-11 10:16:57 -06:00
FusionPBX 878e5a10eb Update database method connect to use config.conf 2022-10-10 19:43:07 -06:00
FusionPBX e3b782e7cb Update user_dashboard.php 2022-10-10 19:39:27 -06:00
FusionPBX fb0c92bbeb Change config.php to config.conf 2022-10-10 19:38:46 -06:00
FusionPBX 80d25cc088 Minor change from spaces to tabs 2022-10-10 19:37:47 -06:00
FusionPBX eb8ccb4fb5 Replace config.php with config.conf 2022-10-10 19:35:44 -06:00
FusionPBX 09427c23ba Replace config.php with config.conf 2022-10-10 19:34:55 -06:00
FusionPBX 93ec88629b Replace root.php 2022-10-10 17:28:02 -06:00
FusionPBX fe53483ed8 Update require.php 2022-10-10 16:59:57 -06:00
FusionPBX 83d2f4fe2c Update login.php 2022-10-10 16:59:20 -06:00
markjcrane d50bcb476a Replace root.php 2022-10-10 16:35:14 -06:00
FusionPBX a52ab303e9 Remove deprecated write_config 2022-10-10 13:28:22 -06:00
FusionPBX 30ec556c4a Remove script write_config method. 2022-10-10 13:27:50 -06:00
FusionPBX cdd6397285 Replace root.php with config.conf 2022-10-10 13:19:44 -06:00
FusionPBX 114fe7252c Replace root.php with config.conf 2022-10-10 13:19:40 -06:00
FusionPBX 4f7018700a Replace root.php with config.conf 2022-10-10 13:18:54 -06:00
FusionPBX 7a16083095 Replace root.php with new config.conf 2022-10-10 13:18:34 -06:00
FusionPBX 1c81f9c8b2 Replace config.php with config.conf 2022-10-10 13:16:32 -06:00
FusionPBX 7aa7ae4dd1 Add option to use host or hostaddr in config.conf 2022-10-10 13:08:30 -06:00
FusionPBX 26401d45c0 Replace config.lua with config.conf 2022-10-10 12:48:35 -06:00
FusionPBX f37dad8814 Update upgrade.php 2022-10-10 12:35:28 -06:00
FusionPBX adcc0ad068 Get the dial_string from default settings 2022-10-08 23:48:24 -06:00
FusionPBX 8f269a56f9 Update lazy_settings.lua 2022-10-08 23:43:51 -06:00
FusionPBX 263af5a76f Change the indentation from two spaces to a tab. 2022-10-08 23:43:08 -06:00
FusionPBX 6081a34833 Update {$mac}.xml (#6483)
* Update {$mac}.xml

* Update {$mac}.xml
2022-10-05 15:49:06 -06:00
FusionPBX a7721f5186 Add grandstream_auto_dial_number and grandstream_auto_dial_delay 2022-10-05 15:48:55 -06:00
FusionPBX b58d34010f Add option billing to phone numbers and addresses. 2022-10-05 10:53:55 -06:00
FusionPBX 4d8496f4ad Fix the event socket connected method
It was not detecting the connection to event socket correctly. 
This change resolve the high cpu usage for event guard.
2022-10-04 12:36:27 -06:00
FusionPBX 0db773e395 Correct the user_log_allowed function 2022-10-03 22:32:17 -06:00
FusionPBX b16265458e Chang device key line number from 12 to 99 2022-10-03 10:40:23 -06:00
FusionPBX 93dd8bda71 Change variabale name from action to destination_action.
Resolves a conflict with another variable called action.
2022-09-30 16:18:39 -06:00
FusionPBX aeec91fae8 Fix insert on for child data
Add a few try catch,
Add ; to the end of a few SQL queries
2022-09-30 12:46:44 -06:00
FusionPBX e06a7d4fef Minor version update to 5.0.4 2022-09-30 11:28:28 -06:00
FusionPBX 92f0eb7405 Fix a problem with loading default sofia global settings. 2022-09-30 11:27:15 -06:00
amibtl 1a0a8e1f6a Update call center dialplan template for add and edit (#6481)
* prepend to cc_export_vars

* prepend to cc_export_vars
2022-09-30 08:39:09 -06:00
FusionPBX 8bdfcb935b Time condition set to default false.
The add was setting condition to dialplan_continue false and update set to true. This changes makes it consistent as both add and update will set dialplan_continue to false.
2022-09-28 12:00:31 -06:00
FusionPBX 7964410618 Use is_array before foreach and implode 2022-09-27 14:29:53 -06:00
FusionPBX ad9087316a Fix a division by zero error.
Add better support for BSD
2022-09-27 13:53:52 -06:00
FusionPBX c28dcab2ca Add grandstream_enable_call_features template var (#6480)
* Add grandstream_enable_call_features template var

* Update {$mac}.xml

* Update {$mac}.xml

* Update {$mac}.xml
2022-09-27 09:02:31 -06:00
FusionPBX 0e163a8e68 Update {$mac}.xml 2022-09-27 08:58:20 -06:00
FusionPBX 6d9e83cb1f Remove /pb off of the phone book path 2022-09-27 08:43:10 -06:00
jonathanblack1000 d084f68a45 Update Grandstream Templates on most common models (#6479)
Add grandstream_missed_call_log, grandstream_missed_call_notification, grandstream_missed_call_backlight, grandstream_firmware_upgrade_protocol, grandstream_onhook_dial_barging,  grandstream_transfer_mode_via_vpk, grandstream_enable_call_features.
Add condition on grandstream_distinctive_ringtone_name_1, and grandstream_distinctive_ringtone_name_2.
Update Connection request user/pw to work better with GDMS.
On grandstream_wallpaper_url, use current setting name on GRP2613
2022-09-27 08:17:31 -06:00
FusionPBX 370139f7ef Add sip_req_user next to sip_to_user 2022-09-26 15:19:31 -06:00
FusionPBX 2f19cf2ff4 Add sip_req_user as another alternative destination. 2022-09-26 14:46:52 -06:00
FusionPBX 568d561c0c Update debian.service 2022-09-26 11:45:00 -06:00
FusionPBX 6fc44d467e Update debian.service 2022-09-26 11:43:57 -06:00
FusionPBX f70576b8d0 Update debian.service 2022-09-26 11:43:22 -06:00
FusionPBX ecb385cf60 PostgreSQL maybe running on a different server 2022-09-26 11:42:32 -06:00
FusionPBX 49aa12067b When using sip_to_user set before the dialplan_cache_key
To get use the sip_to_user  it needs to be set before the cache
2022-09-22 16:26:49 -06:00
FusionPBX f4b9a3331c Change from switchname to hostname 2022-09-22 15:02:36 -06:00
FusionPBX eeec6173e0 Update dialplan.lua 2022-09-22 15:01:36 -06:00
FusionPBX ed107606d3 Deprecated no longer needed. 2022-09-22 11:38:39 -06:00
FusionPBX 6f2a8df168 Update FusionPBX version only when changed. 2022-09-22 11:23:51 -06:00
FusionPBX 3c18286c69 Update if the call center dialplan is different 2022-09-22 10:40:16 -06:00
FusionPBX 27041e63e6 Only update version if it has changed 2022-09-22 10:15:49 -06:00
FusionPBX 24b982d87c Add is_array around foreach
Prevents a PHP Warning.
2022-09-22 09:45:29 -06:00
FusionPBX 8a0f4ed6d2 Add group_uuid for group permissions if the ID is null 2022-09-22 09:22:23 -06:00
FusionPBX 21d6f002b3 Add missing permissions.
Goal is to make work to make loading new permissions more efficient.
2022-09-22 00:25:00 -06:00
FusionPBX eafd5a9fe0 Add missing sofia global settings. 2022-09-22 00:09:01 -06:00
FusionPBX 2900b9fb1b Code had two file connections use one.
Noticed there were two open connection for the file log. A few other adjustments.
2022-09-21 13:02:56 -06:00
FusionPBX bc2b14739c Change 'do' to 'action' and update options.
Options: upgrade_source, upgrade_schema, app_defaults, menu_defaults, permission_defaults
2022-09-20 19:01:32 -06:00
FusionPBX a355dda5b7 Fix a copy error.
Fixed the copy issue when the data includes insert_user, insert_update, update_user and update_date.
2022-09-20 13:56:54 -06:00
FusionPBX c9b3b7ce3f Remove settings that were accidently addded here. 2022-09-19 16:13:11 -06:00
FusionPBX 7435e8bd91 Remove extra $z++ 2022-09-19 12:59:12 -06:00
FusionPBX ff6f555793 Remove extra $z++ 2022-09-19 12:54:29 -06:00
FusionPBX dee0b53cfe Remove an extra $z++; 2022-09-19 12:52:24 -06:00
FusionPBX e29877e958 Move unset parameters outside of the debug
Unset of the parameters is required or can have parameters that interfere with other queries.
2022-09-19 09:30:20 -06:00
FusionPBX 446f4615bf Bug fix use column instead of field
If updated in the last few days then you need should clear the file cache. Also disabled event_guard_log_allowed until there is a setting to enable or disable it.

Update the source code
cd /var/www/fusionpbx
rm /var/cache/fusionpbx/*
service event_guard restart
2022-09-18 17:53:03 -06:00
FusionPBX 884e90ac39 Comment out the database response. 2022-09-18 04:48:17 -06:00
FusionPBX 4400618830 Sub array data use the child table name.
In Destination edit it was using the dialplan table name instead of child dialplan details table.
2022-09-18 04:47:17 -06:00
FusionPBX 50b66f8bea If the domain_uuid is null the data is global.
This error broken dialplan edit when saving a global dialplan.
2022-09-18 03:08:18 -06:00
FusionPBX d5bd5957a4 Minor edit add a few spaces. 2022-09-18 02:59:58 -06:00
FusionPBX 7c2017bd03 On insert and update add the user and date 2022-09-18 02:57:43 -06:00
FusionPBX 2ff62f638b Add a few minor changes for code consistency. 2022-09-18 02:13:33 -06:00
FusionPBX 5485764c08 Update event_guard_logs.php 2022-09-18 02:10:28 -06:00
markjcrane eb5c25aa35 Add insert_date, insert_user, update_date, update_user to all tables 2022-09-18 00:54:37 -06:00
frytimoandTim Fry ba3b60b07b Move database methods to static and document database class (#6474)
* Add new static method to created newly connected database object

* Document database class and clean up and document some of the methods.
This removes the methods that should not be in each instance and places
them in the single instance class as to occupy less resources and be
able to create database objects more efficiently.

* More docs & removed the ability to set any value within the object.

Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-09-17 15:44:21 -06:00
FusionPBX 46e554e2fc Update readme.md 2022-09-17 11:07:02 -06:00
FusionPBX 894afb08a1 Update readme.md 2022-09-17 11:06:34 -06:00
FusionPBX ba398de05c Update readme.md 2022-09-17 11:05:40 -06:00
FusionPBX 85ca868ee4 Update event_guard_log_edit.php (#6477) 2022-09-17 10:19:56 -06:00
FusionPBX a2cedd0513 Reduce fax originate command
- Size limit for originate command parameters around 1130 characters.
- The originate command is used in event socket and not in shell command so remove escapeshellarg.
- Remove for_fax=1 as it doesn't seem to be used anywhere.
2022-09-16 17:05:36 -06:00
FusionPBX de21143246 Reduce size of fax originate command.
Originate command is limited to around 1130 characters. So this work was to reduce the size. Single quotes aren't needed on everything as this is not a command line. Its an even socket command. Also moving fax_variables into the fax options prevents variable duplicates.
2022-09-16 17:02:16 -06:00
FusionPBX b5ba126aae Fix Sofia global settings search. 2022-09-15 23:42:27 -06:00
FusionPBX 864afee9c3 Preven overwritting global profile settings. 2022-09-15 23:37:47 -06:00
FusionPBX 410bab6d05 Allow access for addresses that have been unblocked 2022-09-15 17:34:38 -06:00
FusionPBX 1d55981cbb Add user_log_allowed function. 2022-09-15 17:00:57 -06:00
FusionPBX 4fce9a4565 Filter for specific Events 2022-09-15 16:01:47 -06:00
FusionPBX 6f6eb88ebb Use single quotes for the function_exists parameter. 2022-09-12 20:50:13 -06:00
FusionPBX 694fa611ef Check to see if posix_getsid exists 2022-09-12 20:49:04 -06:00
FusionPBX 7d641711fc Get the mime type to set vm_message_ext 2022-09-12 16:53:12 -06:00
FusionPBX 81688cb8c8 Remove transcription from if statements.
Transcription is handled using the email queue.
2022-09-12 16:07:59 -06:00
FusionPBX 5ed64d2be4 Prevent an error message if the directory doesn't exist. 2022-09-12 11:41:03 -06:00
FusionPBX be257eeb03 Use is_array before foreach 2022-09-12 09:19:21 -06:00
FusionPBX 0fce8ac1a5 Add more comments and is_array before foreach 2022-09-12 08:59:28 -06:00
FusionPBX bb56827f4f Use is_array before foreach 2022-09-12 08:54:16 -06:00
FusionPBX b17748dc1e Use loop only if destination_actions is an array 2022-09-11 10:22:23 -06:00
FusionPBX c9a661de6f Optional to send syslog message for the cache delete and flush 2022-09-10 11:40:59 -06:00
FusionPBX bf11de1215 Add option for agent_authorized by default enabled false. 2022-09-09 09:03:13 -06:00
FusionPBX 33ff275c12 Add call_center_agents.php as agent blf helper. 2022-09-08 13:52:08 -06:00
frytimo e88176c755 voicemail boxes can now be text or numeric (#6467) 2022-09-07 16:37:02 -06:00
Joyce Babu ae7c312136 Add Telekonnectors Galaxy 1000 Plus template (#6469) 2022-09-07 16:36:03 -06:00
FusionPBX c12cd0d296 Unset destination_app and destination_data
This fixes a bug where a blank empty value shows the previous value.
2022-09-07 16:33:10 -06:00
Norman King 7369409648 Allow setting hanging group mode on a per line basis for grandstream … (#6472)
* allow setting hanging group mode on a per line basis for grandstream dp bases.

* Keep grandstream_hanging_group_mode for better backwards compatibility.
2022-09-07 16:24:49 -06:00
FusionPBX 8f8e0795ff Add label-file_name 2022-09-06 17:16:40 -06:00
FusionPBX aa2d0eb477 Show the file name on the second page of the import. 2022-09-06 17:15:35 -06:00
FusionPBX f9324acecc Wallboard in ES (panish) 2022-09-06 12:39:45 -06:00
garryavx d71e4075a4 Update app_config.php (#6470)
* Update app_config.php

changed the wording to let the user know they can add multiple email address for delivery.

* Update app_languages.php
2022-09-02 12:22:06 -06:00
FusionPBX 6bed337061 Chunk the work into batches of a 1000 numbers at a time.
This is useful for customers with over 1000 destination numbers. Will work from command line with any number of destination numbers.
2022-09-01 11:11:13 -06:00
FusionPBX 52b06b5afc Use /proc/$pid if posix_getsid is undefined 2022-08-30 14:45:09 -06:00
FusionPBX 29d1221346 On CentOS posix_getsid function may not be available. 2022-08-30 14:20:40 -06:00
FusionPBX 334d989b08 By default don't set the this outbound_caller_id when using loopback 2022-08-29 16:51:23 -06:00
FusionPBX f63cbfaa78 Fix the find_file function when so it works with base64 2022-08-27 23:29:20 -06:00
FusionPBX a43388bace Increase the timeout to 30000 microseconds.
30,000 Microseconds = 0.03 Seconds. Longer timeout reduces the CPU. If the timeout is too long then the Status -> SIP STATUS page will take longer to load.
2022-08-27 16:45:07 -06:00
frytimo 09dbdfb79f Removed usleep command (#6468)
* Removed usleep command

* Update event_socket.php
2022-08-26 16:53:25 -06:00
FusionPBX 56de8714fa Add base.active_handset.number = 8 to Yealink w60b
#Sets the amount of active handsets allowed on the base station, options are 4 or 8
base.active_handset.number = 8
2022-08-26 14:45:19 -06:00
FusionPBX fd364879ac Remove duplicated yealink_firmware_t54s 2022-08-26 14:34:09 -06:00
FusionPBX 0435dc0719 Remove duplicate yealink_remote_phonebook_enable 2022-08-26 14:30:04 -06:00
FusionPBX 2ca336e956 Wait until event socket is ready then connect to it.
If FreeSWITCH is not started yet then wait to connect to it then
2022-08-26 12:05:28 -06:00
FusionPBX b8f1eb7f10 Add function to check if we are connected to event soscket 2022-08-26 11:48:47 -06:00
FusionPBX 347e02e273 Update software.php 2022-08-25 15:24:14 -06:00
FusionPBX d62f360f77 Delete the cache in e.164 format. 2022-08-24 16:53:31 -06:00
frytimoandTim Fry 6bb6ae6b2b Fix PHP warning for PDO::setAttribute() requires 2 parameters (#6464)
Co-authored-by: Tim Fry <tim@voipstratus.com>
2022-08-24 14:09:33 -06:00
FusionPBX 2cd382ec38 Get caller ID from the same call flow -> caller profile
This is the same place we get caller ID from in the XML CDR Details page.
2022-08-23 13:13:34 -06:00
agree d52695b29f [fax] replace bg_system with os.execute (#6462)
to support systems that have the system commands disabled
2022-08-23 10:14:34 -06:00
FusionPBX e51f48b17f Update app_defaults.php 2022-08-22 17:54:29 -06:00
FusionPBX 2fcd0dbd9a Use destination_app and destination_data 2022-08-22 17:30:31 -06:00
yois615 6e2e54922f Retain recording display name and reset digit timeout (#6163)
This commit fixes 2 issues:
1. The recording name was not preserved upon
rerecording

2. When selecting rerecord, the digit timeout would retain
the value of 100, preventing the user from selecting the recording
id
2022-08-22 11:15:23 -06:00
agree fa270a4ee8 [ring groups] remove unused code (#6456) 2022-08-22 11:11:59 -06:00
yois615 04d3b0bfe0 [ht814] Grandstream escape html and sip_port (#6457) 2022-08-22 11:11:23 -06:00
Harry Foster 3d0fe368ac Adding the Yealink Tone Country setting to all templates, and including two more minor revisions of handsets that have been released. (#6458)
* Added two new minor hardware revisions, the CP925 and T42U, and added the voice.tone.country = {} to all templates, previously missing on most

* Minor typo from a wrong window issue, and removing the commented examples for easier grepping
2022-08-22 11:10:24 -06:00
emak e52f6626f9 Fix fax_queue to Email PDF Instead of TIF (#6461)
* Fix fax_queue to Email PDF Instead of TIF

Variables `$fax_file_tif` and `$fax_file_pdf` are missing a period before the extension so file_exists is always evaluating to false. Thus, TIF was always sent. Adds the period back into the path so the check works correctly.

NOTE: `$fax_file_tif` is completely unused and can be removed from this code for cleanup.

* Use single quotes.
2022-08-22 10:10:31 -06:00
FusionPBX 4f2d0316c5 Add custom event_guard:unblock 2022-08-20 12:48:41 -06:00
FusionPBX 01b31dce1a Watch for event_guard:unblock and more debug info. 2022-08-20 12:47:24 -06:00
Joyce Babu 6365b28cf2 Add Telekonnectors Galaxy 1000 template. (#6442) 2022-08-20 09:28:15 -06:00
emak 26b3e7893b Add Fax Queue TX Email Variables (#6460)
* Add db field to v_fax_queue to link to fax log

* Add fax_duration field to v_fax_logs

Add fax duration to db to allow for logging of this data for fax email templates.

* Add new email variables to fax send

* Fix some logging variables and fax_log_uuid

Added back some missing session variables for the fax log.

Also update the email queue db field with the fax_log_uuid to allow us to add variables to the fax email templates later.

* Update hangup_tx.lua
2022-08-19 18:08:43 -06:00
FusionPBX f8f09f9a31 Skip resolving IP addresses to improve performance. 2022-08-18 23:31:42 -06:00
FusionPBX a9e534f1fa Remove playback silence_stream 2022-08-18 17:59:41 -06:00
FusionPBX ea9b9ce621 Update additional occurances of PDO::PGSQL_ATTR_DISABLE_PREPARES 2022-08-18 17:53:33 -06:00
FusionPBX 2783cbd251 Update database.php 2022-08-18 17:39:51 -06:00
FusionPBX 98b19d1f22 Only add PDO::PGSQL_ATTR_DISABLE_PREPARES for versions of PHP that support it. 2022-08-18 17:37:43 -06:00
FusionPBX e4884fa4b1 Remove outbound_caller_id_number as it overrides caller ID
When the caller is a local extension to another location extension the caller ID in the follow-me-destinations dialplan sets the caller ID to the local extension number and then the VoIP provider doesn't accept the call. As long as the local extension has Outbound Caller ID set on their extension then the information is already correct.
2022-08-18 15:33:16 -06:00
Alex ada9f69af3 Add status dropdown to Fax Queue search (#6459)
* Update fax_queue.php

* Update app_languages.php
2022-08-18 13:13:50 -06:00
FusionPBX 82bb973ea7 Update the event_guard constructor. 2022-08-17 17:27:47 -06:00
FusionPBX 7e34f1f8f4 Add permission event_guard_log_unblock 2022-08-17 17:26:26 -06:00
FusionPBX 1b8bf75eff Simplify outbound destinations further by hiding irrelevant settings. 2022-08-17 09:38:24 -06:00
FusionPBX 074628ca7a Add method unblock to the event_guard class. 2022-08-17 00:27:08 -06:00
FusionPBX 2177091702 Use unblock instead of delete. 2022-08-17 00:25:53 -06:00
FusionPBX c2085c2320 Add button-unblock, label-unblocked, and label-pending 2022-08-17 00:23:54 -06:00
FusionPBX 9b06671810 Add ability to unblock addresses and use more descriptive variable names. 2022-08-17 00:06:52 -06:00
FusionPBX 326544a006 Get the hostname of the server before the loop. 2022-08-16 18:45:48 -06:00
FusionPBX df755fae5c Hide columns for smaller screens, and truncate the email_body. 2022-08-16 18:43:03 -06:00
Alex a517e185d5 Add status dropdown to search (#6455)
* Update app_languages.php

* Update email_queue.php

* Update app_languages.php
2022-08-16 15:58:05 -06:00
FusionPBX 5fe1f5c601 Add an IPv4 address missing cidr notation add /32 by default. 2022-08-16 14:16:39 -06:00
FusionPBX 3519353008 Hide a few columns for smaller screens. 2022-08-16 11:51:13 -06:00
Alex d9ed7a343f Update devices.php (#6454)
* Update devices.php

* Update event_guard_logs.php
2022-08-16 11:27:17 -06:00
Alex 93c90c8969 Add a filter dropdown (#6453)
* Update event_guard_logs.php
2022-08-16 10:56:30 -06:00
agree f94bad1730 [xml_cdr] more caller id handling (#6452) 2022-08-16 00:00:43 -06:00
FusionPBX 8a3af98f6b Multiple changes including reconnect to event socket if needed.
- IN function block replace array with event to prevent a naming conflict.
- Reconnect to event socket if the connection is lost.
- Use condition if is_array around each foreach.
- Unset the database connection
- Use event socket variables and close the session before the loop
2022-08-15 14:54:49 -06:00
FusionPBX 24b9012d8c Update email_send.php 2022-08-11 13:43:37 -06:00
FusionPBX 00c9452e13 Add a line feed to the Yealink T58w after outbound_proxy_enable 2022-08-10 22:50:55 -06:00
FusionPBX 59b42035e4 directory.xml 2022-08-09 14:13:53 -06:00
FusionPBX d67fa590bd Update internal-ipv6.xml.noload 2022-08-09 10:31:30 -06:00
FusionPBX d9c2388975 Update internal.xml.noload 2022-08-09 10:30:46 -06:00
FusionPBX df3a492816 Update external.xml.noload 2022-08-09 10:30:23 -06:00
FusionPBX d4572fcb0f Update internal.xml.noload 2022-08-09 10:29:19 -06:00
FusionPBX 68965ccf0a Update ivr.conf.lua 2022-08-08 20:08:51 -06:00
FusionPBX 8431d419ca Reduce round trips to the database server.
Add PDO attribute:  PDO::PGSQL_ATTR_DISABLE_PREPARES
https://prototype.php.net/manual/en/ref.pdo-pgsql.php
2022-08-08 16:58:52 -06:00
FusionPBX 25d59d69fe On change destination type show and hide specific fields 2022-08-08 13:25:56 -06:00
FusionPBX b12c474c19 When using the add button send the destination type in the URL. 2022-08-08 12:56:17 -06:00
FusionPBX 1466659fe6 Change domains ACL to providers for new installs. 2022-08-06 17:13:38 -06:00
FusionPBX 38fa7591d5 Add the acl and move the dtmf-type. 2022-08-06 17:10:59 -06:00
FusionPBX 4d88052984 Add a description for track-calls 2022-08-06 17:04:01 -06:00
FusionPBX 6299e91d76 Sync up the external-ipv6 SIP Profile 2022-08-06 17:01:16 -06:00
FusionPBX eea25a336d Sync up the internal ipv6 SIP Profile 2022-08-06 16:35:10 -06:00
FusionPBX 6e746c89a4 Sync up the external SIP Profile 2022-08-06 15:47:36 -06:00
FusionPBX 174a72a9fa Sync up the internal SIP Profile 2022-08-06 15:29:18 -06:00
FusionPBX da768d984b If the call goes to voicemail it is a missed call. 2022-08-05 15:05:49 -06:00
FusionPBX 84a3ab143d Needs to use double equals for the condition. 2022-08-05 14:35:54 -06:00
FusionPBX 6f2a2a76a1 Answered calls to exclude missed calls.
Determining missed_call is done in the import so the extra originating_leg_uuid is not needed.
2022-08-05 13:46:26 -06:00
FusionPBX e0b37ae834 When call goes to voicemail mark it as missed.
Add additional labels and change isset answer_stamp to use billsec greater than zero.
2022-08-05 13:19:35 -06:00
FusionPBX 0a45b7acf1 Don't show these by default.
Permissions are there to show these however its is expected that these permissions will be assigned to a group rarely.
Considering removing the permissions and not import the records.
2022-08-05 11:30:57 -06:00
FusionPBX 440584898b Missed calls are marked when the call is imported.
Missed calls are marked when the call is imported and in some cases near the end of the call. This simplifies the missed_call in reports and call detail records.
2022-08-05 11:18:40 -06:00
FusionPBX d5e7552fb4 Hide not answered calls Ring Group Destinations that were answered by someone else.
Improve the form
2022-08-05 11:15:09 -06:00
FusionPBX 58d7e402d9 Hide ring group legs by default that were not answered.
Cleans up the Call Detail Records list.
2022-08-05 10:43:40 -06:00
FusionPBX 301dc1501c Eliminate faxes from missed calls and ring group destinations that didn't answer the call. 2022-08-04 19:09:23 -06:00
FusionPBX 74d034d7a9 Work on missed_call field. 2022-08-04 18:37:14 -06:00
FusionPBX 3418859ee9 Update xml_cdr.php 2022-08-04 15:37:12 -06:00
FusionPBX e1449e5cd3 Change default from allow to deny for the LAN rfc198 ACL 2022-08-04 15:02:41 -06:00
FusionPBX 7a6c44267a Check for missed_call variable use it if it exists 2022-08-04 12:50:29 -06:00
FusionPBX f591c04f22 Update index.lua 2022-08-04 12:43:16 -06:00
Mendel 86fe4fe1b0 sip listen port yealink cordless (#6450) 2022-08-04 12:23:11 -06:00
Mendel 10b28721f7 Add cid of remote ext to dialplan (#6449) 2022-08-04 11:53:46 -06:00
markjcrane 2f67b36276 Add add a provison variable for cp_source 2022-08-04 11:52:08 -06:00
FusionPBX a4ff0f1007 Format the date and time with the time zone. 2022-08-02 12:59:09 -06:00
FusionPBX 2c5c522186 Add a better way to detect if the iptables chain exists. 2022-08-02 12:34:03 -06:00
FusionPBX 7103adf98f Set accountcode variable
Set the account code variable so it can be used in the dialplan after the pin_number.lua has run.
2022-08-02 09:00:55 -06:00
FusionPBX c12b03d31a Disable the toggle. 2022-08-01 23:41:44 -06:00
FusionPBX 7f494e3baf Add the user_agent field. 2022-08-01 23:38:03 -06:00
FusionPBX 79b5f70cdf Add the user_agent field. 2022-08-01 23:37:18 -06:00
FusionPBX d384547adb Add the user_agent field. 2022-08-01 23:36:47 -06:00
FusionPBX 0680a4d252 Add label and description for user_agent. 2022-08-01 23:36:05 -06:00
FusionPBX 054a33cf3e Add the user_agent field. 2022-08-01 23:35:31 -06:00
FusionPBX 73ded9bf60 Remove cache from switch.blocked.
Since the IP address is blocked don't need to cache it.
2022-08-01 19:37:59 -06:00
FusionPBX 854f2bf1f0 Add missing _alternate 2022-08-01 18:20:38 -06:00
Luis Daniel Lucio Quiroz 976d983174 Add period and dash to Click 2 Call (#6425)
Source can be not only numbers but letters, dots, and -. They are still valid:

name.lastname,  or name-lastname.
2022-08-01 08:45:21 -06:00
emakandFusionPBX 3ec9cdaba1 Update deprecated sip profile params (#6445)
* Update deprecated sip profile params

Parameter names have changed. See here: https://freeswitch.org/confluence/display/FREESWITCH/Sofia+Configuration+Files

When starting a profile, the following warnings would appear:
[WARNING] sofia.c:5332 rtp-hold-timeout-sec deprecated use media_hold_timeout variable.
[WARNING] sofia.c:5325 rtp-timeout-sec deprecated use media_timeout variable.

Updating the parameters fixes the issue.

* Update external.xml.noload

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2022-08-01 08:38:35 -06:00
garryavx 53c20a156e Update y000000000035.cfg (#6443)
this way the $yealink_t48g_wallpaper_filename actually gets used for both the check and the setting of the wallpaper itself.
2022-08-01 08:37:52 -06:00
emakandFusionPBX 2f8ba11520 Update deprecated sip profile params (#6444)
* Update deprecated sip profile params

Parameter names have changed. See here: https://freeswitch.org/confluence/display/FREESWITCH/Sofia+Configuration+Files

When starting a profile, the following warnings would appear:
[WARNING] sofia.c:5332 rtp-hold-timeout-sec deprecated use media_hold_timeout variable.
[WARNING] sofia.c:5325 rtp-timeout-sec deprecated use media_timeout variable.

Updating the parameters fixes the issue.

* Update external-ipv6.xml.noload

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2022-08-01 08:37:24 -06:00
emakandFusionPBX 9bd300db84 Update deprecated sip profile params (#6446)
* Update deprecated sip profile params

Parameter names have changed. See here: https://freeswitch.org/confluence/display/FREESWITCH/Sofia+Configuration+Files

When starting a profile, the following warnings would appear:
[WARNING] sofia.c:5332 rtp-hold-timeout-sec deprecated use media_hold_timeout variable.
[WARNING] sofia.c:5325 rtp-timeout-sec deprecated use media_timeout variable.

Updating the parameters fixes the issue.

* Update internal-ipv6.xml.noload

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2022-08-01 08:34:53 -06:00
emakandFusionPBX 305ba420dc Update deprecated sip profile params (#6447)
* Update deprecated sip profile params

Parameter names have changed. See here: https://freeswitch.org/confluence/display/FREESWITCH/Sofia+Configuration+Files

When starting a profile, the following warnings would appear:
[WARNING] sofia.c:5332 rtp-hold-timeout-sec deprecated use media_hold_timeout variable.
[WARNING] sofia.c:5325 rtp-timeout-sec deprecated use media_timeout variable.

Updating the parameters fixes the issue.

* Update internal.xml.noload

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2022-08-01 08:33:59 -06:00
markjcrane d881ca7af6 Revert "Not using momentjs so removing it"
This reverts commit 11fb638d2d.
2022-08-01 08:00:35 -06:00
markjcrane 551f84d5c5 Revert "Remove momentjs"
This reverts commit a49177c5c5.
2022-08-01 07:59:53 -06:00
FusionPBX 7a71f0bf0a Less CPU used to listen to event socket. 2022-07-31 10:15:42 -06:00
FusionPBX c20e83e64c Add additional pre-defined variables to the disa dialplan. 2022-07-30 16:41:04 -06:00
FusionPBX 5997aae095 Fix the search and add a link to arin.net 2022-07-29 15:59:21 -06:00
FusionPBX f60d6e7557 Add proxy to the gateway list. 2022-07-29 10:28:22 -06:00
FusionPBX 95c358f8e4 Add database log for new blocked address. 2022-07-28 11:15:48 -06:00
FusionPBX 7897bd16aa Update event_guard_logs.php 2022-07-28 09:34:16 -06:00
FusionPBX 02522b11f3 Create event_guard.php 2022-07-28 09:33:09 -06:00
FusionPBX 2b457c9dfb Create root.php 2022-07-28 09:31:04 -06:00
FusionPBX 8779206311 Create event_guard_logs.php 2022-07-28 09:30:41 -06:00
FusionPBX 9c8840ed6a Create event_guard_log_edit.php 2022-07-28 09:30:00 -06:00
FusionPBX 5dd4459acd Create app_menu.php 2022-07-28 09:29:28 -06:00
FusionPBX 37f754336b Create app_languages.php 2022-07-28 09:29:01 -06:00
FusionPBX 1f6a081471 Create app_config.php 2022-07-28 09:28:36 -06:00
FusionPBX 22a243ceb4 Update and rename app/switch/resources/service/debian-event_guard.service to app/event_guard/resources/service/debian.service
Move event guard to its own directory.
2022-07-28 08:38:16 -06:00
FusionPBX 9d2efbeccb Rename app/switch/resources/service/event_guard.php to app/event_guard/resources/service/event_guard.php
Move the event_guard service to its own directory name.
2022-07-28 08:35:16 -06:00
FusionPBX 3ee97e0d76 Add more debug information. 2022-07-27 13:40:55 -06:00
FusionPBX 5a11c55553 Remove orphaned access control nodes 2022-07-27 13:28:52 -06:00
FusionPBX 287e8c07b6 Minor version update 5.0.2 2022-07-27 12:29:55 -06:00
FusionPBX c8aaf80781 Create debian-event_guard.service 2022-07-25 19:28:18 -06:00
FusionPBX 17ab8e61ab Create event_guard.php 2022-07-25 19:24:35 -06:00
Antonio Fernandez 96df02b398 adding template support for call waiting tone (#6441) 2022-07-25 09:54:44 -06:00
agree 6e40068040 [dialplans] Allow multiple extensions per xml (#6437)
* [dialplans] Allow multiple extensions per xml

* remove extra character
2022-07-23 13:16:25 -06:00
emak ea4a5e7f67 Check to make sure accountcode has some value (#6440)
The accountcode variable is used in a dialstring later on and if it comes back nil for any reason, then the following error is thrown:

2022-07-22 16:19:11.524674 [ERR] mod_lua.cpp:202 /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: attempt to concatenate global 'accountcode' (a nil value)
stack traceback:
        /usr/share/freeswitch/scripts/app/follow_me/index.lua:396: in main chunk
        /usr/share/freeswitch/scripts/app.lua:48: in main chunk

This completely breaks follow-me.

This code sets the accountcode variable to the domain name if it comes back nil during script execution, thus protecting the script from failing with an empty accountcode value in the db or query.
2022-07-22 16:47:31 -06:00
Jesse Gruver 0e9b8f15b5 Added grandstream_show_key_labels and other default values. (#6438) 2022-07-22 13:02:51 -06:00
FusionPBX 5be250c569 Set Caller ID only when the call_direction is outbound. 2022-07-20 16:15:04 -06:00
FusionPBX 1a96d4007a Additional changes to allow hangup action which has no data. 2022-07-20 09:45:11 -06:00
FusionPBX aa488eed01 Needed to allow hangup action which has no data. 2022-07-20 09:40:23 -06:00
FusionPBX e65d483ef7 Add contact_in_ping to Gateways (#6439)
* Add contact_in_ping to Gateways

* Update gateway_edit.php

* Update gateways.php

* Update app_languages.php

* Update sofia.conf.lua
2022-07-19 16:34:01 -06:00
FusionPBX 4cf53c9719 Work around for FreeSWITCH bug where .loc break Music on Hold.
Fixed in the following commit.
https://github.com/signalwire/freeswitch/pull/1577

The commit was accepted. Hoping the bug fix is included in the next release of FreeSWITCH 1.10.8. However we need a work around for those using older versions and 1.10.8 hasn't been released yet.
2022-07-19 12:02:54 -06:00
FusionPBX 3eb258c7ea Add an alternative method to get the device vendor. 2022-07-19 09:52:34 -06:00
Joseph 2de1abb657 fix issue with device vendors (#6340)
If mac address and template already exists in Devices page and you attempt to associate the mac address with the extension from the extensions page, the "vendor" is removed from the device, thus causing provisioning not to look at the device profiles settings of the mac address
2022-07-19 09:48:04 -06:00
FusionPBX dfa60ba49a Update timezones.conf.xml 2022-07-18 20:21:05 -06:00
FusionPBX 89258e09e5 Admin user should have access to the destination_prefix. 2022-07-18 10:42:56 -06:00
FusionPBX e6d7c76870 Fix the caller ID number label. 2022-07-17 19:09:34 -06:00
FusionPBX 5f8fcc07fb Add destination_prefix required for superadmin. 2022-07-17 18:59:19 -06:00
FusionPBX 8ce558702a Add destination conditions. 2022-07-16 23:31:29 -06:00
FusionPBX ca5ef8d03d Change label-detail_action to label-destination_actions. 2022-07-16 23:30:15 -06:00
FusionPBX 41c5fa3a3f Add a field and permission called destination_conditions. 2022-07-16 23:29:04 -06:00
FusionPBX 2c7e40bd8e Add destination_conditions, destination_actions, and additional descriptions. 2022-07-16 23:27:59 -06:00
FusionPBX d9a9bbc8e0 Add destination_actions to the destinations table. 2022-07-16 11:27:03 -06:00
markjcrane 4f2987da2d Add destination_actions type json allows adding multiple actions 2022-07-15 22:38:21 -06:00
markjcrane 4ee607eb83 Change RTP_Packet_Size from 0.030 to 0.020 2022-07-15 09:25:32 -06:00
markjcrane a49177c5c5 Remove momentjs 2022-07-15 09:07:01 -06:00
markjcrane 11fb638d2d Not using momentjs so removing it 2022-07-15 09:07:01 -06:00
agree f89ecf5b36 [dialplan] NANP match + only if followed by a 1 (#6436) 2022-07-12 17:32:49 -06:00
FusionPBX e2640b8752 Use the destination_cid_name_prefix permission and get more values from the database when user doesn't have permission to the value. 2022-07-12 17:16:19 -06:00
FusionPBX c2ba621c15 Add permission destination_cid_name_prefix. Remove an unused permission other_destinations. 2022-07-12 16:46:47 -06:00
FusionPBX cacdc51899 Add provision settings snom_user_auto_connect_1 to snom_user_auto_connect_4, and snom_user_ringer_1 - snom_user_ringer_4 2022-07-12 15:24:52 -06:00
FusionPBX 4669b3efba Get the call center channel variables and set in the intercepted call. 2022-07-11 13:46:25 -06:00
FusionPBX 084e36d0a0 Sanitize the menu link by restricting it to specific characters. 2022-07-08 18:38:13 -06:00
FusionPBX 88b34831e4 Sanitize the menu link by restricting it to specific characters. 2022-07-08 18:28:08 -06:00
FusionPBX 6780949019 Remove LOG_LOCAL0 from openlog it caused the output to the console. 2022-07-08 14:46:21 -06:00
FusionPBX 767937260d Limit this to run only with the web server. 2022-07-08 14:21:29 -06:00
FusionPBX da181fc6f6 Improve multi-server cluster support. 2022-07-07 16:14:01 -06:00
Jason Kinner 5bc7083692 BUG FIX: incorrect comment characters (#6435)
Replaced // characters with --
2022-07-06 19:42:43 -06:00
FusionPBX 899fc18420 Use the right comments for lua. 2022-07-06 16:09:44 -06:00
FusionPBX 230ee4ab49 Vociemail, Allow play a mix of mp3 or wav files whatever exists. 2022-07-06 10:09:01 -06:00
FusionPBX 1bcff440d4 Change yealink w606 to w60b 2022-07-01 16:40:25 -06:00
FusionPBX 57df8a02aa Require destination_number for add.
Update can get the number from the database.
2022-07-01 11:37:48 -06:00
garryavx 24962e4033 Update y000000000066.cfg (#6415)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:27:01 -06:00
garryavx be98ea3fea Update y000000000028.cfg (#6414)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:26:54 -06:00
garryavx 3838c55fae Update y000000000067.cfg (#6413)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:26:50 -06:00
garryavx fb5aae1fb0 Update y000000000029.cfg (#6412)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:26:45 -06:00
garryavx 216383b3b1 Update y000000000035.cfg (#6416) 2022-06-30 10:26:19 -06:00
garryavx e7651c0456 Update y000000000065.cfg (#6417)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:26:11 -06:00
garryavx 930f813057 Update y000000000096.cfg (#6418)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:26:00 -06:00
garryavx d2d79f3f0b Update y000000000056.cfg (#6419)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:25:52 -06:00
garryavx 35d1e28a23 Update y000000000097.cfg (#6420)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:25:42 -06:00
garryavx d8fb60b11e Update y000000000058.cfg (#6421)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:25:35 -06:00
garryavx c3a9987868 Update y000000000058.cfg (#6422)
This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-30 10:25:16 -06:00
FusionPBX 07679fe80d Add escapeshellarg to the variables used in the command line. 2022-06-29 10:38:36 -06:00
FusionPBX de22a9121a Security use escapeshellarg 2022-06-29 10:24:05 -06:00
FusionPBX b8f70a6cb5 Add an option to keep the original caller id name and number. 2022-06-28 17:43:17 -06:00
FusionPBX be841cd17a Update fax_send.php 2022-06-28 11:06:19 -06:00
FusionPBX 220f19dcf0 Add new permisisons for the switch dashboard.
switch_version
switch_uptime
switch_channels
switch_registrations
2022-06-28 11:00:45 -06:00
FusionPBX 3a31141e6f Add permisisons to the dashboard.
Add new permissions switch_version, switch_uptime, switch_channels, switch_registrations
2022-06-28 10:59:19 -06:00
garryavx 6dbe626b56 Update y000000000150.cfg (#6423)
* Update y000000000150.cfg

This should be paired with a default setting to match. it controls the behavior of the headset if you make a call while it is connected. by default (0), yealink phones will not connect the call via the headset. if you set it to 1, the phone will immediately start using the headset for the call, instead of requiring you to press the headset button after dialing.
2022-06-25 12:07:58 -06:00
agree b7e7d27c79 [xml_cdr] LOSE_RACE handled in wrong place (#6433)
LOSE_RACE is already being handled later `if (permission_exists('xml_cdr_lose_race'))`
2022-06-25 12:04:44 -06:00
agree f907619679 [xml_cdr] cdr statistics fix LOSE_RACE (#6432) 2022-06-25 12:04:23 -06:00
FusionPBX 9c176e31e5 Simplify the Yealink T41s Template 2022-06-25 11:20:55 -06:00
FusionPBX d82fd6a587 Add park+*xxxx to the templates using the spa_dial_plan 2022-06-24 16:30:38 -06:00
FusionPBX 39ed9d80b1 Update {$mac}.xml 2022-06-24 15:43:04 -06:00
FusionPBX 74fcfdc5a9 Update {$mac}.xml 2022-06-24 15:42:49 -06:00
FusionPBX d6c02e8694 Update {$mac}.xml 2022-06-24 15:41:45 -06:00
FusionPBX 44dedb9acf Set disabled when the device key type is disabled. 2022-06-24 15:41:13 -06:00
FusionPBX 7983bee43d Update {$mac}.xml 2022-06-24 15:40:36 -06:00
FusionPBX f450a1c9bb Use Disabled when the device key type is set to disabled. 2022-06-24 15:40:15 -06:00
FusionPBX c36f1c3968 Cisco 8851 spacfg.xml after factory default 2022-06-24 14:19:57 -06:00
FusionPBX 8c6d8a4103 Require the fax extension to be numeric. 2022-06-23 15:02:07 -06:00
FusionPBX 2e2376829f Use the domain_name from the database. 2022-06-23 10:25:31 -06:00
FusionPBX dd7117fbbe While in a call put blind transfer and transfer first. (#6431)
* While in a call put blind transfer and transfer first.
2022-06-21 17:37:59 -06:00
FusionPBX c076fae485 Use # instead of * to prevent *97 conflict with voicemail. (#6430)
* Use # instead of * to prevent *97 conflict with voicemail.
2022-06-21 17:25:11 -06:00
DanandJesse Gruver f6c64054fa Add missing $ to variables in HT802 template (#6427)
* Grandstream HT802 Added Offhook Auto-dial variables

* Grandstream HT802 Added Offhook Auto-dial variables

* Grandstream GRP261x Make Configuration Keypad Lock configurable, fix default

* Grandstream Add grandstream_dhcp_time_zone across all templates

* Yealink Added yealink_missed_calllog to control whether missed calls are logged or not

* Grandstream HT802 update variable name to not use dash (which was breaking the template)

* added default settings for grandstreams
added "grandstream_configuration_via_keypad" and
"grandstream_dhcp_time_zone" as settings
also changed "grandstream_long_label" to 1

* Add custom transcription providers to email queue, fix spelling error

* Correct missing $ in Grandstream template

Co-authored-by: Jesse Gruver (piajesse) <me@piajesse.com>
2022-06-21 16:04:28 -06:00
nacircoronado 99ed45ca2b Update app_menu.php (#6429) 2022-06-21 15:41:56 -06:00
nacircoronado 2620f9e266 Spanish change cerca to cerrar. (#6428)
* Spanish change cerca to cerrar.

* Update app_languages.php
2022-06-21 15:31:35 -06:00
FusionPBX 5cc64eefb2 Change needed to support Cisco 3PCC endpoints.
The Cisco phone sends the + without the park prefix. This change allows dialing +*5901.
2022-06-21 13:20:17 -06:00
FusionPBX 632898d4a9 Use sip_from_user in orbit extension for an outbound call that is parked.
This allows outbound calls to receive a call back to original extension that parked it if the parked call is left in park.
2022-06-17 10:55:33 -06:00
FusionPBX 7a6f02474e Prevent spaces from being considered as a valid destination_number. 2022-06-16 15:07:21 -06:00
FusionPBX d6b1cdd63f Prevent a problem when an IVR Option number is set without and action. 2022-06-16 10:29:01 -06:00
M. Skenderianandmskenderian b3fc6e6857 removed duplicate code (#6410)
Co-authored-by: mskenderian <michael@wireprosolutions.com>
2022-06-16 10:04:28 -06:00
agree 0e3f286ff7 [page] Add check_destination_status to dialplan (#6411)
* [page] Add check_destination_status to dialplan

* Update 240_page.xml
2022-06-15 18:56:08 -06:00
FusionPBX d3af1acd73 Simplify the registrations count method by using the get method. 2022-06-15 10:52:11 -06:00
FusionPBX 611a13c32c Change the retry_limit to 5. 2022-06-14 23:31:32 -06:00
FusionPBX f214547359 First attempt use the fax variables from settings
Also set fax_retry_attempts, and fax_retry_limit.
2022-06-14 23:09:54 -06:00
FusionPBX 44f07fa5db Add missing single quotes 2022-06-14 20:42:17 -06:00
agree 4634e1b579 [Ring Groups] Handle 404 (#6407) 2022-06-13 16:08:57 -06:00
agree dfeda45c68 email.lua fix execution from api (#6408) 2022-06-13 16:06:21 -06:00
FusionPBX af6b00bf66 Update page.lua with more options check_destination_status, auto answer and alert info. 2022-06-11 00:58:00 -06:00
FusionPBX d0d0346b42 Use fax_extension_copy permission for the copy button. 2022-06-09 19:23:28 -06:00
FusionPBX 7644c8d4fa Change ulfile to file to be similar to the voicemail greetings. 2022-06-09 17:42:04 -06:00
FusionPBX 7f6b1472e6 Add conference recording to CDR page.
Tested and works with regular dialplan conference.
2022-06-09 11:04:07 -06:00
markjcrane 1fa04dd8a5 Add additional Fanvil templates 2022-06-07 19:58:36 -06:00
FusionPBX d16dd2ae1e Enable ability to use sip_to_user. (#6406)
* Enable ability to use sip_to_user.

* Set the sip_to_user variable.

* Update index.lua
2022-06-07 16:00:28 -06:00
FusionPBX cf1aad072c Found a more efficient way to force lower case on boolean values.
Helpful for supporting multiple databases. Make the import safer for users where the value is expected in lower case. Best solution for PostgreSQL is boolean data type but that would still not be a good solution for alternative databases.
2022-06-06 18:11:13 -06:00
FusionPBX e0866eba32 Force the value to lower case for enabled. 2022-06-06 18:04:06 -06:00
FusionPBX 7205c76fba Force the value to lower case for voicemail_local_after_email, voicemail_tutorial, and voicemail_enabled. 2022-06-06 17:52:34 -06:00
FusionPBX d3eeaab1b4 Set the date using now() instead of the php date function. 2022-06-02 15:11:13 -06:00
FusionPBX 1199269347 When the cache is deleted log details to the syslog server. 2022-06-01 22:28:12 -06:00
Mendel 9fc81c880c Update 12-24 hour variable (#6404)
Checked on the Yealink cordless base and found a different variable for the time format.
2022-06-01 21:49:17 -06:00
FusionPBX ad3a4825a1 Use a log prefix that makes more sense. 2022-06-01 18:57:33 -06:00
Jesse Gruver 3643f98d62 Added variables to grandstream configs for idle mute fuction (#6371)
* Added varibles to grandstream configs for idle mute fuction
I have changed them all to the default of "0" and then added a
varible called "grandstream_idle_mute_function" that overwrites
the default option of 0

There seems to be older configs where 0 = no instead of dnd
so I've added grandstream_idle_mute_function_old for these configs

* Added curls for grandstream_idle_mute_function
2022-06-01 13:54:56 -06:00
FusionPBX 93c7714148 Add new permission voicemail_file (#6403)
* Add new permission voicemail_file

* Update app_config.php

* Update voicemail_edit.php
2022-06-01 10:48:33 -06:00
Antonio Fernandez 7bbbc4e895 Settings Refresh Timer has been added to the templates and new variable (#6402)
* Settings Refresh Timer has been added to the templates and new variable

* changed the variable name to a better name $snom_provision_timer_seconds
2022-06-01 09:32:22 -06:00
Dan 4dd80fb779 Add Default Settings for Grandstream Templates, and custom transcription provider for Email Queues (#6401) 2022-05-31 23:05:23 -06:00
FusionPBX 795254a421 Add http_auth, STUN and NTP. 2022-05-31 21:56:12 -06:00
FusionPBX 6440e4362d Add http_auth, STUN and NTP 2022-05-31 21:54:30 -06:00
FusionPBX d3533931df Update {$mac}.xml 2022-05-31 21:34:43 -06:00
FusionPBX ae3e7ba9cb Add a new Panasonic utg200b template. 2022-05-31 21:34:24 -06:00
FusionPBX 27c03ae80b Add new panasonic utg300b template. 2022-05-31 21:29:15 -06:00
FusionPBX 83eaee56a2 number_alias permission removed from superadmin group.
Not providing permissions to this by default to discourage using it. However anyone can assign the permission to any groups of their choice.
2022-05-31 09:42:26 -06:00
Luis Daniel Lucio Quiroz 643f014181 Fix Missed Call email when Follow Me is On (#6323)
When a user has the Email Alerts for Missed Calls set, it works
As soon as there is a Follow Me configured, the email stops arriving

This patch restores the desired behaviour
2022-05-30 20:07:08 -06:00
Dan 2a0392dec2 Add variables to Grandstream and Yealink Templates (#6400)
* Grandstream HT802 Added Offhook Auto-dial variables

* Grandstream HT802 Added Offhook Auto-dial variables

* Grandstream GRP261x Make Configuration Keypad Lock configurable, fix default

* Grandstream Add grandstream_dhcp_time_zone across all templates

* Yealink Added yealink_missed_calllog to control whether missed calls are logged or not

* Grandstream HT802 update variable name to not use dash (which was breaking the template)
2022-05-30 16:37:38 -06:00
FusionPBX 54a5fb5a2b Access Controls protect new users from hurting themselves. 2022-05-28 17:19:37 -06:00
FusionPBX a0718f367a Create an additional dialplan to set call_direction outbound. 2022-05-28 10:02:58 -06:00
FusionPBX 147956f655 Add bg_system to run the command as non blocking. 2022-05-27 16:58:32 -06:00
FusionPBX 5a89fa5081 Remove code from checks to see if the extension is on the phone.
Having the PBX check if the caller is already on the phone has not worked well at least not the approach that is getting removed in this commit. It is not the right way to solve the issue. Its better for the phone endpoint  to block the intercom or auto answer when it is already on a call.

One way to do this that worked in testing was to disable call waiting. Then the call is rejected and not allowed to interrupt. the call that already exists. Expect there are also other ways to instruct the phone not to interrupt active calls when it receives a SIP message to auto answer.
2022-05-27 14:45:41 -06:00
markjcrane 10748a95c8 Add device_line_label and device_line_display_name permissions. 2022-05-26 21:37:19 -06:00
FusionPBX c87ab41fff Add FAX Queue with retry_interval (#6398)
* Update app_config.php

* Use the new retry interval.

* Add the new retry interval.
2022-05-26 14:33:19 -06:00
FusionPBX 5d2b919fa9 Correct invalid UUID 2022-05-25 12:38:29 -06:00
FusionPBX 5d41fd01df Need to allow ability to clear the value. 2022-05-25 12:21:02 -06:00
FusionPBX fd67765c74 Correct the Provisioning information 2022-05-25 09:25:23 -06:00
FusionPBX 3093a0a8cb Fix a missing semi-colon. 2022-05-25 08:43:59 -06:00
Antonio Fernandez e851245c86 Snom templates - added per model wallpaper settings (#6391) 2022-05-25 08:39:39 -06:00
FusionPBX b1e2d3312d Initial version of fanvil v67 configuration. 2022-05-25 08:31:34 -06:00
Mendel 1be00e330e updated yealink cordless files (#6396) 2022-05-24 23:32:56 -06:00
FusionPBX d897fad100 Replace io.popen with api:executeString 2022-05-24 16:55:25 -06:00
FusionPBX 56f8d4ba44 Replace system with api:executeString 2022-05-24 16:50:45 -06:00
FusionPBX d5775257b4 Use system instead of io.open 2022-05-24 16:38:04 -06:00
FusionPBX 46447d83c3 Remove the transcription as this can blocking.
Transcription still available through email queue this way it offloads the work off of FreeSWITCH.
2022-05-24 16:32:40 -06:00
FusionPBX 2326d79113 This function is not being used. 2022-05-24 16:12:29 -06:00
FusionPBX fdbaefa2cf Create dnd.php 2022-05-23 10:03:03 -06:00
FusionPBX 7d82b82089 Send presence events for DND 2022-05-20 17:51:52 -06:00
FusionPBX 53e8ab5f16 Unset the event socket handles. 2022-05-20 17:49:42 -06:00
FusionPBX ed1d1afd07 Update presence.php 2022-05-20 17:15:57 -06:00
FusionPBX 27f0d9d5b4 Add a new presence class. 2022-05-20 17:14:50 -06:00
FusionPBX 37e3837323 Fix a spelling mistake change Formward to Forward. 2022-05-20 09:33:50 -06:00
FusionPBX c4556ebba4 Add cc-instance-id to callcenter.conf xml. 2022-05-19 21:55:04 -06:00
FusionPBX 1434d39cff Change condition where the email address was not set.
- When the email address was not set then post process did not happen and the status was not updated to failed.
- Updated debug and file parameters for debugging.
2022-05-19 16:00:58 -06:00
FusionPBX 10de04f929 Send presence when changing the status of the call flow. 2022-05-19 13:28:54 -06:00
FusionPBX a2477f8dd5 Add domain_uuid the email object. 2022-05-19 10:44:54 -06:00
FusionPBX 41e96f691e Add voicemail BLF. 2022-05-19 09:38:31 -06:00
Antonio Fernandez c73f4de8d1 BLF Presence added for Voicemail Boxes (#6389)
* BLF Presence added for Voicemail Boxes

* Newline added to the end of the blf_notify.lua script

* changed prefix of vmail to voicemail
2022-05-19 08:37:10 -06:00
agree d097d5b64c [call center] (#6390)
call_center_announce_sound check for permission
2022-05-18 18:06:22 -06:00
FusionPBX f13d538277 Remove a redundant ignore_early_media. 2022-05-17 13:47:53 -06:00
FusionPBX c1f9134654 Remove ignore_early_media because its added below. 2022-05-17 13:42:44 -06:00
FusionPBX bc9f33cde1 Remove ignore_early_media because its added below. 2022-05-17 12:46:32 -06:00
agree 55de8844bf [fax] use get_accountcode function to get the accountcode (#6387) 2022-05-16 09:35:58 -06:00
FusionPBX 8c4ad43fbc Fix spelling in accountcode description 2022-05-16 09:13:29 -06:00
FusionPBX 58fc71fce9 Fix implode paramater order and few other minor edits. 2022-05-13 11:44:41 -06:00
FusionPBX 22db796b11 Adds an extra line so that internet_port_vid doesn't show up on the same line. 2022-05-12 10:31:41 -06:00
markjcrane 6c2ebbc28c Correct the template syntax 2022-05-12 10:24:39 -06:00
FusionPBX 6247cddddc Add ${yealink_call_info_display_method} variable (#6383)
* Add ${yealink_call_info_display_method} variable

* Update y000000000074.cfg

* Update y000000000095.cfg

* Update y000000000070.cfg

* Update y000000000058.cfg

* Update y000000000097.cfg

* Update y000000000150.cfg
2022-05-12 09:49:02 -06:00
Ben 94ec533ca1 Updated multiple items including jitter buffer, echo cancellation and DND (#6382) 2022-05-11 18:30:54 -06:00
Anthony 269aeccde9 Update y000000000095.cfg (#6381) 2022-05-11 15:58:26 -06:00
Anthony 1de40cbaf6 Update y000000000096.cfg (#6380) 2022-05-11 15:58:14 -06:00
Anthony b32dfe4025 Update y000000000056.cfg (#6379) 2022-05-11 15:58:03 -06:00
Anthony 8e3b136ca4 Update y000000000058.cfg (#6378) 2022-05-11 15:57:54 -06:00
Anthony c6e1e5e08d Update y000000000096.cfg (#6377) 2022-05-11 15:57:46 -06:00
Anthony decdee0d0c Update y000000000095.cfg (#6376) 2022-05-11 15:57:38 -06:00
Anthony 47fc0edfde Update y000000000091.cfg (#6375) 2022-05-11 14:18:14 -06:00
Anthony 9d154ba66d Update y000000000070.cfg (#6374) 2022-05-11 14:17:57 -06:00
Anthony fbd09820a8 Update y000000000029.cfg (#6373)
* Update y000000000029.cfg

Added ${yealink_call_info_display_method} setting to template

* Update y000000000067.cfg

* Update y000000000107.cfg

* Update y000000000028.cfg

* Update y000000000066.cfg

* Update y000000000108.cfg

* Update y000000000035.cfg

* Update y000000000065.cfg

* Update y000000000109.cfg

* Update y000000000051.cfg

* Update y000000000028.cfg

* Update y000000000029.cfg

* Update y000000000036.cfg

* Update y000000000054.cfg

* Update y000000000065.cfg

* Update y000000000066.cfg

* Update y000000000067.cfg

* Update y000000000068.cfg

* Update y000000000076.cfg

* Update y000000000107.cfg

* Update y000000000108.cfg

* Update y000000000109.cfg

* Update y000000000116.cfg
2022-05-11 14:17:12 -06:00
AlexC a752ab76dc Add yealink_call_info_display_method (#6372)
* Update y000000000068.cfg

* Update y000000000036.cfg

* Update y000000000054.cfg

* Update y000000000076.cfg

* Update y000000000124.cfg

* Update y000000000044.cfg

* Update y000000000052.cfg

* Update y000000000069.cfg

* Update y000000000046.cfg

* Update y000000000045.cfg

* Update y000000000069.cfg

* Update y000000000044.cfg

* Update y000000000044.cfg

* Update y000000000052.cfg
2022-05-11 14:03:40 -06:00
Ben dd44b54082 Update template with array and other minor changes (#6369) 2022-05-11 13:05:45 -06:00
FusionPBX 5448ac02a9 Add yealink_call_info_display_method to default settings with a default value of 1 - Number+Name 2022-05-11 13:05:01 -06:00
FusionPBX 38541f7a2d Add domain_uuid to the email object and remove deprecated code. 2022-05-10 20:21:20 -06:00
FusionPBX d5db02be42 Add sip_h_Alert-Info to cc_export_vars. 2022-05-09 21:53:27 -06:00
FusionPBX 312873fb39 Add sip_h_Alert-Info to cc_export_vars 2022-05-09 21:52:30 -06:00
FusionPBX 3dd7d3cdf4 BLF for Call Center Agents
Updated when the phone registers.
2022-05-09 21:21:41 -06:00
Jesse Gruver 56b53b5f2c Remove the country code if not e.164 (#6367) 2022-05-09 16:40:44 -06:00
FusionPBX 28c0d704df Add op_valet_park_active to the css. 2022-05-09 15:33:44 -06:00
FusionPBX dd1b315101 Add valet park and line feeds. 2022-05-09 15:32:10 -06:00
FusionPBX ca16c0b622 Fixed hidden calls after picking up a parked call.
Also improved code indentation.
2022-05-07 12:46:14 -06:00
FusionPBX e83885c722 User Logs - Paging Broken with Search 2022-05-07 09:36:14 -06:00
FusionPBX f2aba2251f Presence is not correctly updated when caller rings an IVR
When a user calls an IVR, the presence is updated and sent to subscribers to notify they are on the phone, however it is never terminated so it appears they are busy long after the call ended. Removing the dialplan setting for the presence_id fixes this issue so the caller no longer appears on the phone when the IVR call ends.
2022-05-07 09:18:42 -06:00
FusionPBX a4c0e93cbe Only one row allowed so added limit 1. 2022-05-07 09:02:58 -06:00
agree 90f33bd64d [domains] add exit after redirect (#6366) 2022-05-06 17:08:52 -06:00
FusionPBX 4d18f598b2 Use a css class for the sub category labels. 2022-05-06 14:14:29 -06:00
FusionPBX 5e9481ebc4 user_hold_music condition order user_exist must be first. 2022-05-06 09:25:08 -06:00
FusionPBX 60e484e8f5 Default settings overridden by domain SMTP settings
Fixed a regressions where the domain SMTP settings were ignored.
2022-05-05 19:41:38 -06:00
FusionPBX 3600e479fe call-forward-all set diversion header to default false.
If the diversion header is required it can be enabled.
2022-05-05 16:45:12 -06:00
FusionPBX d2d8c2bdcb Rename queue and remove the escape on the domain_name. 2022-05-05 12:17:14 -06:00
FusionPBX 9330414120 Use the number alias permission in the extension summary. 2022-05-05 10:59:25 -06:00
FusionPBX 9e77266299 Re-add permission check for xml_cdr_lose_race and xml_cdr_enterprise_leg. 2022-05-05 10:55:52 -06:00
emak 2050d98e3e Update XML CDR Extension Summary Queries #5979 (#6365)
* Change labels to reflect new CC missed field

* Update extension summary queries

* Hide number alias field
2022-05-05 10:43:44 -06:00
FusionPBX 4e2fe618e7 Fix the dialplan call center greeting and queue_extension. 2022-05-05 10:16:33 -06:00
agree 4e9e007a2b [dialplans] don't set hold music if from user exists (#6359)
If the aleg is an existing user, setting the hold_music on his leg causes the wrong hold_music to be used when he puts the other leg on hold.
2022-05-05 09:06:29 -06:00
Luis Daniel Lucio Quiroz ca921e88ac Fixes NULL in _SESSION[context] (#6360)
* Update check_auth.php

* Update domains.php
2022-05-05 09:04:19 -06:00
Mendel ea337e42ae Update polycom configs each separate (#6363)
* Update provision.php

* Update y000000000124.cfg

Added {$yealink_dnd_allow} so that you can remove DND from the phone

* Added all the Polycom Templates separately

* Update app_config.php

* Update app_config.php

* Delete resources/templates/provision/polycom/IP321 directory

* Revert "Delete resources/templates/provision/polycom/IP321 directory"

This reverts commit 6f532a37bb.

* Delete resources/templates/provision/polycom directory

* Working on making the file Lowercase

* Still working on making it lowercase

* Update the Description of Polycom Firmwares

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Update {$mac}.cfg

* Updated the name of the Sound Station Duo to just Duo

* Update app_config.php
2022-05-04 15:19:53 -06:00
FusionPBX cc8914341f Use &lt; and &gt; in place of < and > 2022-05-04 14:58:15 -06:00
FusionPBX d5481c05fd Fix the syntax. 2022-05-04 14:44:43 -06:00
FusionPBX 652621c215 Simplify call-forward-all dialplan. 2022-05-04 14:26:44 -06:00
FusionPBX 829f8a35d6 Change the order of the conditions to a-z and add call_direction. 2022-05-03 18:16:08 -06:00
FusionPBX b8a71eb59b Remove the reset on the fax queue search. 2022-05-03 17:46:20 -06:00
FusionPBX 907c2d332c Remove the reset on the email queue search. Don't think its needed for a single item html form. 2022-05-03 17:35:01 -06:00
FusionPBX d9c3779c47 Update call_center_queue_edit.php 2022-05-03 16:00:24 -06:00
FusionPBX bfa5492e21 Allow an empty destination so that values can be nulled. 2022-05-03 09:46:26 -06:00
FusionPBX 94bc7d9f99 Add distinctive ring to inbound destinations (#6357)
* Add distinctive ring to inbound destinations

* Update destination_edit.php
2022-05-02 18:11:56 -06:00
FusionPBX be5f1e47f6 Add new permissions destination_hold_music and destination_distinctive_ring. Add new field destination_distinctive_ring to to the destinations table. 2022-05-02 16:54:31 -06:00
FusionPBX ee84131443 Fix the yealink_ring_file to match the correct number. 2022-05-02 16:19:27 -06:00
FusionPBX 791d0046c0 Add an option to the select Greeting: none (#6356)
* Update play_greeting.lua

* Update voicemail_edit.php
2022-05-02 12:09:20 -06:00
FusionPBX eee7786529 Remove some code redundancy. 2022-05-02 08:27:15 -06:00
FusionPBX 16b8d5e172 Update extension_edit.php 2022-05-02 08:17:53 -06:00
Joseph f080a39053 Fix voicemail transcriptions not being pushed (#6339)
* Fix voicemail transcriptions not being pushed

When creating a new extension, under the Voicemail tab, Transcribe is empty. This was causing users to not receive VM transcriptions. Adding the above code will push transcribe = true or false (depending on the value in default settings) after creating a new extension.
2022-05-02 08:06:21 -06:00
FusionPBX 0e4e379b14 Use fax_email from the fax table for the mail to address.
And add additional condition for fax_queue enabled.
2022-04-30 23:50:50 -06:00
FusionPBX eeba3eb66f Fix fax forward so it can use the fax queue. 2022-04-30 20:39:15 -06:00
FusionPBX bac66f75ac Update 480_operator.xml (#6355)
* Update 480_operator.xml

* Define operator to be used in the operator dialplan.
2022-04-29 15:59:18 -06:00
FusionPBX 06e0e48476 Calculate the time zone for the device list. 2022-04-29 15:45:02 -06:00
1955 changed files with 209182 additions and 110371 deletions
+71 -39
View File
@@ -17,13 +17,12 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2020
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
the Initial Developer. All Rights Reserved.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -40,13 +39,14 @@
$text = $language->get();
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$access_control_uuid = $_REQUEST["id"];
$id = $_REQUEST["id"];
}
else {
$action = "add";
$access_control_uuid = uuid();
}
//get http post variables and set them to php variables
@@ -58,7 +58,15 @@
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
//enforce valid data
if ($access_control_name == 'providers' || $access_control_name == 'domains') {
$access_control_default = 'deny';
}
if ($access_control_default != 'allow' && $access_control_default != 'deny') {
$access_control_default = 'deny';
}
//validate the token
$token = new token;
@@ -69,7 +77,7 @@
}
//process the http post data by submitted action
if ($_POST['action'] != '' && strlen($_POST['action']) > 0) {
if (!empty($_POST['action'])) {
//prepare the array(s)
$x = 0;
@@ -123,11 +131,11 @@
//check for all required data
$msg = '';
if (strlen($access_control_name) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
if (strlen($access_control_default) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
//if (strlen($access_control_nodes) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."<br>\n"; }
//if (strlen($access_control_description) == 0) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (empty($access_control_name)) { $msg .= $text['message-required']." ".$text['label-access_control_name']."<br>\n"; }
if (empty($access_control_default)) { $msg .= $text['message-required']." ".$text['label-access_control_default']."<br>\n"; }
//if (empty($access_control_nodes)) { $msg .= $text['message-required']." ".$text['label-access_control_nodes']."<br>\n"; }
//if (empty($access_control_description)) { $msg .= $text['message-required']." ".$text['label-access_control_description']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -140,11 +148,6 @@
return;
}
//add the access_control_uuid
if (!is_uuid($_POST["access_control_uuid"])) {
$access_control_uuid = uuid();
}
//prepare the array
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
$array['access_controls'][0]['access_control_name'] = $access_control_name;
@@ -153,22 +156,48 @@
$y = 0;
if (is_array($access_control_nodes)) {
foreach ($access_control_nodes as $row) {
if (strlen($row['node_type']) > 0) {
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $row["node_cidr"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_domain'] = $row["node_domain"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"];
$y++;
//validate the data
if (!is_uuid($row["access_control_node_uuid"])) { continue; }
if ($row["node_type"] != 'allow' && $row["node_type"] != 'deny') { continue; }
if (isset($row["node_cidr"]) && $row["node_cidr"] != '') {
$cidr_array = explode("/", str_replace("\\", "/", $row["node_cidr"]));
if (filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
if (isset($cidr_array[1]) && is_numeric($cidr_array[1])) {
//valid IPv4 address and cidr notation
$node_cidr = $row["node_cidr"];
}
else {
//valid IPv4 address add the missing cidr notation
$node_cidr = $row["node_cidr"].'/32';
}
}
elseif(filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
//valid IPv6 address
$node_cidr = $row["node_cidr"];
}
}
//build the sub array
$array['access_controls'][0]['access_control_nodes'][$y]['access_control_node_uuid'] = $row["access_control_node_uuid"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_type'] = $row["node_type"];
$array['access_controls'][0]['access_control_nodes'][$y]['node_cidr'] = $node_cidr;
$array['access_controls'][0]['access_control_nodes'][$y]['node_description'] = $row["node_description"];
$y++;
//unset values
unset($cidr_array, $node_cidr);
}
}
//save the data
$database = new database;
$database->app_name = 'access controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
if (is_array($array)) {
$database = new database;
$database->app_name = 'access controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
}
//clear the cache
$cache = new cache;
@@ -194,14 +223,19 @@
}
}
//set default values
$access_control_name = '';
$access_control_default = '';
$access_control_description = '';
//pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
if (!empty($access_control_uuid) && is_uuid($access_control_uuid) && empty($_POST["persistformvar"])) {
$sql = "select * from v_access_controls ";
$sql .= "where access_control_uuid = :access_control_uuid ";
$parameters['access_control_uuid'] = $access_control_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (!empty($row) && count($row) > 0) {
$access_control_name = $row["access_control_name"];
$access_control_default = $row["access_control_default"];
$access_control_description = $row["access_control_description"];
@@ -210,7 +244,7 @@
}
//get the child data
if (is_uuid($access_control_uuid)) {
if (!empty($access_control_uuid) && is_uuid($access_control_uuid)) {
$sql = "select * from v_access_control_nodes ";
$sql .= "where access_control_uuid = :access_control_uuid ";
$sql .= "order by node_cidr asc";
@@ -221,23 +255,22 @@
}
//add the $access_control_node_uuid
if (!is_uuid($access_control_node_uuid)) {
if (empty($access_control_node_uuid)) {
$access_control_node_uuid = uuid();
}
//add an empty row
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) != 0) {
if (!empty($access_control_nodes) && count($access_control_nodes) > 0) {
$x = count($access_control_nodes);
}
else {
$access_control_nodes = array();
$x = 0;
}
$access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid;
$access_control_nodes[$x]['access_control_uuid'] = $access_control_uuid ?? '';
$access_control_nodes[$x]['access_control_node_uuid'] = uuid();
$access_control_nodes[$x]['node_type'] = '';
$access_control_nodes[$x]['node_cidr'] = '';
$access_control_nodes[$x]['node_domain'] = '';
$access_control_nodes[$x]['node_description'] = '';
//create token
@@ -257,6 +290,9 @@
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'access_controls.php']);
if ($action == 'update') {
if (permission_exists('access_control_node_add')) {
echo button::create(['type'=>'button','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'style'=>'margin-right: 3px;','link'=>'access_control_import.php?id='.escape($access_control_uuid)]);
}
if (permission_exists('access_control_node_add')) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
}
@@ -337,7 +373,6 @@
echo " <tr>\n";
echo " <th class='vtablereq'>".$text['label-node_type']."</th>\n";
echo " <td class='vtable'>".$text['label-node_cidr']."</td>\n";
echo " <td class='vtable'>".$text['label-node_domain']."</td>\n";
echo " <td class='vtable'>".$text['label-node_description']."</td>\n";
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
@@ -372,9 +407,6 @@
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_cidr]' maxlength='255' value=\"".escape($row["node_cidr"])."\">\n";
echo " </td>\n";
echo " <td class='formfld'>\n";
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_domain]' maxlength='255' value=\"".escape($row["node_domain"])."\">\n";
echo " </td>\n";
echo " <td class='formfld'>\n";
echo " <input class='formfld' type='text' name='access_control_nodes[$x][node_description]' maxlength='255' value=\"".escape($row["node_description"])."\">\n";
echo " </td>\n";
if (is_array($access_control_nodes) && @sizeof($access_control_nodes) > 1 && permission_exists('access_control_node_delete')) {
@@ -0,0 +1,453 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('access_control_node_add')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduce the functionality but requires PHP 5.1.0 or higher
if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") {
$fp = fopen("php://memory", 'r+');
fputs($fp, $input);
rewind($fp);
$data = fgetcsv($fp, null, $delimiter, $enclosure); // $escape only got added in 5.3.0
fclose($fp);
return $data;
}
}
//set the max php execution time
ini_set('max_execution_time', 7200);
//get the http get values and set them as php variables
$action = $_POST["action"] ?? '';
$from_row = $_POST["from_row"] ?? '';
$delimiter = $_POST["data_delimiter"] ?? '';
$enclosure = $_POST["data_enclosure"] ?? '';
//save the data to the csv file
if (isset($_POST['data'])) {
$file = $_SESSION['server']['temp']['dir']."/access_control_nodes-".$_SESSION['domain_name'].".csv";
if (file_put_contents($file, $_POST['data'])) {
$_SESSION['file'] = $file;
}
}
//copy the csv file
//$_POST['submit'] == "Upload" &&
if (!empty($_FILES['ulfile']['tmp_name']) && is_uploaded_file($_FILES['ulfile']['tmp_name']) && permission_exists('access_control_node_add')) {
if (!empty($_POST['type']) &&$_POST['type'] == 'csv') {
$file = $_SESSION['server']['temp']['dir'].'/'.$_FILES['ulfile']['name'];
if (move_uploaded_file($_FILES['ulfile']['tmp_name'], $file)) {
$_SESSION['file'] = $file;
}
}
}
//get the schema
if (!empty($delimiter)) {
//get the first line
$line = fgets(fopen($_SESSION['file'], 'r'));
$line_fields = explode($delimiter, $line);
//get the schema
$x = 0;
include "app/access_controls/app_config.php";
$i = 0;
foreach ($apps[0]['db'] as $table) {
//get the table name and parent name
if (is_array($table["table"]['name'])) {
$table_name = $table["table"]['name']['text'];
}
else {
$table_name = $table["table"]['name'];
}
$parent_name = $table["table"]['parent'];
//remove the v_ table prefix
if (substr($table_name, 0, 2) == 'v_') {
$table_name = substr($table_name, 2);
}
if (substr($parent_name, 0, 2) == 'v_') {
$parent_name = substr($parent_name, 2);
}
//filter for specific tables and build the schema array
if ($table_name == 'access_control_nodes') {
$schema[$i]['table'] = $table_name;
$schema[$i]['parent'] = $parent_name;
foreach($table['fields'] as $row) {
$row['deprecated'] = $row['deprecated'] ?? '';
if ($row['deprecated'] !== 'true') {
if (is_array($row['name'])) {
$field_name = $row['name']['text'];
}
else {
$field_name = $row['name'];
}
$schema[$i]['fields'][] = $field_name;
}
}
$i++;
}
}
}
//match the column names to the field names
if (!empty($delimiter) && file_exists($_SESSION['file']) && $action != 'import') {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: access_control_edit.php?id='.$_GET['id']);
exit;
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include header
$document['title'] = $text['label-import'];
require_once "resources/header.php";
//form to match the fields to the column names
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['label-import']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'access_control_node_edit.php?id='.$_GET['id']]);
echo button::create(['type'=>'submit','label'=>$text['button-import'],'icon'=>$_SESSION['theme']['button_icon_import'],'id'=>'btn_save']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['description-import']."\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
//loop through the lines and fields
$x = 0;
foreach ($line_fields as $line_field) {
$line_field = preg_replace('#[^a-zA-Z0-9_]#', '', $line_field);
echo "<tr>\n";
echo " <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo $line_field;
echo " </td>\n";
echo " <td width='70%' class='vtable' align='left'>\n";
echo " <select class='formfld' style='' name='fields[$x]' onchange=\"document.getElementById('labels_$x').style.display = this.options[this.selectedIndex].value == 'contact_phones.phone_number' ? 'inline' : 'none';\">\n";
echo " <option value=''></option>\n";
foreach($schema as $row) {
echo " <optgroup label='".$row['table']."'>\n";
foreach($row['fields'] as $field) {
$selected = '';
if ($field == $line_field) {
$selected = "selected='selected'";
}
if (substr($field, -5) != '_uuid') {
echo " <option value='".$row['table'].".".$field."' ".$selected.">".$field."</option>\n";
}
}
echo " </optgroup>\n";
}
echo " </select>\n";
echo " </td>\n";
echo "</tr>\n";
$x++;
}
echo "</table>\n";
echo "<br /><br />\n";
echo "<input name='action' type='hidden' value='import'>\n";
echo "<input name='from_row' type='hidden' value='$from_row'>\n";
echo "<input name='data_delimiter' type='hidden' value='$delimiter'>\n";
echo "<input name='data_enclosure' type='hidden' value='$enclosure'>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
require_once "resources/footer.php";
//end the script
exit;
}
//get the parent table
function get_parent($schema,$table_name) {
foreach ($schema as $row) {
if ($row['table'] == $table_name) {
return $row['parent'];
}
}
}
//upload the csv
if (file_exists($_SESSION['file'] ?? '') && $action == 'import') {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: access_control_edit.php?id='.$_GET['id']);
exit;
}
//user selected fields, labels
$fields = $_POST['fields'] ?? '';
$labels = $_POST['labels'] ?? '';
//set the domain_uuid
$domain_uuid = $_SESSION['domain_uuid'];
//get the contents of the csv file and convert them into an array
$handle = @fopen($_SESSION['file'], "r");
if ($handle) {
//set the starting identifiers
$row_id = 0;
$row_number = 1;
//loop through the array
while (($line = fgets($handle, 4096)) !== false) {
if ($from_row <= $row_number) {
//format the data
$y = 0;
foreach ($fields as $key => $value) {
//get the line
$result = str_getcsv($line, $delimiter, $enclosure);
//get the table and field name
$field_array = explode(".",$value);
$table_name = $field_array[0];
$field_name = $field_array[1];
//echo "value: $value<br />\n";
//echo "table_name: $table_name<br />\n";
//echo "field_name: $field_name<br />\n";
//get the parent table name
$parent = get_parent($schema, $table_name);
//count the field names
if (isset($field_count[$table_name][$field_name])) {
$field_count[$table_name][$field_name]++;
}
else {
$field_count[$table_name][$field_name] = 0;
}
//set the ordinal ID
$id = $field_count[$table_name][$field_name];
//remove formatting from the phone number
if ($field_name == "node_cidr") {
if (isset($result[$key]) && $result[$key] != '') {
$cidr_array = explode("/", str_replace("\\", "/", $result[$key]));
if (filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
if (isset($cidr_array[1]) && is_numeric($cidr_array[1])) {
//valid IPv4 address and cidr notation
//$result[$key] = $result[$key];
}
else {
//valid IPv4 address add the missing cidr notation
$result[$key] = $result[$key].'/32';
}
}
elseif(filter_var($cidr_array[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
//valid IPv6 address
}
}
}
//build the data array
if (!empty($table_name)) {
$array[$table_name][$row_id]['access_control_node_uuid'] = uuid();
$array[$table_name][$row_id]['access_control_uuid'] = $_GET['id'];
$array[$table_name][$row_id][$field_name] = $result[$key];
}
if (is_array($array[$parent][$row_id])) { $y++; }
}
//debug information
//view_array($field_count);
//process a chunk of the array
if ($row_id === 1000) {
//save to the data
$database = new database;
$database->app_name = 'access_controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
//clear the array
unset($array);
//set the row id back to 0
$row_id = 0;
}
} //if ($from_row <= $row_id)
$row_number++;
$row_id++;
} //end while
fclose($handle);
//debug information
//view_array($array);
//save to the data
if (!empty($array)) {
$database = new database;
$database->app_name = 'access_controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
unset($array);
}
//send the redirect header
header("Location: access_control_edit.php?id=".$_GET['id']);
return;
}
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include the header
$document['title'] = $text['label-import'];
require_once "resources/header.php";
//show content
echo "<form name='frmUpload' method='post' enctype='multipart/form-data'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['label-import']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'access_control_edit.php?id='.$_GET['id']]);
echo button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>$_SESSION['theme']['button_icon_upload'],'id'=>'btn_save']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['description-import']."\n";
echo "<br /><br />\n";
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-import_data']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <textarea name='data' id='data' class='formfld' style='width: 100%; min-height: 150px;' wrap='off'></textarea>\n";
echo "<br />\n";
echo $text['description-import_data']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-from_row']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='from_row'>\n";
$i=2;
while($i<=99) {
$selected = ($i == $from_row) ? "selected" : null;
echo " <option value='$i' ".$selected.">$i</option>\n";
$i++;
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-from_row']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-import_delimiter']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' style='width:40px;' name='data_delimiter'>\n";
echo " <option value=','>,</option>\n";
echo " <option value='|'>|</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-import_delimiter']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-import_enclosure']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' style='width:40px;' name='data_enclosure'>\n";
echo " <option value='\"'>\"</option>\n";
echo " <option value=''></option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-import_enclosure']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-import_file_upload']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input name='ulfile' type='file' class='formfld fileinput' id='ulfile'>\n";
echo "<br />\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br /><br />\n";
echo "<input name='type' type='hidden' value='csv'>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>
+28 -26
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2020
Portions created by the Initial Developer are Copyright (C) 2018 - 2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -42,15 +41,21 @@
$language = new text;
$text = $language->get();
//define variable
$search = '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the http post data
if (is_array($_POST['access_controls'])) {
$action = $_POST['action'];
$search = $_POST['search'];
if (!empty($_POST['access_controls'])) {
$action = $_POST['action'] ?? '';
$search = $_POST['search'] ?? '';
$access_controls = $_POST['access_controls'];
}
//process the http post data by action
if ($action != '' && is_array($access_controls) && @sizeof($access_controls) != 0) {
if (!empty($action) && !empty($access_controls) && count($access_controls) > 0) {
//validate the token
$token = new token;
@@ -61,8 +66,9 @@
}
//prepare the array
foreach($access_controls as $row) {
$array['access_controls'][$x]['checked'] = $row['checked'];
$x = 0;
foreach ($access_controls as $row) {
$array['access_controls'][$x]['checked'] = $row['checked'] ?? null;
$array['access_controls'][$x]['access_control_uuid'] = $row['access_control_uuid'];
$x++;
}
@@ -92,13 +98,13 @@
}
//redirect the user
header('Location: access_controls.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: access_controls.php'.(!empty($search) ? '?search='.urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search
if (isset($_GET["search"])) {
@@ -109,7 +115,7 @@
//get the count
$sql = "select count(access_control_uuid) ";
$sql .= "from v_access_controls ";
if (isset($_GET["search"])) {
if (!empty($search)) {
$sql .= "where (";
$sql .= " lower(access_control_name) like :search ";
$sql .= " or lower(access_control_default) like :search ";
@@ -117,7 +123,7 @@
$sql .= ") ";
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//get the list
$sql = "select ";
@@ -126,7 +132,7 @@
$sql .= "access_control_default, ";
$sql .= "access_control_description ";
$sql .= "from v_access_controls ";
if (isset($_GET["search"])) {
if (!empty($search)) {
$sql .= "where (";
$sql .= " lower(access_control_name) like :search ";
$sql .= " or lower(access_control_default) like :search ";
@@ -134,9 +140,8 @@
$sql .= ") ";
}
$sql .= order_by($order_by, $order, 'access_control_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$access_controls = $database->select($sql, $parameters, 'all');
$access_controls = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -151,6 +156,7 @@
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-access_controls']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'type'=>'button','id'=>'button_reload','link'=>'access_controls_reload.php'.(!empty($search) ? '?search='.urlencode($search) : null),'style'=>'margin-right: 15px;']);
if (permission_exists('access_control_add')) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','name'=>'btn_add','link'=>'access_control_edit.php']);
}
@@ -164,9 +170,6 @@
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'access_controls.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
@@ -190,18 +193,18 @@
echo "<tr class='list-header'>\n";
if (permission_exists('access_control_add') || permission_exists('access_control_edit') || permission_exists('access_control_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($access_controls ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($access_controls) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
echo th_order_by('access_control_name', $text['label-access_control_name'], $order_by, $order);
echo th_order_by('access_control_default', $text['label-access_control_default'], $order_by, $order);
echo " <th class='hide-sm-dn'>".$text['label-access_control_description']."</th>\n";
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('access_control_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($access_controls) && @sizeof($access_controls) != 0) {
if (!empty($access_controls) && count($access_controls) > 0) {
$x = 0;
foreach ($access_controls as $row) {
if (permission_exists('access_control_edit')) {
@@ -224,7 +227,7 @@
echo " </td>\n";
echo " <td>".escape($row['access_control_default'])."</td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['access_control_description'])."</td>\n";
if (permission_exists('access_control_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('access_control_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
@@ -237,7 +240,6 @@
echo "</table>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
@@ -0,0 +1,62 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('access_control_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//set the variables
$search = $_REQUEST['search'] ?? '';
//create event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
//run the command
$result = rtrim(event_socket_request($fp, 'api reloadacl'));
//add message
message::add($result, 'alert');
//close the connection
fclose($fp);
}
//redirect
$search = preg_replace('#[^a-zA-Z0-9_\-\.]# ', '', $search);
$location = 'access_controls.php'.($search != '' ? "?search=".urlencode($search) : null);
header("Location: ".$location);
?>
+48 -4
View File
@@ -84,6 +84,30 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_access_control_nodes";
@@ -111,12 +135,32 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the IP CIDR range.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "node_domain";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the domain.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "node_description";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
+100 -39
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2016 - 2022
Portions created by the Initial Developer are Copyright (C) 2016 - 2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -32,10 +32,12 @@
$database = new database;
$num_rows = $database->select($sql, null, 'column');
if ($num_rows == 0) {
//set the directory
$xml_dir = $_SESSION["switch"]["conf"]["dir"].'/autoload_configs';
$xml_file = $xml_dir."/acl.conf.xml";
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/resources/templates/conf/autoload_configs/acl.conf';
$xml_file_alt = $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/switch/resources/conf/autoload_configs/acl.conf';
//load the xml and save it into an array
if (file_exists($xml_file)) {
$xml_string = file_get_contents($xml_file);
@@ -46,13 +48,13 @@
else {
$xml_string = "<configuration name=\"acl.conf\" description=\"Network Lists\">\n";
$xml_string .= " <network-lists>\n";
$xml_string .= " <list name=\"rfc1918\" default=\"allow\">\n";
$xml_string .= " <list name=\"rfc1918\" default=\"deny\">\n";
$xml_string .= " <node type=\"allow\" cidr=\"10.0.0.0/8\"/>\n";
$xml_string .= " <node type=\"allow\" cidr=\"172.16.0.0/12\"/>\n";
$xml_string .= " <node type=\"allow\" cidr=\"192.168.0.0/16\"/>\n";
$xml_string .= " </list>\n";
$xml_string .= " <list name=\"domains\" default=\"deny\">\n";
$xml_string .= " <node type=\"allow\" domain=\"".$_SESSION['domain_name']."\"/>\n";
$xml_string .= " <list name=\"providers\" default=\"deny\">\n";
//$xml_string .= " <node type=\"allow\" domain=\"".$_SESSION['domain_name']."\"/>\n";
$xml_string .= " </list>\n";
$xml_string .= " </network-lists>\n";
$xml_string .= "</configuration>\n";
@@ -62,12 +64,13 @@
$conf_array = json_decode($json, true);
//process the array
foreach($conf_array['network-lists']['list'] as $list) {
//get the attributes
if (is_array($conf_array['network-lists']['list'])) {
foreach($conf_array['network-lists']['list'] as $list) {
//get the attributes
$access_control_name = $list['@attributes']['name'];
$access_control_default = $list['@attributes']['default'];
//insert the name, description
//insert the name, description
$access_control_uuid = uuid();
$array['access_controls'][0]['access_control_uuid'] = $access_control_uuid;
$array['access_controls'][0]['access_control_name'] = $access_control_name;
@@ -84,42 +87,40 @@
$p->delete('access_control_add', 'temp');
//normalize the array - needed because the array is inconsistent when there is only one row vs multiple
if (strlen($list['node']['@attributes']['type']) > 0) {
//normalize the array - needed because the array is inconsistent when there is only one row vs multiple
if (!empty($list['node']['@attributes']['type'])) {
$list['node'][]['@attributes'] = $list['node']['@attributes'];
unset($list['node']['@attributes']);
}
//add the nodes
foreach ($list['node'] as $row) {
//get the name and value pair
$node_type = $row['@attributes']['type'];
$node_cidr = $row['@attributes']['cidr'];
$node_domain = $row['@attributes']['domain'];
$node_description = $row['@attributes']['description'];
//replace $${domain}
if (strlen($node_domain) > 0) {
$node_domain = str_replace("\$\${domain}", $domain_name, $node_domain);
//add the nodes
if (is_array($list['node'])) {
foreach ($list['node'] as $row) {
//get the name and value pair
$node_type = $row['@attributes']['type'];
$node_cidr = $row['@attributes']['cidr'];
$node_description = $row['@attributes']['description'];
//add the profile settings into the database
$access_control_node_uuid = uuid();
$array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid;
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
$array['access_control_nodes'][0]['node_type'] = $node_type;
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
$array['access_control_nodes'][0]['node_description'] = $node_description;
$p = new permissions;
$p->add('access_control_node_add', 'temp');
$database = new database;
$database->app_name = 'access_controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array, false);
unset($array);
$p->delete('access_control_node_add', 'temp');
}
//add the profile settings into the database
$access_control_node_uuid = uuid();
$array['access_control_nodes'][0]['access_control_node_uuid'] = $access_control_node_uuid;
$array['access_control_nodes'][0]['access_control_uuid'] = $access_control_uuid;
$array['access_control_nodes'][0]['node_type'] = $node_type;
$array['access_control_nodes'][0]['node_cidr'] = $node_cidr;
$array['access_control_nodes'][0]['node_domain'] = $node_domain;
$array['access_control_nodes'][0]['node_description'] = $node_description;
$p = new permissions;
$p->add('access_control_node_add', 'temp');
$database = new database;
$database->app_name = 'access_controls';
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array, false);
unset($array);
$p->delete('access_control_node_add', 'temp');
}
}
}
@@ -130,6 +131,66 @@
}
unset($sql, $num_rows);
//rename domains access control to providers
$sql = "select count(*) from v_access_controls ";
$sql .= "where access_control_name = 'domains' ";
$database = new database;
$num_rows = $database->select($sql, null, 'column');
if ($num_rows > 0) {
//update the access control name
$sql = "update v_access_controls set access_control_name = 'providers' ";
$sql .= "where access_control_name = 'domains' ";
$database = new database;
$database->execute($sql, null);
unset($sql);
//update the sip profile settings
$sql = "update v_sip_profile_settings set sip_profile_setting_value = 'providers' ";
$sql .= "where (sip_profile_setting_name = 'apply-inbound-acl' or sip_profile_setting_name = 'apply-register-acl') ";
$sql .= "and sip_profile_setting_value = 'domains'; ";
$database = new database;
$database->execute($sql, null);
unset($sql);
//clear the cache
$cache = new cache;
$cache->delete("configuration:acl.conf");
$cache->delete("configuration:sofia.conf:".gethostname());
//create the event socket connection
if (!$fp) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
}
//reload the acl
event_socket_request($fp, "api reloadacl");
//rescan each sip profile
$sql = "select sip_profile_name from v_sip_profiles ";
$sql .= "where sip_profile_enabled = 'true'; ";
$database = new database;
$sip_profiles = $database->select($sql, null, 'all');
if (is_array($sip_profiles)) {
foreach ($sip_profiles as $row) {
if ($fp) {
$command = "sofia profile '".$row['sip_profile_name']."' rescan";
//echo $command."\n";
$result = event_socket_request($fp, "api ".$command);
//echo $result."\n";
}
}
}
}
//remove orphaned access control nodes
$sql = "delete from v_access_control_nodes ";
$sql .= "where access_control_uuid not in ( ";
$sql .= " select access_control_uuid from v_access_controls ";
$sql .= ")";
$database = new database;
$database->execute($sql, null);
unset($sql);
}
?>
+200 -135
View File
@@ -1,435 +1,494 @@
<?php
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
$text['title-access_controls']['en-us'] = "Access Controls";
$text['title-access_controls']['en-gb'] = "Access Controls";
$text['title-access_controls']['ar-eg'] = "عناصر التحكم في الوصول";
$text['title-access_controls']['de-at'] = " Zugriffskontrolle"; //copied from de-de
$text['title-access_controls']['de-ch'] = " Zugriffskontrolle"; //copied from de-de
$text['title-access_controls']['de-de'] = " Zugriffskontrolle";
$text['title-access_controls']['de-at'] = "Zugriffskontrolle";
$text['title-access_controls']['de-ch'] = "Zugriffskontrolle";
$text['title-access_controls']['de-de'] = "Zugriffskontrolle";
$text['title-access_controls']['es-cl'] = "Controles de acceso";
$text['title-access_controls']['es-mx'] = "Controles de acceso"; //copied from es-cl
$text['title-access_controls']['fr-ca'] = "Contrôle d'accès"; //copied from fr-fr
$text['title-access_controls']['es-mx'] = "Controles de acceso";
$text['title-access_controls']['fr-ca'] = "Contrôle d'accès";
$text['title-access_controls']['fr-fr'] = "Contrôle d'accès";
$text['title-access_controls']['he-il'] = "בקרת גישה";
$text['title-access_controls']['it-it'] = "Controllo Accessi";
$text['title-access_controls']['nl-nl'] = "Toegangs Controle";
$text['title-access_controls']['pl-pl'] = "Kontrola dostępu";
$text['title-access_controls']['pt-br'] = "Controles de Acesso"; //copied from pt-pt
$text['title-access_controls']['pt-br'] = "Controles de Acesso";
$text['title-access_controls']['pt-pt'] = "Controles de Acesso";
$text['title-access_controls']['ro-ro'] = "Controale de acces";
$text['title-access_controls']['ru-ru'] = "Контроль доступа";
$text['title-access_controls']['sv-se'] = "Åtkomstkontroll";
$text['title-access_controls']['uk-ua'] = "контроль доступу";
$text['title-access_controls']['zh-cn'] = "访问控制";
$text['title-access_controls']['ja-jp'] = "アクセス制御";
$text['title-access_controls']['ko-kr'] = "액세스 제어";
$text['title-access_control_nodes']['en-us'] = "Nodes";
$text['title-access_control_nodes']['en-gb'] = "Nodes";
$text['title-access_control_nodes']['ar-eg'] = "العقد";
$text['title-access_control_nodes']['de-at'] = "Knoten"; //copied from de-de
$text['title-access_control_nodes']['de-ch'] = "Knoten"; //copied from de-de
$text['title-access_control_nodes']['de-at'] = "Knoten";
$text['title-access_control_nodes']['de-ch'] = "Knoten";
$text['title-access_control_nodes']['de-de'] = "Knoten";
$text['title-access_control_nodes']['es-cl'] = "Nodos";
$text['title-access_control_nodes']['es-mx'] = "Nodos"; //copied from es-cl
$text['title-access_control_nodes']['fr-ca'] = " nœuds"; //copied from fr-fr
$text['title-access_control_nodes']['fr-fr'] = " nœuds";
$text['title-access_control_nodes']['es-mx'] = "Nodos";
$text['title-access_control_nodes']['fr-ca'] = "nœuds";
$text['title-access_control_nodes']['fr-fr'] = "nœuds";
$text['title-access_control_nodes']['he-il'] = "בלוטות";
$text['title-access_control_nodes']['it-it'] = "Nodi";
$text['title-access_control_nodes']['nl-nl'] = "Knooppunten";
$text['title-access_control_nodes']['pl-pl'] = "węzły";
$text['title-access_control_nodes']['pt-br'] = "Nodes";
$text['title-access_control_nodes']['pt-pt'] = " Nodes";
$text['title-access_control_nodes']['pt-pt'] = "Nodes";
$text['title-access_control_nodes']['ro-ro'] = "Noduri";
$text['title-access_control_nodes']['ru-ru'] = "Узлы";
$text['title-access_control_nodes']['sv-se'] = "Noder";
$text['title-access_control_nodes']['uk-ua'] = "вузли";
$text['title-access_control_nodes']['zh-cn'] = "节点";
$text['title-access_control_nodes']['ja-jp'] = "ノード";
$text['title-access_control_nodes']['ko-kr'] = "노드";
$text['title-access_control_node']['en-us'] = "Node";
$text['title-access_control_node']['en-gb'] = "Node";
$text['title-access_control_node']['ar-eg'] = "العقدة";
$text['title-access_control_node']['de-at'] = "Netzknoten"; //copied from de-de
$text['title-access_control_node']['de-ch'] = "Netzknoten"; //copied from de-de
$text['title-access_control_node']['de-at'] = "Netzknoten";
$text['title-access_control_node']['de-ch'] = "Netzknoten";
$text['title-access_control_node']['de-de'] = "Netzknoten";
$text['title-access_control_node']['es-cl'] = "Nodo";
$text['title-access_control_node']['es-mx'] = "Nodo"; //copied from es-cl
$text['title-access_control_node']['fr-ca'] = " noeud"; //copied from fr-fr
$text['title-access_control_node']['fr-fr'] = " noeud";
$text['title-access_control_node']['es-mx'] = "Nodo";
$text['title-access_control_node']['fr-ca'] = "noeud";
$text['title-access_control_node']['fr-fr'] = "noeud";
$text['title-access_control_node']['he-il'] = "צומת";
$text['title-access_control_node']['it-it'] = "Nodo";
$text['title-access_control_node']['nl-nl'] = "Knooppunt";
$text['title-access_control_node']['pl-pl'] = "węzeł";
$text['title-access_control_node']['pt-br'] = "Nó"; //copied from pt-pt
$text['title-access_control_node']['pt-br'] = "Nó";
$text['title-access_control_node']['pt-pt'] = "Nó";
$text['title-access_control_node']['ro-ro'] = "Nod";
$text['title-access_control_node']['ru-ru'] = "Узел";
$text['title-access_control_node']['sv-se'] = "Nod";
$text['title-access_control_node']['uk-ua'] = "вузол";
$text['title-access_control_node']['zh-cn'] = "节点";
$text['title-access_control_node']['ja-jp'] = "ノード";
$text['title-access_control_node']['ko-kr'] = "마디";
$text['title-access_control']['en-us'] = "Access Control";
$text['title-access_control']['en-gb'] = "Access Control";
$text['title-access_control']['ar-eg'] = "التحكم في الوصول";
$text['title-access_control']['de-at'] = " Zugangskontrolle"; //copied from de-de
$text['title-access_control']['de-ch'] = " Zugangskontrolle"; //copied from de-de
$text['title-access_control']['de-de'] = " Zugangskontrolle";
$text['title-access_control']['de-at'] = "Zugangskontrolle";
$text['title-access_control']['de-ch'] = "Zugangskontrolle";
$text['title-access_control']['de-de'] = "Zugangskontrolle";
$text['title-access_control']['es-cl'] = "Control de acceso";
$text['title-access_control']['es-mx'] = "Control de acceso"; //copied from es-cl
$text['title-access_control']['fr-ca'] = "Contrôle d'accès"; //copied from fr-fr
$text['title-access_control']['es-mx'] = "Control de acceso";
$text['title-access_control']['fr-ca'] = "Contrôle d'accès";
$text['title-access_control']['fr-fr'] = "Contrôle d'accès";
$text['title-access_control']['he-il'] = "בקרת גישה";
$text['title-access_control']['it-it'] = "Controllo Accesso";
$text['title-access_control']['nl-nl'] = "Toegangs Controle";
$text['title-access_control']['pl-pl'] = "Kontrola dostępu";
$text['title-access_control']['pt-br'] = "Controle de acesso"; //copied from pt-pt
$text['title-access_control']['pt-br'] = "Controle de acesso";
$text['title-access_control']['pt-pt'] = "Controle de acesso";
$text['title-access_control']['ro-ro'] = "Controlul accesului";
$text['title-access_control']['ru-ru'] = "Управление доступом";
$text['title-access_control']['sv-se'] = "Åtkomstkontroll";
$text['title-access_control']['uk-ua'] = "Управління доступом";
$text['title-access_control']['zh-cn'] = "访问控制";
$text['title-access_control']['ja-jp'] = "アクセス制御";
$text['title-access_control']['ko-kr'] = "액세스 제어";
$text['title_description-access_controls']['en-us'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title_description-access_controls']['en-gb'] = "Access control list can allow or deny ranges of IP addresses.";
$text['title_description-access_controls']['ar-eg'] = "قائمة التحكم بالوصول يمكن السماح أو الرفض نطاقات العناوين.";
$text['title_description-access_controls']['de-at'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
$text['title_description-access_controls']['de-ch'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen."; //copied from de-de
$text['title_description-access_controls']['de-de'] = " Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['es-cl'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title_description-access_controls']['es-mx'] = " Lista de control de acceso puede permitir o denegar los rangos de direcciones IP."; //copied from es-cl
$text['title_description-access_controls']['fr-ca'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP."; //copied from fr-fr
$text['title_description-access_controls']['fr-fr'] = " Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title_description-access_controls']['de-at'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['de-ch'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['de-de'] = "Die Zugriffskontrollliste kann Bereiche von IP Adressen zulassen oder ablehnen.";
$text['title_description-access_controls']['es-cl'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title_description-access_controls']['es-mx'] = "Lista de control de acceso puede permitir o denegar los rangos de direcciones IP.";
$text['title_description-access_controls']['fr-ca'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title_description-access_controls']['fr-fr'] = "Liste de contrôle d'accès peut autoriser ou refuser des plages d'adresses IP.";
$text['title_description-access_controls']['he-il'] = " רשימת בקרת גישה יכולה לאפשר או למנוע טווחים של כתובות IP.";
$text['title_description-access_controls']['it-it'] = "Le liste per il controllo di accesso permettono o negano l'accesso a range di IP.";
$text['title_description-access_controls']['nl-nl'] = "Toegang Controle lijst kan IP adres reeks toestaan of verbieden.";
$text['title_description-access_controls']['pl-pl'] = "Lista kontroli dostępu może umożliwić lub zablokować zakresy adresów IP.";
$text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP."; //copied from pt-pt
$text['title_description-access_controls']['pt-br'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title_description-access_controls']['pt-pt'] = "Lista de controle de acesso pode permitir ou negar intervalos de endereços IP.";
$text['title_description-access_controls']['ro-ro'] = "Lista de control al accesului poate permite sau refuza intervale de adrese IP.";
$text['title_description-access_controls']['ru-ru'] = "Контроль доступа может разрешить или запретить диапазоны IP адресов.";
$text['title_description-access_controls']['sv-se'] = "Åtkomstkontrollista kan tillåta eller neka intervall av IP-adresser.";
$text['title_description-access_controls']['uk-ua'] = "Список контролю доступу може дозволити або заборонити діапазони IP-адрес.";
$text['title_description-access_controls']['zh-cn'] = "访问控制列表可以允许或拒绝 IP 地址范围。";
$text['title_description-access_controls']['ja-jp'] = "アクセス コントロール リストでは、IP アドレスの範囲を許可または拒否できます。";
$text['title_description-access_controls']['ko-kr'] = "액세스 제어 목록은 IP 주소 범위를 허용하거나 거부할 수 있습니다.";
$text['label-node_type']['en-us'] = "Type";
$text['label-node_type']['en-gb'] = "Type";
$text['label-node_type']['ar-eg'] = "اكتب";
$text['label-node_type']['de-at'] = "Art"; //copied from de-de
$text['label-node_type']['de-ch'] = "Art"; //copied from de-de
$text['label-node_type']['de-at'] = "Art";
$text['label-node_type']['de-ch'] = "Art";
$text['label-node_type']['de-de'] = "Art";
$text['label-node_type']['es-cl'] = "Escribe";
$text['label-node_type']['es-mx'] = "Escribe"; //copied from es-cl
$text['label-node_type']['fr-ca'] = "Type"; //copied from fr-fr
$text['label-node_type']['es-mx'] = "Escribe";
$text['label-node_type']['fr-ca'] = "Type";
$text['label-node_type']['fr-fr'] = "Type";
$text['label-node_type']['he-il'] = "סוג";
$text['label-node_type']['it-it'] = "Tipo";
$text['label-node_type']['nl-nl'] = "Type";
$text['label-node_type']['pl-pl'] = "typ";
$text['label-node_type']['pt-br'] = "Tipo"; //copied from pt-pt
$text['label-node_type']['pt-br'] = "Tipo";
$text['label-node_type']['pt-pt'] = "Tipo";
$text['label-node_type']['ro-ro'] = "Tip";
$text['label-node_type']['ru-ru'] = "Тип";
$text['label-node_type']['sv-se'] = "Typ";
$text['label-node_type']['uk-ua'] = "Тип";
$text['label-node_type']['zh-cn'] = "类型";
$text['label-node_type']['ja-jp'] = "タイプ";
$text['label-node_type']['ko-kr'] = "유형";
$text['label-node_domain']['en-us'] = "Domain";
$text['label-node_domain']['en-gb'] = "Domain";
$text['label-node_domain']['ar-eg'] = "مجال";
$text['label-node_domain']['de-at'] = " Domäne"; //copied from de-de
$text['label-node_domain']['de-ch'] = " Domäne"; //copied from de-de
$text['label-node_domain']['de-de'] = " Domäne";
$text['label-node_domain']['de-at'] = "Domäne";
$text['label-node_domain']['de-ch'] = "Domäne";
$text['label-node_domain']['de-de'] = "Domäne";
$text['label-node_domain']['es-cl'] = "Dominio";
$text['label-node_domain']['es-mx'] = "Dominio"; //copied from es-cl
$text['label-node_domain']['fr-ca'] = "Domaine"; //copied from fr-fr
$text['label-node_domain']['es-mx'] = "Dominio";
$text['label-node_domain']['fr-ca'] = "Domaine";
$text['label-node_domain']['fr-fr'] = "Domaine";
$text['label-node_domain']['he-il'] = "תחום";
$text['label-node_domain']['it-it'] = "Dominio";
$text['label-node_domain']['nl-nl'] = "Domein";
$text['label-node_domain']['pl-pl'] = "domeny";
$text['label-node_domain']['pt-br'] = "Domínio"; //copied from pt-pt
$text['label-node_domain']['pt-br'] = "Domínio";
$text['label-node_domain']['pt-pt'] = "Domínio";
$text['label-node_domain']['ro-ro'] = "Domeniu";
$text['label-node_domain']['ru-ru'] = "Домен";
$text['label-node_domain']['sv-se'] = "Domän";
$text['label-node_domain']['uk-ua'] = "домен";
$text['label-node_domain']['zh-cn'] = "领域";
$text['label-node_domain']['ja-jp'] = "ドメイン";
$text['label-node_domain']['ko-kr'] = "도메인";
$text['label-node_description']['en-us'] = "Description";
$text['label-node_description']['en-gb'] = "Description";
$text['label-node_description']['ar-eg'] = "وصف";
$text['label-node_description']['de-at'] = "Beschreibung"; //copied from de-de
$text['label-node_description']['de-ch'] = "Beschreibung"; //copied from de-de
$text['label-node_description']['de-at'] = "Beschreibung";
$text['label-node_description']['de-ch'] = "Beschreibung";
$text['label-node_description']['de-de'] = "Beschreibung";
$text['label-node_description']['es-cl'] = "Descripción";
$text['label-node_description']['es-mx'] = "Descripción"; //copied from es-cl
$text['label-node_description']['fr-ca'] = "Description"; //copied from fr-fr
$text['label-node_description']['es-mx'] = "Descripción";
$text['label-node_description']['fr-ca'] = "Description";
$text['label-node_description']['fr-fr'] = "Description";
$text['label-node_description']['he-il'] = "תיאור";
$text['label-node_description']['it-it'] = "Descrizione";
$text['label-node_description']['nl-nl'] = "Beschrijving";
$text['label-node_description']['pl-pl'] = "opis";
$text['label-node_description']['pt-br'] = "Descrição"; //copied from pt-pt
$text['label-node_description']['pt-br'] = "Descrição";
$text['label-node_description']['pt-pt'] = "Descrição";
$text['label-node_description']['ro-ro'] = "Descriere";
$text['label-node_description']['ru-ru'] = "Описание";
$text['label-node_description']['sv-se'] = "Beskrivning";
$text['label-node_description']['uk-ua'] = "опис";
$text['label-node_description']['zh-cn'] = "描述";
$text['label-node_description']['ja-jp'] = "説明";
$text['label-node_description']['ko-kr'] = "설명";
$text['label-node_cidr']['en-us'] = "CIDR";
$text['label-node_cidr']['en-gb'] = "CIDR";
$text['label-node_cidr']['ar-eg'] = "CIDR";
$text['label-node_cidr']['de-at'] = "CIDR"; //copied from de-de
$text['label-node_cidr']['de-ch'] = "CIDR"; //copied from de-de
$text['label-node_cidr']['de-at'] = "CIDR";
$text['label-node_cidr']['de-ch'] = "CIDR";
$text['label-node_cidr']['de-de'] = "CIDR";
$text['label-node_cidr']['es-cl'] = "CIDR";
$text['label-node_cidr']['es-mx'] = "CIDR"; //copied from es-cl
$text['label-node_cidr']['fr-ca'] = "CIDR"; //copied from fr-fr
$text['label-node_cidr']['es-mx'] = "CIDR";
$text['label-node_cidr']['fr-ca'] = "CIDR";
$text['label-node_cidr']['fr-fr'] = "CIDR";
$text['label-node_cidr']['he-il'] = "CIDR";
$text['label-node_cidr']['it-it'] = "CIDR";
$text['label-node_cidr']['nl-nl'] = "CIDR";
$text['label-node_cidr']['pl-pl'] = "CIDR";
$text['label-node_cidr']['pt-br'] = "CIDR"; //copied from pt-pt
$text['label-node_cidr']['pt-br'] = "CIDR";
$text['label-node_cidr']['pt-pt'] = "CIDR";
$text['label-node_cidr']['ro-ro'] = "CIDR";
$text['label-node_cidr']['ru-ru'] = "CIDR";
$text['label-node_cidr']['sv-se'] = "CIDR";
$text['label-node_cidr']['uk-ua'] = "CIDR";
$text['label-node_cidr']['zh-cn'] = "CIDR";
$text['label-node_cidr']['ja-jp'] = "CIDR";
$text['label-node_cidr']['ko-kr'] = "CIDR";
$text['label-deny']['en-us'] = "deny";
$text['label-deny']['en-gb'] = "deny";
$text['label-deny']['ar-eg'] = "تنكر";
$text['label-deny']['de-at'] = " verbieten"; //copied from de-de
$text['label-deny']['de-ch'] = " verbieten"; //copied from de-de
$text['label-deny']['de-de'] = " verbieten";
$text['label-deny']['de-at'] = "verbieten";
$text['label-deny']['de-ch'] = "verbieten";
$text['label-deny']['de-de'] = "verbieten";
$text['label-deny']['es-cl'] = "Negar";
$text['label-deny']['es-mx'] = "Negar"; //copied from es-cl
$text['label-deny']['fr-ca'] = " nier"; //copied from fr-fr
$text['label-deny']['fr-fr'] = " nier";
$text['label-deny']['es-mx'] = "Negar";
$text['label-deny']['fr-ca'] = "nier";
$text['label-deny']['fr-fr'] = "nier";
$text['label-deny']['he-il'] = "להכחיש";
$text['label-deny']['it-it'] = "nega";
$text['label-deny']['nl-nl'] = "verbieden";
$text['label-deny']['pl-pl'] = "odrzuć";
$text['label-deny']['pt-br'] = "negar"; //copied from pt-pt
$text['label-deny']['pt-br'] = "negar";
$text['label-deny']['pt-pt'] = "negar";
$text['label-deny']['ro-ro'] = "Nega";
$text['label-deny']['ru-ru'] = "запретить";
$text['label-deny']['sv-se'] = "förneka";
$text['label-deny']['uk-ua'] = "правда";
$text['label-deny']['zh-cn'] = "否定";
$text['label-deny']['ja-jp'] = "拒否";
$text['label-deny']['ko-kr'] = "부인하다";
$text['label-allow']['en-us'] = "allow";
$text['label-allow']['en-gb'] = "allow";
$text['label-allow']['ar-eg'] = "السماح";
$text['label-allow']['de-at'] = "erlauben"; //copied from de-de
$text['label-allow']['de-ch'] = "erlauben"; //copied from de-de
$text['label-allow']['de-at'] = "erlauben";
$text['label-allow']['de-ch'] = "erlauben";
$text['label-allow']['de-de'] = "erlauben";
$text['label-allow']['es-cl'] = "Permitir";
$text['label-allow']['es-mx'] = "Permitir"; //copied from es-cl
$text['label-allow']['fr-ca'] = " permettre"; //copied from fr-fr
$text['label-allow']['fr-fr'] = " permettre";
$text['label-allow']['es-mx'] = "Permitir";
$text['label-allow']['fr-ca'] = "permettre";
$text['label-allow']['fr-fr'] = "permettre";
$text['label-allow']['he-il'] = "לאפשר";
$text['label-allow']['it-it'] = "permetti";
$text['label-allow']['nl-nl'] = "toestaan";
$text['label-allow']['pl-pl'] = "zezwól";
$text['label-allow']['pt-br'] = "permitir"; //copied from pt-pt
$text['label-allow']['pt-br'] = "permitir";
$text['label-allow']['pt-pt'] = "permitir";
$text['label-allow']['ro-ro'] = "Permite";
$text['label-allow']['ru-ru'] = "разрешить";
$text['label-allow']['sv-se'] = "tillåta";
$text['label-allow']['uk-ua'] = "дозволяти";
$text['label-allow']['zh-cn'] = "允许";
$text['label-allow']['ja-jp'] = "許可する";
$text['label-allow']['ko-kr'] = "허용하다";
$text['label-access_control_name']['en-us'] = "Name";
$text['label-access_control_name']['en-gb'] = "Name";
$text['label-access_control_name']['ar-eg'] = "اسم";
$text['label-access_control_name']['de-at'] = "Name"; //copied from de-de
$text['label-access_control_name']['de-ch'] = "Name"; //copied from de-de
$text['label-access_control_name']['de-at'] = "Name";
$text['label-access_control_name']['de-ch'] = "Name";
$text['label-access_control_name']['de-de'] = "Name";
$text['label-access_control_name']['es-cl'] = "Nombre";
$text['label-access_control_name']['es-mx'] = "Nombre"; //copied from es-cl
$text['label-access_control_name']['fr-ca'] = "Nom"; //copied from fr-fr
$text['label-access_control_name']['es-mx'] = "Nombre";
$text['label-access_control_name']['fr-ca'] = "Nom";
$text['label-access_control_name']['fr-fr'] = "Nom";
$text['label-access_control_name']['he-il'] = "שם";
$text['label-access_control_name']['it-it'] = "Nome";
$text['label-access_control_name']['nl-nl'] = "Naam";
$text['label-access_control_name']['pl-pl'] = " Imię";
$text['label-access_control_name']['pt-br'] = "Nome"; //copied from pt-pt
$text['label-access_control_name']['pl-pl'] = "Imię";
$text['label-access_control_name']['pt-br'] = "Nome";
$text['label-access_control_name']['pt-pt'] = "Nome";
$text['label-access_control_name']['ro-ro'] = "Nume";
$text['label-access_control_name']['ru-ru'] = "Имя";
$text['label-access_control_name']['sv-se'] = "namn";
$text['label-access_control_name']['uk-ua'] = "ім'я";
$text['label-access_control_name']['zh-cn'] = "姓名";
$text['label-access_control_name']['ja-jp'] = "名前";
$text['label-access_control_name']['ko-kr'] = "이름";
$text['label-access_control_default']['en-us'] = "Default";
$text['label-access_control_default']['en-gb'] = "Default";
$text['label-access_control_default']['ar-eg'] = "افتراضي";
$text['label-access_control_default']['de-at'] = "Standard"; //copied from de-de
$text['label-access_control_default']['de-ch'] = "Standard"; //copied from de-de
$text['label-access_control_default']['de-at'] = "Standard";
$text['label-access_control_default']['de-ch'] = "Standard";
$text['label-access_control_default']['de-de'] = "Standard";
$text['label-access_control_default']['es-cl'] = "Defecto";
$text['label-access_control_default']['es-mx'] = "Defecto"; //copied from es-cl
$text['label-access_control_default']['fr-ca'] = "Par défaut"; //copied from fr-fr
$text['label-access_control_default']['es-mx'] = "Defecto";
$text['label-access_control_default']['fr-ca'] = "Par défaut";
$text['label-access_control_default']['fr-fr'] = "Par défaut";
$text['label-access_control_default']['he-il'] = " ברירת מחדל";
$text['label-access_control_default']['he-il'] = "ברירת מחדל";
$text['label-access_control_default']['it-it'] = "Predefinito";
$text['label-access_control_default']['nl-nl'] = "Standaard";
$text['label-access_control_default']['pl-pl'] = "Domyślnie";
$text['label-access_control_default']['pt-br'] = "Padrão"; //copied from pt-pt
$text['label-access_control_default']['pt-br'] = "Padrão";
$text['label-access_control_default']['pt-pt'] = "Padrão";
$text['label-access_control_default']['ro-ro'] = "Implicit";
$text['label-access_control_default']['ru-ru'] = "По умолчанию";
$text['label-access_control_default']['sv-se'] = "Standard";
$text['label-access_control_default']['uk-ua'] = "дефолт";
$text['label-access_control_default']['zh-cn'] = "默认";
$text['label-access_control_default']['ja-jp'] = "デフォルト";
$text['label-access_control_default']['ko-kr'] = "기본";
$text['label-access_control_nodes']['en-us'] = "Nodes";
$text['label-access_control_nodes']['en-gb'] = "Nodes";
$text['label-access_control_nodes']['ar-eg'] = "العقد";
$text['label-access_control_nodes']['de-at'] = "Knoten"; //copied from de-de
$text['label-access_control_nodes']['de-ch'] = "Knoten"; //copied from de-de
$text['label-access_control_nodes']['de-at'] = "Knoten";
$text['label-access_control_nodes']['de-ch'] = "Knoten";
$text['label-access_control_nodes']['de-de'] = "Knoten";
$text['label-access_control_nodes']['es-cl'] = "Nodos";
$text['label-access_control_nodes']['es-mx'] = "Nodos"; //copied from es-cl
$text['label-access_control_nodes']['fr-ca'] = " nœuds"; //copied from fr-fr
$text['label-access_control_nodes']['fr-fr'] = " nœuds";
$text['label-access_control_nodes']['es-mx'] = "Nodos";
$text['label-access_control_nodes']['fr-ca'] = "nœuds";
$text['label-access_control_nodes']['fr-fr'] = "nœuds";
$text['label-access_control_nodes']['he-il'] = "בלוטות";
$text['label-access_control_nodes']['it-it'] = "Nodi";
$text['label-access_control_nodes']['nl-nl'] = "Knooppunten";
$text['label-access_control_nodes']['pl-pl'] = "węzły";
$text['label-access_control_nodes']['pt-br'] = "Nodes";
$text['label-access_control_nodes']['pt-pt'] = " Nodes";
$text['label-access_control_nodes']['pt-pt'] = "Nodes";
$text['label-access_control_nodes']['ro-ro'] = "Noduri";
$text['label-access_control_nodes']['ru-ru'] = "Узлы";
$text['label-access_control_nodes']['sv-se'] = "Noder";
$text['label-access_control_nodes']['uk-ua'] = "вузли";
$text['label-access_control_nodes']['zh-cn'] = "节点";
$text['label-access_control_nodes']['ja-jp'] = "ノード";
$text['label-access_control_nodes']['ko-kr'] = "노드";
$text['label-access_control_description']['en-us'] = "Description";
$text['label-access_control_description']['en-gb'] = "Description";
$text['label-access_control_description']['ar-eg'] = "وصف";
$text['label-access_control_description']['de-at'] = "Beschreibung"; //copied from de-de
$text['label-access_control_description']['de-ch'] = "Beschreibung"; //copied from de-de
$text['label-access_control_description']['de-at'] = "Beschreibung";
$text['label-access_control_description']['de-ch'] = "Beschreibung";
$text['label-access_control_description']['de-de'] = "Beschreibung";
$text['label-access_control_description']['es-cl'] = "Descripción";
$text['label-access_control_description']['es-mx'] = "Descripción"; //copied from es-cl
$text['label-access_control_description']['fr-ca'] = "Description"; //copied from fr-fr
$text['label-access_control_description']['es-mx'] = "Descripción";
$text['label-access_control_description']['fr-ca'] = "Description";
$text['label-access_control_description']['fr-fr'] = "Description";
$text['label-access_control_description']['he-il'] = "תיאור";
$text['label-access_control_description']['it-it'] = "Descrizione";
$text['label-access_control_description']['nl-nl'] = "Omschrijving";
$text['label-access_control_description']['pl-pl'] = "opis";
$text['label-access_control_description']['pt-br'] = "Descrição"; //copied from pt-pt
$text['label-access_control_description']['pt-br'] = "Descrição";
$text['label-access_control_description']['pt-pt'] = "Descrição";
$text['label-access_control_description']['ro-ro'] = "Descriere";
$text['label-access_control_description']['ru-ru'] = "Описание";
$text['label-access_control_description']['sv-se'] = "Beskrivning";
$text['label-access_control_description']['uk-ua'] = "опис";
$text['label-access_control_description']['zh-cn'] = "描述";
$text['label-access_control_description']['ja-jp'] = "説明";
$text['label-access_control_description']['ko-kr'] = "설명";
$text['description-node_type']['en-us'] = "Select the type.";
$text['description-node_type']['en-gb'] = "Select the type.";
$text['description-node_type']['ar-eg'] = "حدد نوع.";
$text['description-node_type']['de-at'] = " Wählen Sie den Typ."; //copied from de-de
$text['description-node_type']['de-ch'] = " Wählen Sie den Typ."; //copied from de-de
$text['description-node_type']['de-de'] = " Wählen Sie den Typ.";
$text['description-node_type']['de-at'] = "Wählen Sie den Typ.";
$text['description-node_type']['de-ch'] = "Wählen Sie den Typ.";
$text['description-node_type']['de-de'] = "Wählen Sie den Typ.";
$text['description-node_type']['es-cl'] = "Seleccione el tipo.";
$text['description-node_type']['es-mx'] = "Seleccione el tipo."; //copied from es-cl
$text['description-node_type']['fr-ca'] = " Sélectionnez le type"; //copied from fr-fr
$text['description-node_type']['fr-fr'] = " Sélectionnez le type";
$text['description-node_type']['he-il'] = " בחר את הסוג.";
$text['description-node_type']['es-mx'] = "Seleccione el tipo.";
$text['description-node_type']['fr-ca'] = "Sélectionnez le type";
$text['description-node_type']['fr-fr'] = "Sélectionnez le type";
$text['description-node_type']['he-il'] = "בחר את הסוג.";
$text['description-node_type']['it-it'] = "Seleziona il tipo.";
$text['description-node_type']['nl-nl'] = "Selecteer het type.";
$text['description-node_type']['pl-pl'] = "Wybierz rodzaj.";
$text['description-node_type']['pt-br'] = "Selecione o tipo."; //copied from pt-pt
$text['description-node_type']['pt-br'] = "Selecione o tipo.";
$text['description-node_type']['pt-pt'] = "Selecione o tipo.";
$text['description-node_type']['ro-ro'] = "Selectați tipul.";
$text['description-node_type']['ru-ru'] = "Выберите тип.";
$text['description-node_type']['sv-se'] = "Välj typ.";
$text['description-node_type']['uk-ua'] = "Виберіть тип.";
$text['description-node_type']['zh-cn'] = "选择类型。";
$text['description-node_type']['ja-jp'] = "タイプを選択してください。";
$text['description-node_type']['ko-kr'] = "유형을 선택합니다.";
$text['description-node_domain']['en-us'] = "Enter the domain name.";
$text['description-node_domain']['en-gb'] = "Enter the domain name.";
$text['description-node_domain']['ar-eg'] = "أدخل اسم المجال.";
$text['description-node_domain']['de-at'] = "Geben Sie den Domain-Namen."; //copied from de-de
$text['description-node_domain']['de-ch'] = "Geben Sie den Domain-Namen."; //copied from de-de
$text['description-node_domain']['de-at'] = "Geben Sie den Domain-Namen.";
$text['description-node_domain']['de-ch'] = "Geben Sie den Domain-Namen.";
$text['description-node_domain']['de-de'] = "Geben Sie den Domain-Namen.";
$text['description-node_domain']['es-cl'] = "Introduzca el nombre de dominio.";
$text['description-node_domain']['es-mx'] = "Introduzca el nombre de dominio."; //copied from es-cl
$text['description-node_domain']['fr-ca'] = "Entrez le nom de domaine."; //copied from fr-fr
$text['description-node_domain']['es-mx'] = "Introduzca el nombre de dominio.";
$text['description-node_domain']['fr-ca'] = "Entrez le nom de domaine.";
$text['description-node_domain']['fr-fr'] = "Entrez le nom de domaine.";
$text['description-node_domain']['he-il'] = " הזן את שם הדומיין.";
$text['description-node_domain']['it-it'] = "Inserisci il dominio.";
$text['description-node_domain']['nl-nl'] = "Voer de domeinnaam in.";
$text['description-node_domain']['pl-pl'] = " Wprowadź nazwę domeny.";
$text['description-node_domain']['pt-br'] = "Digite o nome de domínio."; //copied from pt-pt
$text['description-node_domain']['pl-pl'] = "Wprowadź nazwę domeny.";
$text['description-node_domain']['pt-br'] = "Digite o nome de domínio.";
$text['description-node_domain']['pt-pt'] = "Digite o nome de domínio.";
$text['description-node_domain']['ro-ro'] = "Introduceți numele de domeniu.";
$text['description-node_domain']['ru-ru'] = "Введите имя домена.";
$text['description-node_domain']['sv-se'] = "Ange domännamnet.";
$text['description-node_domain']['uk-ua'] = "Введіть ім'я домену.";
$text['description-node_domain']['zh-cn'] = "输入域名。";
$text['description-node_domain']['ja-jp'] = "ドメイン名を入力します。";
$text['description-node_domain']['ko-kr'] = "도메인 이름을 입력합니다.";
$text['description-node_description']['en-us'] = "Enter the description.";
$text['description-node_description']['en-gb'] = "Enter the description.";
$text['description-node_description']['ar-eg'] = "أدخل الوصف.";
$text['description-node_description']['de-at'] = "Geben Sie die Beschreibung ein."; //copied from de-de
$text['description-node_description']['de-ch'] = "Geben Sie die Beschreibung ein."; //copied from de-de
$text['description-node_description']['de-at'] = "Geben Sie die Beschreibung ein.";
$text['description-node_description']['de-ch'] = "Geben Sie die Beschreibung ein.";
$text['description-node_description']['de-de'] = "Geben Sie die Beschreibung ein.";
$text['description-node_description']['es-cl'] = " Introduzca la descripción.";
$text['description-node_description']['es-mx'] = " Introduzca la descripción."; //copied from es-cl
$text['description-node_description']['fr-ca'] = "Entrez la description."; //copied from fr-fr
$text['description-node_description']['es-cl'] = "Introduzca la descripción.";
$text['description-node_description']['es-mx'] = "Introduzca la descripción.";
$text['description-node_description']['fr-ca'] = "Entrez la description.";
$text['description-node_description']['fr-fr'] = "Entrez la description.";
$text['description-node_description']['he-il'] = " הזן את התיאור.";
$text['description-node_description']['it-it'] = "Inserisci la descrizione.";
$text['description-node_description']['nl-nl'] = "Voer de beschrijving in.";
$text['description-node_description']['pl-pl'] = " Wprowadź opis.";
$text['description-node_description']['pl-pl'] = "Wprowadź opis.";
$text['description-node_description']['pt-br'] = "Digite a descrição.";
$text['description-node_description']['pt-pt'] = " Digite a descrição.";
$text['description-node_description']['pt-pt'] = "Digite a descrição.";
$text['description-node_description']['ro-ro'] = "Introduceți descrierea.";
$text['description-node_description']['ru-ru'] = "Введите описание.";
$text['description-node_description']['sv-se'] = "Ange beskrivningen.";
$text['description-node_description']['uk-ua'] = "Введіть опис.";
$text['description-node_description']['zh-cn'] = "输入说明。";
$text['description-node_description']['ja-jp'] = "説明を入力します。";
$text['description-node_description']['ko-kr'] = "설명을 입력합니다.";
$text['description-node_cidr']['en-us'] = "Enter the IP CIDR range.";
$text['description-node_cidr']['en-gb'] = "Enter the IP CIDR range.";
$text['description-node_cidr']['ar-eg'] = "أدخل نطاق IP CIDR.";
$text['description-node_cidr']['de-at'] = " Geben Sie die IP CIDR-Bereich an."; //copied from de-de
$text['description-node_cidr']['de-ch'] = " Geben Sie die IP CIDR-Bereich an."; //copied from de-de
$text['description-node_cidr']['de-de'] = " Geben Sie die IP CIDR-Bereich an.";
$text['description-node_cidr']['es-cl'] = " Introduzca el rango de direcciones IP CIDR.";
$text['description-node_cidr']['es-mx'] = " Introduzca el rango de direcciones IP CIDR."; //copied from es-cl
$text['description-node_cidr']['fr-ca'] = "Entrez la plage IP CIDR."; //copied from fr-fr
$text['description-node_cidr']['de-at'] = "Geben Sie die IP CIDR-Bereich an.";
$text['description-node_cidr']['de-ch'] = "Geben Sie die IP CIDR-Bereich an.";
$text['description-node_cidr']['de-de'] = "Geben Sie die IP CIDR-Bereich an.";
$text['description-node_cidr']['es-cl'] = "Introduzca el rango de direcciones IP CIDR.";
$text['description-node_cidr']['es-mx'] = "Introduzca el rango de direcciones IP CIDR.";
$text['description-node_cidr']['fr-ca'] = "Entrez la plage IP CIDR.";
$text['description-node_cidr']['fr-fr'] = "Entrez la plage IP CIDR.";
$text['description-node_cidr']['he-il'] = " הזן את טווח ה- IP CIDR.";
$text['description-node_cidr']['it-it'] = "Inserisci il range IP CIDR.";
$text['description-node_cidr']['nl-nl'] = "Voer het IP CIDR reeks in.";
$text['description-node_cidr']['pl-pl'] = "Wprowadź zakres IP CIDR.";
$text['description-node_cidr']['pt-br'] = "Digite o intervalo IP CIDR."; //copied from pt-pt
$text['description-node_cidr']['pt-br'] = "Digite o intervalo IP CIDR.";
$text['description-node_cidr']['pt-pt'] = "Digite o intervalo IP CIDR.";
$text['description-node_cidr']['ro-ro'] = "Introduceți intervalul de IP CIDR.";
$text['description-node_cidr']['ru-ru'] = "Введите диапазон IP CIDR.";
$text['description-node_cidr']['sv-se'] = "Ange IP CIDR sortimentet.";
$text['description-node_cidr']['uk-ua'] = "Введіть діапазон IP-CIDR.";
$text['description-node_cidr']['zh-cn'] = "输入 IP CIDR 范围。";
$text['description-node_cidr']['ja-jp'] = "IP CIDR 範囲を入力します。";
$text['description-node_cidr']['ko-kr'] = "IP CIDR 범위를 입력합니다.";
$text['description-access_control_name']['en-us'] = "Enter the name.";
$text['description-access_control_name']['en-gb'] = "Enter the name.";
$text['description-access_control_name']['ar-eg'] = "أدخل اسم.";
$text['description-access_control_name']['de-at'] = "Namen eingeben."; //copied from de-de
$text['description-access_control_name']['de-ch'] = "Namen eingeben."; //copied from de-de
$text['description-access_control_name']['de-at'] = "Namen eingeben.";
$text['description-access_control_name']['de-ch'] = "Namen eingeben.";
$text['description-access_control_name']['de-de'] = "Namen eingeben.";
$text['description-access_control_name']['es-cl'] = " Introduzca el nombre.";
$text['description-access_control_name']['es-mx'] = " Introduzca el nombre."; //copied from es-cl
$text['description-access_control_name']['fr-ca'] = "Entrez le nom."; //copied from fr-fr
$text['description-access_control_name']['es-cl'] = "Introduzca el nombre.";
$text['description-access_control_name']['es-mx'] = "Introduzca el nombre.";
$text['description-access_control_name']['fr-ca'] = "Entrez le nom.";
$text['description-access_control_name']['fr-fr'] = "Entrez le nom.";
$text['description-access_control_name']['he-il'] = " הזן את השם.";
$text['description-access_control_name']['it-it'] = "Inserisci il nome.";
$text['description-access_control_name']['nl-nl'] = "Voer de naam in.";
$text['description-access_control_name']['pl-pl'] = " Wpisz nazwę.";
$text['description-access_control_name']['pt-br'] = "Digite o nome."; //copied from pt-pt
$text['description-access_control_name']['pl-pl'] = "Wpisz nazwę.";
$text['description-access_control_name']['pt-br'] = "Digite o nome.";
$text['description-access_control_name']['pt-pt'] = "Digite o nome.";
$text['description-access_control_name']['ro-ro'] = "Introduceți numele.";
$text['description-access_control_name']['ru-ru'] = "Введите имя.";
$text['description-access_control_name']['sv-se'] = "Ange namnet.";
$text['description-access_control_name']['uk-ua'] = "Введіть ім'я.";
$text['description-access_control_name']['zh-cn'] = "输入名称。";
$text['description-access_control_name']['ja-jp'] = "名前を入力します。";
$text['description-access_control_name']['ko-kr'] = "이름을 입력하세요.";
$text['description-access_control_description']['en-us'] = "Enter the description";
$text['description-access_control_description']['en-gb'] = "Enter the description";
$text['description-access_control_description']['ar-eg'] = "دخل وصف";
$text['description-access_control_description']['de-at'] = "Beschreibung eingeben."; //copied from de-de
$text['description-access_control_description']['de-ch'] = "Beschreibung eingeben."; //copied from de-de
$text['description-access_control_description']['de-at'] = "Beschreibung eingeben.";
$text['description-access_control_description']['de-ch'] = "Beschreibung eingeben.";
$text['description-access_control_description']['de-de'] = "Beschreibung eingeben.";
$text['description-access_control_description']['es-cl'] = "Introduzca la descripción";
$text['description-access_control_description']['es-mx'] = "Introduzca la descripción"; //copied from es-cl
$text['description-access_control_description']['fr-ca'] = "Entrez la description."; //copied from fr-fr
$text['description-access_control_description']['es-mx'] = "Introduzca la descripción";
$text['description-access_control_description']['fr-ca'] = "Entrez la description.";
$text['description-access_control_description']['fr-fr'] = "Entrez la description.";
$text['description-access_control_description']['he-il'] = " הזן את התיאור";
$text['description-access_control_description']['it-it'] = "Inserisci la descrizione";
@@ -441,26 +500,32 @@ $text['description-access_control_description']['ro-ro'] = "Introduceți descrie
$text['description-access_control_description']['ru-ru'] = "Введите описание";
$text['description-access_control_description']['sv-se'] = "Ange en beskrivning";
$text['description-access_control_description']['uk-ua'] = "Введіть опис";
$text['description-access_control_description']['zh-cn'] = "输入描述";
$text['description-access_control_description']['ja-jp'] = "説明を入力してください";
$text['description-access_control_description']['ko-kr'] = "설명을 입력하세요";
$text['description-access_control_default']['en-us'] = "Select the default type.";
$text['description-access_control_default']['en-gb'] = "Select the default type.";
$text['description-access_control_default']['ar-eg'] = "حدد نوع الافتراضي.";
$text['description-access_control_default']['de-at'] = " Wählen Sie den Standardtyp."; //copied from de-de
$text['description-access_control_default']['de-ch'] = " Wählen Sie den Standardtyp."; //copied from de-de
$text['description-access_control_default']['de-de'] = " Wählen Sie den Standardtyp.";
$text['description-access_control_default']['de-at'] = "Wählen Sie den Standardtyp.";
$text['description-access_control_default']['de-ch'] = "Wählen Sie den Standardtyp.";
$text['description-access_control_default']['de-de'] = "Wählen Sie den Standardtyp.";
$text['description-access_control_default']['es-cl'] = "Seleccione el tipo de defecto.";
$text['description-access_control_default']['es-mx'] = "Seleccione el tipo de defecto."; //copied from es-cl
$text['description-access_control_default']['fr-ca'] = "Sélectionnez le type de défaut"; //copied from fr-fr
$text['description-access_control_default']['es-mx'] = "Seleccione el tipo de defecto.";
$text['description-access_control_default']['fr-ca'] = "Sélectionnez le type de défaut";
$text['description-access_control_default']['fr-fr'] = "Sélectionnez le type de défaut";
$text['description-access_control_default']['he-il'] = " בחר את סוג ברירת המחדל.";
$text['description-access_control_default']['it-it'] = "Scegli il tipo di default.";
$text['description-access_control_default']['nl-nl'] = "Selecteer het standaard type.";
$text['description-access_control_default']['pl-pl'] = "Wybierz typ domyślny.";
$text['description-access_control_default']['pt-br'] = "Selecione o tipo de padrão."; //copied from pt-pt
$text['description-access_control_default']['pt-br'] = "Selecione o tipo de padrão.";
$text['description-access_control_default']['pt-pt'] = "Selecione o tipo de padrão.";
$text['description-access_control_default']['ro-ro'] = "Selectați tipul implicit.";
$text['description-access_control_default']['ru-ru'] = "Выберите тип по умолчанию.";
$text['description-access_control_default']['sv-se'] = "Välj standardtypen.";
$text['description-access_control_default']['uk-ua'] = "Вибір типу за замовчуванням.";
$text['description-access_control_default']['zh-cn'] = "选择默认类型。";
$text['description-access_control_default']['ja-jp'] = "デフォルトのタイプを選択します。";
$text['description-access_control_default']['ko-kr'] = "기본 유형을 선택합니다.";
?>
+11 -5
View File
@@ -4,12 +4,12 @@
$apps[$x]['menu'][$y]['title']['en-us'] = "Access Controls";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Access Controls";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "عناصر التحكم في الوصول";
$apps[$x]['menu'][$y]['title']['de-at'] = " Zugriffskontrolle";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-de'] = " Zugriffskontrolle";
$apps[$x]['menu'][$y]['title']['de-at'] = "Zugriffskontrolle";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Zugriffskontrollen";
$apps[$x]['menu'][$y]['title']['de-de'] = "Zugriffskontrolle";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Controles de acceso";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Controles de acceso";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Contrôles d'accès";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Contrôles d'accès";
$apps[$x]['menu'][$y]['title']['he-il'] = "בקרת גישה";
$apps[$x]['menu'][$y]['title']['it-it'] = "Controlli Accesso";
@@ -21,10 +21,16 @@
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Контроль доступа";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "контроль доступу";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Åtkomstkontroll";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "出入控制";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "アクセス制御";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "액세스 제어";
$apps[$x]['menu'][$y]['uuid'] = "bd47c972-5498-4541-b44a-d4bbfac69496";
$apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/access_controls/access_controls.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
@@ -30,16 +30,6 @@ if (!class_exists('access_controls')) {
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete records
*/
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+231 -148
View File
@@ -1,36 +1,38 @@
<?php
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
$text['title-operator_panel']['en-us'] = "Operator Panel";
$text['title-operator_panel']['en-gb'] = "Operator Panel";
$text['title-operator_panel']['ar-eg'] = "";
$text['title-operator_panel']['de-at'] = "Bedienfeld"; //copied from de-de
$text['title-operator_panel']['de-ch'] = "Bedienfeld"; //copied from de-de
$text['title-operator_panel']['ar-eg'] = "لوحة المشغل";
$text['title-operator_panel']['de-at'] = "Bedienfeld";
$text['title-operator_panel']['de-ch'] = "Bedienfeld";
$text['title-operator_panel']['de-de'] = "Bedienfeld";
$text['title-operator_panel']['es-cl'] = "Panel de Operador";
$text['title-operator_panel']['es-mx'] = "Panel de Operador"; //copied from es-cl
$text['title-operator_panel']['fr-ca'] = "Operator Panel"; //copied from fr-fr
$text['title-operator_panel']['fr-fr'] = "Operator Panel";
$text['title-operator_panel']['es-mx'] = "Panel de Operador";
$text['title-operator_panel']['fr-ca'] = "Panneau de commande";
$text['title-operator_panel']['fr-fr'] = "Panneau de commande";
$text['title-operator_panel']['he-il'] = "לוח מפעיל";
$text['title-operator_panel']['it-it'] = "Pannello Operatore";
$text['title-operator_panel']['nl-nl'] = "Operator paneel";
$text['title-operator_panel']['pl-pl'] = "Panel operatora";
$text['title-operator_panel']['pt-br'] = "Painel do operador";
$text['title-operator_panel']['pt-pt'] = "Painel do Operador";
$text['title-operator_panel']['ro-ro'] = "";
$text['title-operator_panel']['ro-ro'] = "Panoul operator";
$text['title-operator_panel']['ru-ru'] = "Панель Оператора";
$text['title-operator_panel']['sv-se'] = "Telefonist Panel";
$text['title-operator_panel']['uk-ua'] = "Панель оператора";
$text['title-operator_panel']['uk-ua'] = "Оператори";
$text['title-operator_panel']['zh-cn'] = "操作面板";
$text['title-operator_panel']['ja-jp'] = "オペレーターパネル";
$text['title-operator_panel']['ko-kr'] = "운영자 패널";
$text['label-status_on_demand']['en-us'] = "On Demand";
$text['label-status_on_demand']['en-gb'] = "On Demand";
$text['label-status_on_demand']['ar-eg'] = "";
$text['label-status_on_demand']['de-at'] = "Bei Bedarf"; //copied from de-de
$text['label-status_on_demand']['de-ch'] = "Bei Bedarf"; //copied from de-de
$text['label-status_on_demand']['ar-eg'] = "على الطلب";
$text['label-status_on_demand']['de-at'] = "Bei Bedarf";
$text['label-status_on_demand']['de-ch'] = "Bei Bedarf";
$text['label-status_on_demand']['de-de'] = "Bei Bedarf";
$text['label-status_on_demand']['es-cl'] = "A Pedido";
$text['label-status_on_demand']['es-mx'] = "A Pedido"; //copied from es-cl
$text['label-status_on_demand']['fr-ca'] = "Sur Demande"; //copied from fr-fr
$text['label-status_on_demand']['es-mx'] = "A Pedido";
$text['label-status_on_demand']['fr-ca'] = "Sur Demande";
$text['label-status_on_demand']['fr-fr'] = "Sur Demande";
$text['label-status_on_demand']['he-il'] = "על פי דרישה";
$text['label-status_on_demand']['it-it'] = "Su Richiesta";
@@ -38,20 +40,23 @@ $text['label-status_on_demand']['nl-nl'] = "Op Aanvraag";
$text['label-status_on_demand']['pl-pl'] = "Na żądanie";
$text['label-status_on_demand']['pt-br'] = "A pedido";
$text['label-status_on_demand']['pt-pt'] = "A Pedido";
$text['label-status_on_demand']['ro-ro'] = "";
$text['label-status_on_demand']['ro-ro'] = "La cerere";
$text['label-status_on_demand']['ru-ru'] = "По требованию";
$text['label-status_on_demand']['sv-se'] = "På Begäran";
$text['label-status_on_demand']['uk-ua'] = "На вимогу";
$text['label-status_on_demand']['uk-ua'] = "На Демі";
$text['label-status_on_demand']['zh-cn'] = "一经请求";
$text['label-status_on_demand']['ja-jp'] = "オンデマンド";
$text['label-status_on_demand']['ko-kr'] = "주문형";
$text['label-status_on_break']['en-us'] = "On Break";
$text['label-status_on_break']['en-gb'] = "On Break";
$text['label-status_on_break']['ar-eg'] = "";
$text['label-status_on_break']['de-at'] = "In Pause"; //copied from de-de
$text['label-status_on_break']['de-ch'] = "In Pause"; //copied from de-de
$text['label-status_on_break']['ar-eg'] = "في استراحة";
$text['label-status_on_break']['de-at'] = "In Pause";
$text['label-status_on_break']['de-ch'] = "In Pause";
$text['label-status_on_break']['de-de'] = "In Pause";
$text['label-status_on_break']['es-cl'] = "En Pausa";
$text['label-status_on_break']['es-mx'] = "En Pausa"; //copied from es-cl
$text['label-status_on_break']['fr-ca'] = "En Pause"; //copied from fr-fr
$text['label-status_on_break']['es-mx'] = "En Pausa";
$text['label-status_on_break']['fr-ca'] = "En Pause";
$text['label-status_on_break']['fr-fr'] = "En Pause";
$text['label-status_on_break']['he-il'] = "בהפסקה";
$text['label-status_on_break']['it-it'] = "In Pausa";
@@ -59,62 +64,71 @@ $text['label-status_on_break']['nl-nl'] = "In de wacht";
$text['label-status_on_break']['pl-pl'] = "Na przerwie";
$text['label-status_on_break']['pt-br'] = "Em pausa";
$text['label-status_on_break']['pt-pt'] = "Em Pausa";
$text['label-status_on_break']['ro-ro'] = "";
$text['label-status_on_break']['ro-ro'] = "In pauza";
$text['label-status_on_break']['ru-ru'] = "Пауза";
$text['label-status_on_break']['sv-se'] = "På Rast";
$text['label-status_on_break']['uk-ua'] = "На перерві";
$text['label-status_on_break']['uk-ua'] = "Прорив";
$text['label-status_on_break']['zh-cn'] = "休息时";
$text['label-status_on_break']['ja-jp'] = "休んで";
$text['label-status_on_break']['ko-kr'] = "쉬는 중";
$text['label-status_logged_out_or_unknown']['en-us'] = "Logged Out / Unknown";
$text['label-status_logged_out_or_unknown']['en-gb'] = "Logged Out / Unknown";
$text['label-status_logged_out_or_unknown']['ar-eg'] = "";
$text['label-status_logged_out_or_unknown']['de-at'] = "Abgemeldet / Unbekannt"; //copied from de-de
$text['label-status_logged_out_or_unknown']['de-ch'] = "Abgemeldet / Unbekannt"; //copied from de-de
$text['label-status_logged_out_or_unknown']['ar-eg'] = "تم تسجيل الخروج / غير معروف";
$text['label-status_logged_out_or_unknown']['de-at'] = "Abgemeldet / Unbekannt";
$text['label-status_logged_out_or_unknown']['de-ch'] = "Abgemeldet / Unbekannt";
$text['label-status_logged_out_or_unknown']['de-de'] = "Abgemeldet / Unbekannt";
$text['label-status_logged_out_or_unknown']['es-cl'] = "Desconectado / Desconocido";
$text['label-status_logged_out_or_unknown']['es-mx'] = "Desconectado / Desconocido"; //copied from es-cl
$text['label-status_logged_out_or_unknown']['fr-ca'] = "Déconnexion / Unknown"; //copied from fr-fr
$text['label-status_logged_out_or_unknown']['es-mx'] = "Desconectado / Desconocido";
$text['label-status_logged_out_or_unknown']['fr-ca'] = "Déconnexion / Unknown";
$text['label-status_logged_out_or_unknown']['fr-fr'] = "Déconnexion / Unknown";
$text['label-status_logged_out_or_unknown']['he-il'] = "";
$text['label-status_logged_out_or_unknown']['he-il'] = "מנותק / לא ידוע";
$text['label-status_logged_out_or_unknown']['it-it'] = "Sloggato/Sconosciuto";
$text['label-status_logged_out_or_unknown']['nl-nl'] = "Afgelogged / Onbekend";
$text['label-status_logged_out_or_unknown']['pl-pl'] = "Wylogowany / Nieznany";
$text['label-status_logged_out_or_unknown']['pt-br'] = "Desligar / Desconhecido";
$text['label-status_logged_out_or_unknown']['pt-pt'] = "Desligado / Unknown";
$text['label-status_logged_out_or_unknown']['ro-ro'] = "";
$text['label-status_logged_out_or_unknown']['ro-ro'] = "Deconectat/Necunoscut";
$text['label-status_logged_out_or_unknown']['ru-ru'] = "Вышел из системы / Неизвестен";
$text['label-status_logged_out_or_unknown']['sv-se'] = "Utloggad / Okänd";
$text['label-status_logged_out_or_unknown']['uk-ua'] = "Вийшов/невідомо";
$text['label-status_logged_out_or_unknown']['uk-ua'] = "Увійти / Невідомо";
$text['label-status_logged_out_or_unknown']['zh-cn'] = "注销/未知";
$text['label-status_logged_out_or_unknown']['ja-jp'] = "ログアウト/不明";
$text['label-status_logged_out_or_unknown']['ko-kr'] = "로그아웃됨/알 수 없음";
$text['label-status_logged_out']['en-us'] = "Logged Out";
$text['label-status_logged_out']['en-gb'] = "Logged Out";
$text['label-status_logged_out']['ar-eg'] = "";
$text['label-status_logged_out']['de-at'] = "Abgemeldet"; //copied from de-de
$text['label-status_logged_out']['de-ch'] = "Abgemeldet"; //copied from de-de
$text['label-status_logged_out']['ar-eg'] = "تسجيل الخروج";
$text['label-status_logged_out']['de-at'] = "Abgemeldet";
$text['label-status_logged_out']['de-ch'] = "Abgemeldet";
$text['label-status_logged_out']['de-de'] = "Abgemeldet";
$text['label-status_logged_out']['es-cl'] = "Desconectado";
$text['label-status_logged_out']['es-mx'] = "Desconectado"; //copied from es-cl
$text['label-status_logged_out']['fr-ca'] = "Déconnexion"; //copied from fr-fr
$text['label-status_logged_out']['es-mx'] = "Desconectado";
$text['label-status_logged_out']['fr-ca'] = "Déconnexion";
$text['label-status_logged_out']['fr-fr'] = "Déconnexion";
$text['label-status_logged_out']['he-il'] = "";
$text['label-status_logged_out']['he-il'] = "התנתק";
$text['label-status_logged_out']['it-it'] = "Sloggato";
$text['label-status_logged_out']['nl-nl'] = "Afgelogged";
$text['label-status_logged_out']['pl-pl'] = "Wylogowany";
$text['label-status_logged_out']['pt-br'] = "Desligado"; //copied from pt-pt
$text['label-status_logged_out']['pt-br'] = "Desligado";
$text['label-status_logged_out']['pt-pt'] = "Desligado";
$text['label-status_logged_out']['ro-ro'] = "";
$text['label-status_logged_out']['ro-ro'] = "Delogat";
$text['label-status_logged_out']['ru-ru'] = "Вышел из системы";
$text['label-status_logged_out']['sv-se'] = "Utloggad";
$text['label-status_logged_out']['uk-ua'] = "Вийшов";
$text['label-status_logged_out']['uk-ua'] = "Увійти";
$text['label-status_logged_out']['zh-cn'] = "登出";
$text['label-status_logged_out']['ja-jp'] = "ログアウトしました";
$text['label-status_logged_out']['ko-kr'] = "로그아웃됨";
$text['label-status_do_not_disturb']['en-us'] = "Do Not Disturb";
$text['label-status_do_not_disturb']['en-gb'] = "Do Not Disturb";
$text['label-status_do_not_disturb']['ar-eg'] = "";
$text['label-status_do_not_disturb']['de-at'] = "Bitte nicht Stören"; //copied from de-de
$text['label-status_do_not_disturb']['de-ch'] = "Bitte nicht Stören"; //copied from de-de
$text['label-status_do_not_disturb']['ar-eg'] = "لا تخل";
$text['label-status_do_not_disturb']['de-at'] = "Bitte nicht Stören";
$text['label-status_do_not_disturb']['de-ch'] = "Bitte nicht Stören";
$text['label-status_do_not_disturb']['de-de'] = "Bitte nicht Stören";
$text['label-status_do_not_disturb']['es-cl'] = "No Molestar";
$text['label-status_do_not_disturb']['es-mx'] = "No Molestar"; //copied from es-cl
$text['label-status_do_not_disturb']['fr-ca'] = "Ne pas Déranger"; //copied from fr-fr
$text['label-status_do_not_disturb']['es-mx'] = "No Molestar";
$text['label-status_do_not_disturb']['fr-ca'] = "Ne pas Déranger";
$text['label-status_do_not_disturb']['fr-fr'] = "Ne pas Déranger";
$text['label-status_do_not_disturb']['he-il'] = "נא לא להפריע";
$text['label-status_do_not_disturb']['it-it'] = "Non Disturbare";
@@ -122,62 +136,71 @@ $text['label-status_do_not_disturb']['nl-nl'] = "Niet Storen";
$text['label-status_do_not_disturb']['pl-pl'] = "Nie przeszkadzać (DND)";
$text['label-status_do_not_disturb']['pt-br'] = "Não perturbe";
$text['label-status_do_not_disturb']['pt-pt'] = "Não perturbe (DND)";
$text['label-status_do_not_disturb']['ro-ro'] = "";
$text['label-status_do_not_disturb']['ro-ro'] = "Nu deranjați";
$text['label-status_do_not_disturb']['ru-ru'] = "Просьба не беспокоить";
$text['label-status_do_not_disturb']['sv-se'] = "Stör Ej";
$text['label-status_do_not_disturb']['uk-ua'] = "Не турбувати";
$text['label-status_do_not_disturb']['uk-ua'] = "Не турбувати";
$text['label-status_do_not_disturb']['zh-cn'] = "请勿打扰";
$text['label-status_do_not_disturb']['ja-jp'] = "邪魔しないでください";
$text['label-status_do_not_disturb']['ko-kr'] = "방해하지 마";
$text['label-status_available_on_demand']['en-us'] = "Available (On Demand)";
$text['label-status_available_on_demand']['en-gb'] = "Available (On Demand)";
$text['label-status_available_on_demand']['ar-eg'] = "";
$text['label-status_available_on_demand']['de-at'] = "Verfügbar (Bei Bedarf)"; //copied from de-de
$text['label-status_available_on_demand']['de-ch'] = "Verfügbar (Bei Bedarf)"; //copied from de-de
$text['label-status_available_on_demand']['ar-eg'] = "متاح (عند الطلب)";
$text['label-status_available_on_demand']['de-at'] = "Verfügbar (Bei Bedarf)";
$text['label-status_available_on_demand']['de-ch'] = "Verfügbar (Bei Bedarf)";
$text['label-status_available_on_demand']['de-de'] = "Verfügbar (Bei Bedarf)";
$text['label-status_available_on_demand']['es-cl'] = "Disponible (A Pedido)";
$text['label-status_available_on_demand']['es-mx'] = "Disponible (A Pedido)"; //copied from es-cl
$text['label-status_available_on_demand']['fr-ca'] = "Disponible (sur demande)"; //copied from fr-fr
$text['label-status_available_on_demand']['es-mx'] = "Disponible (A Pedido)";
$text['label-status_available_on_demand']['fr-ca'] = "Disponible (sur demande)";
$text['label-status_available_on_demand']['fr-fr'] = "Disponible (sur demande)";
$text['label-status_available_on_demand']['he-il'] = "";
$text['label-status_available_on_demand']['he-il'] = "זמין (לפי דרישה)";
$text['label-status_available_on_demand']['it-it'] = "Disponibile (Su Richiesta)";
$text['label-status_available_on_demand']['nl-nl'] = "Beschikbaar (Op Aaanvraag)";
$text['label-status_available_on_demand']['pl-pl'] = "Dostępny (na żądanie)";
$text['label-status_available_on_demand']['pt-br'] = "Disponivel (A pedido)";
$text['label-status_available_on_demand']['pt-pt'] = "Disponível (A Pedido)";
$text['label-status_available_on_demand']['ro-ro'] = "";
$text['label-status_available_on_demand']['ro-ro'] = "Disponibil (la cerere)";
$text['label-status_available_on_demand']['ru-ru'] = "Доступен (по требованию)";
$text['label-status_available_on_demand']['sv-se'] = "Tillgänglig (På Begäran)";
$text['label-status_available_on_demand']['uk-ua'] = "Доступний (на вимогу)";
$text['label-status_available_on_demand']['uk-ua'] = "Доступний (на вимогу)";
$text['label-status_available_on_demand']['zh-cn'] = "可用(按需)";
$text['label-status_available_on_demand']['ja-jp'] = "あり(オンデマンド)";
$text['label-status_available_on_demand']['ko-kr'] = "사용 가능(주문형)";
$text['label-status_available']['en-us'] = "Available";
$text['label-status_available']['en-gb'] = "Available";
$text['label-status_available']['ar-eg'] = "";
$text['label-status_available']['de-at'] = "Verfügbar"; //copied from de-de
$text['label-status_available']['de-ch'] = "Verfügbar"; //copied from de-de
$text['label-status_available']['ar-eg'] = "متاح";
$text['label-status_available']['de-at'] = "Verfügbar";
$text['label-status_available']['de-ch'] = "Verfügbar";
$text['label-status_available']['de-de'] = "Verfügbar";
$text['label-status_available']['es-cl'] = "Disponible";
$text['label-status_available']['es-mx'] = "Disponible"; //copied from es-cl
$text['label-status_available']['fr-ca'] = "Disponible"; //copied from fr-fr
$text['label-status_available']['es-mx'] = "Disponible";
$text['label-status_available']['fr-ca'] = "Disponible";
$text['label-status_available']['fr-fr'] = "Disponible";
$text['label-status_available']['he-il'] = "זמין";
$text['label-status_available']['it-it'] = "Disponibile";
$text['label-status_available']['nl-nl'] = "Beschikbaar";
$text['label-status_available']['pl-pl'] = "Dostępny";
$text['label-status_available']['pt-br'] = "Disponível";
$text['label-status_available']['pt-br'] = "Disponível";
$text['label-status_available']['pt-pt'] = "Disponível";
$text['label-status_available']['ro-ro'] = "";
$text['label-status_available']['ro-ro'] = "Disponibil";
$text['label-status_available']['ru-ru'] = "Доступен";
$text['label-status_available']['sv-se'] = "Tillgänglig";
$text['label-status_available']['uk-ua'] = "Доступний";
$text['label-status_available']['uk-ua'] = "В наявності";
$text['label-status_available']['zh-cn'] = "可用的";
$text['label-status_available']['ja-jp'] = "利用可能";
$text['label-status_available']['ko-kr'] = "사용 가능";
$text['label-refresh_pause']['en-us'] = "Pause Refresh";
$text['label-refresh_pause']['en-gb'] = "Pause Refresh";
$text['label-refresh_pause']['ar-eg'] = "";
$text['label-refresh_pause']['de-at'] = "Seite neu laden deaktivieren"; //copied from de-de
$text['label-refresh_pause']['de-ch'] = "Seite neu laden deaktivieren"; //copied from de-de
$text['label-refresh_pause']['ar-eg'] = "وقفة التحديث";
$text['label-refresh_pause']['de-at'] = "Seite neu laden deaktivieren";
$text['label-refresh_pause']['de-ch'] = "Seite neu laden deaktivieren";
$text['label-refresh_pause']['de-de'] = "Seite neu laden deaktivieren";
$text['label-refresh_pause']['es-cl'] = "Actualizar Pausa";
$text['label-refresh_pause']['es-mx'] = "Actualizar Pausa"; //copied from es-cl
$text['label-refresh_pause']['fr-ca'] = "Pause Actualiser"; //copied from fr-fr
$text['label-refresh_pause']['es-mx'] = "Actualizar Pausa";
$text['label-refresh_pause']['fr-ca'] = "Pause Actualiser";
$text['label-refresh_pause']['fr-fr'] = "Pause Actualiser";
$text['label-refresh_pause']['he-il'] = "עצור רענון";
$text['label-refresh_pause']['it-it'] = "Interrompi";
@@ -185,20 +208,23 @@ $text['label-refresh_pause']['nl-nl'] = "Stop verversen";
$text['label-refresh_pause']['pl-pl'] = "Pauzuj odświeżanie";
$text['label-refresh_pause']['pt-br'] = "Pausar atualização";
$text['label-refresh_pause']['pt-pt'] = "Pausa Atualizar";
$text['label-refresh_pause']['ro-ro'] = "";
$text['label-refresh_pause']['ro-ro'] = "Întrerupeți reîmprospătarea";
$text['label-refresh_pause']['ru-ru'] = "Приостановить обновление";
$text['label-refresh_pause']['sv-se'] = "Paus Uppdatera";
$text['label-refresh_pause']['uk-ua'] = "Припинити оновлення";
$text['label-refresh_pause']['uk-ua'] = "Пауза Refresh";
$text['label-refresh_pause']['zh-cn'] = "暂停刷新";
$text['label-refresh_pause']['ja-jp'] = "リフレッシュを一時停止";
$text['label-refresh_pause']['ko-kr'] = "새로고침 일시중지";
$text['label-refresh_enable']['en-us'] = "Enable Refresh";
$text['label-refresh_enable']['en-gb'] = "Enable Refresh";
$text['label-refresh_enable']['ar-eg'] = "";
$text['label-refresh_enable']['de-at'] = "Seite neu laden aktivieren"; //copied from de-de
$text['label-refresh_enable']['de-ch'] = "Seite neu laden aktivieren"; //copied from de-de
$text['label-refresh_enable']['ar-eg'] = "تمكين التحديث";
$text['label-refresh_enable']['de-at'] = "Seite neu laden aktivieren";
$text['label-refresh_enable']['de-ch'] = "Seite neu laden aktivieren";
$text['label-refresh_enable']['de-de'] = "Seite neu laden aktivieren";
$text['label-refresh_enable']['es-cl'] = "Activar Actualizar";
$text['label-refresh_enable']['es-mx'] = "Activar Actualizar"; //copied from es-cl
$text['label-refresh_enable']['fr-ca'] = "Activer Actualiser"; //copied from fr-fr
$text['label-refresh_enable']['es-mx'] = "Activar Actualizar";
$text['label-refresh_enable']['fr-ca'] = "Activer Actualiser";
$text['label-refresh_enable']['fr-fr'] = "Activer Actualiser";
$text['label-refresh_enable']['he-il'] = "אפשר רענון";
$text['label-refresh_enable']['it-it'] = "Abilita Aggiornamento";
@@ -206,20 +232,23 @@ $text['label-refresh_enable']['nl-nl'] = "Start verversen";
$text['label-refresh_enable']['pl-pl'] = "Włącz odświeżanie";
$text['label-refresh_enable']['pt-br'] = "Habilitar atualização";
$text['label-refresh_enable']['pt-pt'] = "Habilitar Atualização";
$text['label-refresh_enable']['ro-ro'] = "";
$text['label-refresh_enable']['ro-ro'] = "Activați Reîmprospătare";
$text['label-refresh_enable']['ru-ru'] = "Включить обновление";
$text['label-refresh_enable']['sv-se'] = "Aktivera Uppdatering";
$text['label-refresh_enable']['uk-ua'] = "Включити оновлення";
$text['label-refresh_enable']['uk-ua'] = "Увімкнути Refresh";
$text['label-refresh_enable']['zh-cn'] = "启用刷新";
$text['label-refresh_enable']['ja-jp'] = "リフレッシュを有効にする";
$text['label-refresh_enable']['ko-kr'] = "새로 고침 활성화";
$text['label-recording']['en-us'] = "Recording";
$text['label-recording']['en-gb'] = "Recording";
$text['label-recording']['ar-eg'] = "";
$text['label-recording']['de-at'] = "Aufnahme"; //copied from de-de
$text['label-recording']['de-ch'] = "Aufnahme"; //copied from de-de
$text['label-recording']['ar-eg'] = "تسجيل";
$text['label-recording']['de-at'] = "Aufnahme";
$text['label-recording']['de-ch'] = "Aufnahme";
$text['label-recording']['de-de'] = "Aufnahme";
$text['label-recording']['es-cl'] = "Grabación de Llamadas";
$text['label-recording']['es-mx'] = "Grabación de Llamadas"; //copied from es-cl
$text['label-recording']['fr-ca'] = "Enregistrement de L'appel"; //copied from fr-fr
$text['label-recording']['es-mx'] = "Grabación de Llamadas";
$text['label-recording']['fr-ca'] = "Enregistrement de L'appel";
$text['label-recording']['fr-fr'] = "Enregistrement de L'appel";
$text['label-recording']['he-il'] = "מקליט";
$text['label-recording']['it-it'] = "Registrazione";
@@ -227,41 +256,47 @@ $text['label-recording']['nl-nl'] = "Opnemend";
$text['label-recording']['pl-pl'] = "Nagrywanie";
$text['label-recording']['pt-br'] = "Gravação de chamadas";
$text['label-recording']['pt-pt'] = "Gravação de Chamadas";
$text['label-recording']['ro-ro'] = "";
$text['label-recording']['ro-ro'] = "Înregistrare";
$text['label-recording']['ru-ru'] = "Запись";
$text['label-recording']['sv-se'] = "Inspelning";
$text['label-recording']['uk-ua'] = "Запис";
$text['label-recording']['uk-ua'] = "Запис";
$text['label-recording']['zh-cn'] = "记录";
$text['label-recording']['ja-jp'] = "録音";
$text['label-recording']['ko-kr'] = "녹음";
$text['label-record']['en-us'] = "Record";
$text['label-record']['en-gb'] = "Record";
$text['label-record']['ar-eg'] = "";
$text['label-record']['de-at'] = "Aufnehmen"; //copied from de-de
$text['label-record']['de-ch'] = "Aufnehmen"; //copied from de-de
$text['label-record']['ar-eg'] = "سِجِلّ";
$text['label-record']['de-at'] = "Aufnehmen";
$text['label-record']['de-ch'] = "Aufnehmen";
$text['label-record']['de-de'] = "Aufnehmen";
$text['label-record']['es-cl'] = "Registro";
$text['label-record']['es-mx'] = "Registro"; //copied from es-cl
$text['label-record']['fr-ca'] = "Enregistrer"; //copied from fr-fr
$text['label-record']['es-mx'] = "Registro";
$text['label-record']['fr-ca'] = "Enregistrer";
$text['label-record']['fr-fr'] = "Enregistrer";
$text['label-record']['he-il'] = "הקלטה";
$text['label-record']['it-it'] = "Registrazione";
$text['label-record']['nl-nl'] = "Opnemen";
$text['label-record']['pl-pl'] = "Nagrywanie";
$text['label-record']['pt-br'] = "Registro"; //copied from pt-pt
$text['label-record']['pt-br'] = "Registro";
$text['label-record']['pt-pt'] = "Registro";
$text['label-record']['ro-ro'] = "";
$text['label-record']['ro-ro'] = "Record";
$text['label-record']['ru-ru'] = "Воспроизведение";
$text['label-record']['sv-se'] = "Spela In";
$text['label-record']['uk-ua'] = "Запис";
$text['label-record']['uk-ua'] = "Запис";
$text['label-record']['zh-cn'] = "记录";
$text['label-record']['ja-jp'] = "記録";
$text['label-record']['ko-kr'] = "기록";
$text['label-other_extensions']['en-us'] = "Other Extensions";
$text['label-other_extensions']['en-gb'] = "Other Extensions";
$text['label-other_extensions']['ar-eg'] = "";
$text['label-other_extensions']['de-at'] = "Andere Nebenstellen"; //copied from de-de
$text['label-other_extensions']['de-ch'] = "Andere Nebenstellen"; //copied from de-de
$text['label-other_extensions']['ar-eg'] = "ملحقات أخرى";
$text['label-other_extensions']['de-at'] = "Andere Nebenstellen";
$text['label-other_extensions']['de-ch'] = "Andere Nebenstellen";
$text['label-other_extensions']['de-de'] = "Andere Nebenstellen";
$text['label-other_extensions']['es-cl'] = "Otras Extensiones";
$text['label-other_extensions']['es-mx'] = "Otras Extensiones"; //copied from es-cl
$text['label-other_extensions']['fr-ca'] = "Autres Extensions"; //copied from fr-fr
$text['label-other_extensions']['es-mx'] = "Otras Extensiones";
$text['label-other_extensions']['fr-ca'] = "Autres Extensions";
$text['label-other_extensions']['fr-fr'] = "Autres Extensions";
$text['label-other_extensions']['he-il'] = "שלוחות אחרות";
$text['label-other_extensions']['it-it'] = "Altri Interni";
@@ -269,20 +304,23 @@ $text['label-other_extensions']['nl-nl'] = "Andere toestellen";
$text['label-other_extensions']['pl-pl'] = "Inne numery wewnętrzne";
$text['label-other_extensions']['pt-br'] = "Outras extensões";
$text['label-other_extensions']['pt-pt'] = "Outros Extensions";
$text['label-other_extensions']['ro-ro'] = "";
$text['label-other_extensions']['ro-ro'] = "Alte extensii";
$text['label-other_extensions']['ru-ru'] = "Другие внутренние номера";
$text['label-other_extensions']['sv-se'] = "Annan Anknytning";
$text['label-other_extensions']['uk-ua'] = "Інші розширення";
$text['label-other_extensions']['uk-ua'] = "Інші розширення";
$text['label-other_extensions']['zh-cn'] = "其他扩展";
$text['label-other_extensions']['ja-jp'] = "その他の拡張子";
$text['label-other_extensions']['ko-kr'] = "기타 확장";
$text['label-no_extensions_found']['en-us'] = "No extensions found.";
$text['label-no_extensions_found']['en-gb'] = "No extensions found.";
$text['label-no_extensions_found']['ar-eg'] = "";
$text['label-no_extensions_found']['de-at'] = "Keine Nebenstellen gefunden."; //copied from de-de
$text['label-no_extensions_found']['de-ch'] = "Keine Nebenstellen gefunden."; //copied from de-de
$text['label-no_extensions_found']['ar-eg'] = "لم يتم العثور على ملحقات.";
$text['label-no_extensions_found']['de-at'] = "Keine Nebenstellen gefunden.";
$text['label-no_extensions_found']['de-ch'] = "Keine Nebenstellen gefunden.";
$text['label-no_extensions_found']['de-de'] = "Keine Nebenstellen gefunden.";
$text['label-no_extensions_found']['es-cl'] = "No hay extensiones encontrados.";
$text['label-no_extensions_found']['es-mx'] = "No hay extensiones encontrados."; //copied from es-cl
$text['label-no_extensions_found']['fr-ca'] = "Aucun extensions trouvés."; //copied from fr-fr
$text['label-no_extensions_found']['es-mx'] = "No hay extensiones encontrados.";
$text['label-no_extensions_found']['fr-ca'] = "Aucun extensions trouvés.";
$text['label-no_extensions_found']['fr-fr'] = "Aucun extensions trouvés.";
$text['label-no_extensions_found']['he-il'] = "לא נמצאו שלוחות";
$text['label-no_extensions_found']['it-it'] = "Nessun interno trovato.";
@@ -290,20 +328,23 @@ $text['label-no_extensions_found']['nl-nl'] = "Geen toestellen gevonden.";
$text['label-no_extensions_found']['pl-pl'] = "Nie znaleziono numerów wewnętrznych";
$text['label-no_extensions_found']['pt-br'] = "Não foi encontrada nenhuma extensão";
$text['label-no_extensions_found']['pt-pt'] = "Sem extensões encontrado.";
$text['label-no_extensions_found']['ro-ro'] = "";
$text['label-no_extensions_found']['ro-ro'] = "Nu s-au găsit extensii.";
$text['label-no_extensions_found']['ru-ru'] = "Внутренних номеров не найдено.";
$text['label-no_extensions_found']['sv-se'] = "Ingen anknytning funnen.";
$text['label-no_extensions_found']['uk-ua'] = "Не знайдено розширень";
$text['label-no_extensions_found']['uk-ua'] = "Не знайдено розширення.";
$text['label-no_extensions_found']['zh-cn'] = "未找到扩展。";
$text['label-no_extensions_found']['ja-jp'] = "拡張子が見つかりません。";
$text['label-no_extensions_found']['ko-kr'] = "확장 프로그램이 없습니다.";
$text['label-hangup']['en-us'] = "Hangup";
$text['label-hangup']['en-gb'] = "Hangup";
$text['label-hangup']['ar-eg'] = "";
$text['label-hangup']['de-at'] = "Abwürgen"; //copied from de-de
$text['label-hangup']['de-ch'] = "Abwürgen"; //copied from de-de
$text['label-hangup']['ar-eg'] = "تشبث";
$text['label-hangup']['de-at'] = "Abwürgen";
$text['label-hangup']['de-ch'] = "Abwürgen";
$text['label-hangup']['de-de'] = "Abwürgen";
$text['label-hangup']['es-cl'] = "Finalizar Llamada";
$text['label-hangup']['es-mx'] = "Finalizar Llamada"; //copied from es-cl
$text['label-hangup']['fr-ca'] = "Tuer Appel"; //copied from fr-fr
$text['label-hangup']['es-mx'] = "Finalizar Llamada";
$text['label-hangup']['fr-ca'] = "Tuer Appel";
$text['label-hangup']['fr-fr'] = "Tuer Appel";
$text['label-hangup']['he-il'] = "הפסק";
$text['label-hangup']['it-it'] = "Abbatti";
@@ -311,62 +352,71 @@ $text['label-hangup']['nl-nl'] = "Ophangen";
$text['label-hangup']['pl-pl'] = "Rozłączenie się";
$text['label-hangup']['pt-br'] = "Chamada final";
$text['label-hangup']['pt-pt'] = "Chamada Final";
$text['label-hangup']['ro-ro'] = "";
$text['label-hangup']['ro-ro'] = "Rezistă";
$text['label-hangup']['ru-ru'] = "Убить";
$text['label-hangup']['sv-se'] = "Lägg På";
$text['label-hangup']['uk-ua'] = "вбити";
$text['label-hangup']['zh-cn'] = "不挂断";
$text['label-hangup']['ja-jp'] = "ちょっとまって";
$text['label-hangup']['ko-kr'] = "잠깐만";
$text['label-eavesdrop']['en-us'] = "Eavesdrop";
$text['label-eavesdrop']['en-gb'] = "Eavesdrop";
$text['label-eavesdrop']['ar-eg'] = "";
$text['label-eavesdrop']['de-at'] = "Mithören"; //copied from de-de
$text['label-eavesdrop']['de-ch'] = "Mithören"; //copied from de-de
$text['label-eavesdrop']['ar-eg'] = "التنصت";
$text['label-eavesdrop']['de-at'] = "Mithören";
$text['label-eavesdrop']['de-ch'] = "Mithören";
$text['label-eavesdrop']['de-de'] = "Mithören";
$text['label-eavesdrop']['es-cl'] = "Escuchar";
$text['label-eavesdrop']['es-mx'] = "Escuchar"; //copied from es-cl
$text['label-eavesdrop']['fr-ca'] = "Espionner"; //copied from fr-fr
$text['label-eavesdrop']['es-mx'] = "Escuchar";
$text['label-eavesdrop']['fr-ca'] = "Espionner";
$text['label-eavesdrop']['fr-fr'] = "Espionner";
$text['label-eavesdrop']['he-il'] = "";
$text['label-eavesdrop']['he-il'] = "לְצוֹתֵת";
$text['label-eavesdrop']['it-it'] = "Ascolta";
$text['label-eavesdrop']['nl-nl'] = "Afluisteren";
$text['label-eavesdrop']['pl-pl'] = "Podsłuchiwanie";
$text['label-eavesdrop']['pt-br'] = "Investigar";
$text['label-eavesdrop']['pt-pt'] = "Bisbilhotar";
$text['label-eavesdrop']['ro-ro'] = "";
$text['label-eavesdrop']['ro-ro'] = "Trage cu urechea";
$text['label-eavesdrop']['ru-ru'] = "Подслушивать";
$text['label-eavesdrop']['sv-se'] = "Medlyssning";
$text['label-eavesdrop']['uk-ua'] = "підслуховувати";
$text['label-eavesdrop']['zh-cn'] = "窃听";
$text['label-eavesdrop']['ja-jp'] = "盗聴";
$text['label-eavesdrop']['ko-kr'] = "엿듣다";
$text['label-call_group']['en-us'] = "Call Group";
$text['label-call_group']['en-gb'] = "Call Group";
$text['label-call_group']['ar-eg'] = "";
$text['label-call_group']['de-at'] = "Rufgruppe"; //copied from de-de
$text['label-call_group']['de-ch'] = "Rufgruppe"; //copied from de-de
$text['label-call_group']['ar-eg'] = "مجموعة الاتصال";
$text['label-call_group']['de-at'] = "Rufgruppe";
$text['label-call_group']['de-ch'] = "Rufgruppe";
$text['label-call_group']['de-de'] = "Rufgruppe";
$text['label-call_group']['es-cl'] = "Llamar a Grupo";
$text['label-call_group']['es-mx'] = "Llamar a Grupo"; //copied from es-cl
$text['label-call_group']['fr-ca'] = "Groupe d'appel"; //copied from fr-fr
$text['label-call_group']['es-mx'] = "Llamar a Grupo";
$text['label-call_group']['fr-ca'] = "Groupe d'appel";
$text['label-call_group']['fr-fr'] = "Groupe d'appel";
$text['label-call_group']['he-il'] = "קבוצת חיוג";
$text['label-call_group']['it-it'] = "Gruppo di Chiamata";
$text['label-call_group']['nl-nl'] = "Oproep Groep";
$text['label-call_group']['pl-pl'] = "Grupa odbiorców rozmowy";
$text['label-call_group']['pt-br'] = "Grupo"; //copied from pt-pt
$text['label-call_group']['pt-br'] = "Grupo";
$text['label-call_group']['pt-pt'] = "Grupo";
$text['label-call_group']['ro-ro'] = "";
$text['label-call_group']['ro-ro'] = "Grup de apeluri";
$text['label-call_group']['ru-ru'] = "Группы вызова";
$text['label-call_group']['sv-se'] = "Ring Grupp";
$text['label-call_group']['uk-ua'] = "груповий виклик";
$text['label-call_group']['zh-cn'] = "呼叫组";
$text['label-call_group']['ja-jp'] = "通話グループ";
$text['label-call_group']['ko-kr'] = "통화 그룹";
$text['label-call_direction']['en-us'] = "Call Direction";
$text['label-call_direction']['en-gb'] = "Call Direction";
$text['label-call_direction']['ar-eg'] = "";
$text['label-call_direction']['de-at'] = "Anruf Richtung"; //copied from de-de
$text['label-call_direction']['de-ch'] = "Anruf Richtung"; //copied from de-de
$text['label-call_direction']['ar-eg'] = "اتجاه الاتصال";
$text['label-call_direction']['de-at'] = "Anruf Richtung";
$text['label-call_direction']['de-ch'] = "Anruf Richtung";
$text['label-call_direction']['de-de'] = "Anruf Richtung";
$text['label-call_direction']['es-cl'] = "Dirección de la llamada";
$text['label-call_direction']['es-mx'] = "Dirección de la llamada"; //copied from es-cl
$text['label-call_direction']['fr-ca'] = "Sens de l'appel"; //copied from fr-fr
$text['label-call_direction']['es-mx'] = "Dirección de la llamada";
$text['label-call_direction']['fr-ca'] = "Sens de l'appel";
$text['label-call_direction']['fr-fr'] = "Sens de l'appel";
$text['label-call_direction']['he-il'] = "כיוון שיחה";
$text['label-call_direction']['it-it'] = "Direzione Chiamata";
@@ -374,51 +424,84 @@ $text['label-call_direction']['nl-nl'] = "Oproep richting";
$text['label-call_direction']['pl-pl'] = "Kierunek rozmowy";
$text['label-call_direction']['pt-br'] = "Direção da chamada";
$text['label-call_direction']['pt-pt'] = "Direção da chamada";
$text['label-call_direction']['ro-ro'] = "";
$text['label-call_direction']['ro-ro'] = "Direcția de apel";
$text['label-call_direction']['ru-ru'] = "Направление вызова";
$text['label-call_direction']['sv-se'] = "Samtals Riktning";
$text['label-call_direction']['uk-ua'] = "напрямок виклику";
$text['label-call_direction']['zh-cn'] = "呼叫方向";
$text['label-call_direction']['ja-jp'] = "通話方向";
$text['label-call_direction']['ko-kr'] = "통화 방향";
$text['label-filter']['en-us'] = "Filter...";
$text['label-filter']['en-gb'] = "Filter...";
$text['label-filter']['ar-eg'] = "فيلم";
$text['label-filter']['de-at'] = "Filter...";
$text['label-filter']['de-ch'] = "Filter...";
$text['label-filter']['de-de'] = "Filter...";
$text['label-filter']['es-cl'] = "Filtro...";
$text['label-filter']['es-mx'] = "Filtro...";
$text['label-filter']['fr-ca'] = "Filtre...";
$text['label-filter']['fr-fr'] = "Filtre...";
$text['label-filter']['he-il'] = "Filter...";
$text['label-filter']['it-it'] = "Filtro...";
$text['label-filter']['nl-nl'] = "Filter...";
$text['label-filter']['pl-pl'] = "Filter...";
$text['label-filter']['pt-br'] = "Filtro...";
$text['label-filter']['pt-pt'] = "Filtro...";
$text['label-filter']['ro-ro'] = "Filtru...";
$text['label-filter']['ru-ru'] = "Фильтр";
$text['label-filter']['sv-se'] = "Filter...";
$text['label-filter']['uk-ua'] = "Фільтри";
$text['label-filter']['zh-cn'] = "筛选";
$text['label-filter']['ja-jp'] = "フィルター";
$text['label-filter']['ko-kr'] = "필터";
$text['description-eavesdrop_destination']['en-us'] = "Select the Eavesdrop Destination";
$text['description-eavesdrop_destination']['en-gb'] = "Select the Eavesdrop Destination";
$text['description-eavesdrop_destination']['ar-eg'] = "";
$text['description-eavesdrop_destination']['de-at'] = "Wählen Sie ein Ziel zum Mithören"; //copied from de-de
$text['description-eavesdrop_destination']['de-ch'] = "Wählen Sie ein Ziel zum Mithören"; //copied from de-de
$text['description-eavesdrop_destination']['ar-eg'] = "حدد وجهة Eavesdrop";
$text['description-eavesdrop_destination']['de-at'] = "Wählen Sie ein Ziel zum Mithören";
$text['description-eavesdrop_destination']['de-ch'] = "Wählen Sie ein Ziel zum Mithören";
$text['description-eavesdrop_destination']['de-de'] = "Wählen Sie ein Ziel zum Mithören";
$text['description-eavesdrop_destination']['es-cl'] = "Seleccione el Eavesdrop Destino";
$text['description-eavesdrop_destination']['es-mx'] = "Seleccione el Eavesdrop Destino"; //copied from es-cl
$text['description-eavesdrop_destination']['fr-ca'] = "Sélectionnez la destination d'espionnage"; //copied from fr-fr
$text['description-eavesdrop_destination']['es-mx'] = "Seleccione el Eavesdrop Destino";
$text['description-eavesdrop_destination']['fr-ca'] = "Sélectionnez la destination d'espionnage";
$text['description-eavesdrop_destination']['fr-fr'] = "Sélectionnez la destination d'espionnage";
$text['description-eavesdrop_destination']['he-il'] = "";
$text['description-eavesdrop_destination']['he-il'] = "בחר ביעד האזנת סתר";
$text['description-eavesdrop_destination']['it-it'] = "Seleziona la Destinazione d'Ascolto";
$text['description-eavesdrop_destination']['nl-nl'] = "Kies afluister bestemming";
$text['description-eavesdrop_destination']['pl-pl'] = "Wybierz destynację podsłuchiwanych rozmów";
$text['description-eavesdrop_destination']['pt-br'] = "Selecione o eavesdrop de destino";
$text['description-eavesdrop_destination']['pt-pt'] = "Selecione o Eavesdrop Destino";
$text['description-eavesdrop_destination']['ro-ro'] = "";
$text['description-eavesdrop_destination']['ro-ro'] = "Selectați Destinația Eavesdrop";
$text['description-eavesdrop_destination']['ru-ru'] = "Выберите подслушивание пункта назначения";
$text['description-eavesdrop_destination']['sv-se'] = "Välj Medlyssning Destination";
$text['description-eavesdrop_destination']['uk-ua'] = "Виберіть пункт призначення підслуховувати";
$text['description-eavesdrop_destination']['zh-cn'] = "选择窃听目的地";
$text['description-eavesdrop_destination']['ja-jp'] = "盗聴先を選択";
$text['description-eavesdrop_destination']['ko-kr'] = "도청 대상 선택";
$text['button-all']['en-us'] = "All";
$text['button-all']['en-gb'] = "All";
$text['button-all']['ar-eg'] = "";
$text['button-all']['de-at'] = "Alle"; //copied from de-de
$text['button-all']['de-ch'] = "Alle"; //copied from de-de
$text['button-all']['ar-eg'] = "الجميع";
$text['button-all']['de-at'] = "Alle";
$text['button-all']['de-ch'] = "Alle";
$text['button-all']['de-de'] = "Alle";
$text['button-all']['es-cl'] = "Todos";
$text['button-all']['es-mx'] = "Todos"; //copied from es-cl
$text['button-all']['fr-ca'] = "Tous"; //copied from fr-fr
$text['button-all']['es-mx'] = "Todos";
$text['button-all']['fr-ca'] = "Tous";
$text['button-all']['fr-fr'] = "Tous";
$text['button-all']['he-il'] = "הכל";
$text['button-all']['it-it'] = "Tutti";
$text['button-all']['nl-nl'] = "Alle";
$text['button-all']['pl-pl'] = "Wszyscy";
$text['button-all']['pt-br'] = "Tudo"; //copied from pt-pt
$text['button-all']['pt-br'] = "Tudo";
$text['button-all']['pt-pt'] = "Tudo";
$text['button-all']['ro-ro'] = "";
$text['button-all']['ro-ro'] = "Toate";
$text['button-all']['ru-ru'] = "Все";
$text['button-all']['sv-se'] = "Alla";
$text['button-all']['uk-ua'] = "Всі";
$text['button-all']['uk-ua'] = "Всі";
$text['button-all']['zh-cn'] = "全部";
$text['button-all']['ja-jp'] = "全て";
$text['button-all']['ko-kr'] = "모두";
?>
?>
+13 -6
View File
@@ -3,28 +3,35 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Operator Panel";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Operator Panel";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "لوحة المشغل";
$apps[$x]['menu'][$y]['title']['de-at'] = "Bedienfeld";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Bedienfeld";
$apps[$x]['menu'][$y]['title']['de-de'] = "Bedienfeld";
$apps[$x]['menu'][$y]['title']['es-cl'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Panel del operador";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Panel del operador";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Panneau de commande";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Panneau Operateur";
$apps[$x]['menu'][$y]['title']['he-il'] = "לוח מפעיל";
$apps[$x]['menu'][$y]['title']['it-it'] = "Pannello Operatore";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Bedienings paneel";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Panel operatora";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Painel do operador";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Painel operador";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Panoul operator";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Панель оператора";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Telefonist Panel";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Панель оператора";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "操作面板";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "オペレータ パネル";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "운영자 패널";
$apps[$x]['menu'][$y]['uuid'] = "dd3d173a-5d51-4231-ab22-b18c5b712bb2";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/basic_operator_panel/index.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$y++;
?>
+6 -7
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -182,8 +181,8 @@
}
//output suggestions, if any
if (sizeof($suggestions) > 0) {
$resp .= "[\n";
if (!empty($suggestions) && is_array($suggestions) && @sizeof($suggestions) > 0) {
$resp = "[\n";
$resp .= implode(",\n", $suggestions)."\n";
$resp .= "]";
@@ -192,4 +191,4 @@
if (isset($_GET['debug'])) { echo "</pre>"; }
}
?>
?>
+19 -15
View File
@@ -2,7 +2,7 @@
/* $Id$ */
/*
v_exec.php
Copyright (C) 2008-2019 Mark J Crane
Copyright (C) 2008-2023 Mark J Crane
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -27,9 +27,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -52,16 +51,16 @@
//process the requests
if (count($_GET) > 0) {
//set the variables
$switch_cmd = trim($_GET["cmd"]);
$action = trim($_GET["action"]);
$data = trim($_GET["data"]);
$direction = trim($_GET["direction"]);
$switch_cmd = trim($_GET["cmd"] ?? '');
$action = trim($_GET["action"] ?? '');
$data = trim($_GET["data"] ?? '');
$direction = trim($_GET["direction"] ?? '');
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//allow specific commands
if (strlen($switch_cmd) > 0) {
if (!empty($switch_cmd)) {
$api_cmd = '';
$uuid_pattern = '/[^-A-Fa-f0-9]/';
$num_pattern = '/[^-A-Za-z0-9()*#]/';
@@ -70,14 +69,17 @@ if (count($_GET) > 0) {
$source = preg_replace($num_pattern,'',$_GET['source']);
$destination = preg_replace($num_pattern,'',$_GET['destination']);
$api_cmd = 'bgapi originate {sip_auto_answer=true,origination_caller_id_number=' . $source . ',sip_h_Call-Info=_undef_}user/' . $source . '@' . $_SESSION['domain_name'] . ' ' . $destination . ' XML ' . trim($_SESSION['user_context']);
} elseif ($switch_cmd == 'uuid_record') {
}
else if ($switch_cmd == 'uuid_record') {
$uuid = preg_replace($uuid_pattern,'',$_GET['uuid']);
$api_cmd = 'uuid_record ' . $uuid . ' start ' . $_SESSION['switch']['recordings']['dir'] . '/' . $_SESSION['domain_name'] . '/archive/' . date('Y/M/d') . '/' . $uuid . '.wav';
} elseif ($switch_cmd == 'uuid_transfer') {
}
else if ($switch_cmd == 'uuid_transfer') {
$uuid = preg_replace($uuid_pattern,'',$_GET['uuid']);
$destination = preg_replace($num_pattern,'',$_GET['destination']);
$api_cmd = 'uuid_transfer ' . $uuid . ' ' . $destination . ' XML ' . trim($_SESSION['user_context']);
} elseif ($switch_cmd == 'uuid_eavesdrop') {
}
else if ($switch_cmd == 'uuid_eavesdrop') {
$chan_uuid = preg_replace($uuid_pattern,'',$_GET['chan_uuid']);
$ext = preg_replace($num_pattern,'',$_GET['ext']);
$destination = preg_replace($num_pattern,'',$_GET['destination']);
@@ -86,10 +88,12 @@ if (count($_GET) > 0) {
$text = $language->get();
$api_cmd = 'bgapi originate {origination_caller_id_name=' . $text['label-eavesdrop'] . ',origination_caller_id_number=' . $ext . '}user/' . $destination . '@' . $_SESSION['domain_name'] . ' &eavesdrop(' . $chan_uuid . ')';
} elseif ($switch_cmd == 'uuid_kill') {
}
else if ($switch_cmd == 'uuid_kill') {
$call_id = preg_replace($uuid_pattern,'',$_GET['call_id']);
$api_cmd = 'uuid_kill ' . $call_id;
} else {
}
else {
echo 'access denied';
return;
}
@@ -121,4 +125,4 @@ if (count($_GET) > 0) {
}
}
?>
?>
+18 -15
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -112,7 +111,7 @@
//update do not disturb
if ($user_status == "Do Not Disturb") {
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
foreach ($_SESSION['user']['extension'] as $row) {
//build the array
$array['extensions'][$x]['extension_uuid'] = $row['extension_uuid'];
$array['extensions'][$x]['dial_string'] = '!USER_BUSY';
@@ -120,8 +119,10 @@
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
if(strlen($number_alias) > 0){
if (!empty($row['extension'])) {
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
}
if (!empty($number_alias)) {
$cache->delete("directory:".$row['number_alias']."@".$_SESSION['user']['domain_name']);
}
@@ -139,8 +140,10 @@
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
if(strlen($number_alias) > 0){
if (!empty($row['extension'])) {
$cache->delete("directory:".$row['extension']."@".$_SESSION['user']['domain_name']);
}
if (!empty($number_alias)) {
$cache->delete("directory:".$row['number_alias']."@".$_SESSION['user']['domain_name']);
}
@@ -165,8 +168,10 @@
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$extension."@".$this->domain_name);
if(strlen($number_alias) > 0){
if (!empty($extension)) {
$cache->delete("directory:".$extension."@".$this->domain_name);
}
if (!empty($number_alias)) {
$cache->delete("directory:".$number_alias."@".$this->domain_name);
}
}
@@ -267,8 +272,7 @@ unset($refresh_default);
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
url += '&filter=' + ((document.getElementById('search')) ? document.getElementById('search').value : '');
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
if (document.getElementById('sort1'))
if (document.getElementById('sort1').value == '1') url += '&sort';
@@ -356,8 +360,7 @@ unset($refresh_default);
url += '&vd_ext_from=' + document.getElementById('vd_ext_from').value;
url += '&vd_ext_to=' + document.getElementById('vd_ext_to').value;
url += '&group=' + ((document.getElementById('group')) ? document.getElementById('group').value : '');
url += '&extension_filter=' + ((document.getElementById('extension_filter')) ? document.getElementById('extension_filter').value : '');
url += '&name_filter=' + ((document.getElementById('name_filter')) ? document.getElementById('name_filter').value : '');
url += '&filter=' + ((document.getElementById('search')) ? document.getElementById('search').value : '');
url += '&eavesdrop_dest=' + ((document.getElementById('eavesdrop_dest')) ? document.getElementById('eavesdrop_dest').value : '');
if (document.getElementById('sort1'))
if (document.getElementById('sort1').value == '1') url += '&sort';
@@ -44,16 +44,6 @@ if (!class_exists('basic_operator_panel')) {
}
}
/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* Get the call activity
*/
@@ -67,7 +57,6 @@ if (!class_exists('basic_operator_panel')) {
$sql .= "e.extension, ";
$sql .= "e.number_alias, ";
$sql .= "e.effective_caller_id_name, ";
$sql .= "lower(e.effective_caller_id_name) as filter_name, ";
$sql .= "e.effective_caller_id_number, ";
$sql .= "e.call_group, ";
$sql .= "e.description, ";
@@ -108,7 +97,7 @@ if (!class_exists('basic_operator_panel')) {
if (isset($extensions)) {
foreach($extensions as &$row) {
$user = $row['extension'];
if (strlen($row['number_alias']) >0 ) {
if (!empty($row['number_alias'])) {
$user = $row['number_alias'];
}
@@ -156,7 +145,7 @@ if (!class_exists('basic_operator_panel')) {
$presence_id = $field['presence_id'];
$presence = explode("@", $presence_id);
$presence_id = $presence[0];
$presence_domain = $presence[1];
$presence_domain = $presence[1] ?? '';
if ($user == $presence_id) {
if ($presence_domain == $_SESSION['domain_name']) {
$found = true;
File diff suppressed because it is too large Load Diff
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+23
View File
@@ -93,5 +93,28 @@
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
+254 -243
View File
@@ -1,257 +1,268 @@
<?php
//Bridges
$text['title-bridges']['en-us'] = 'Bridges';
$text['title-bridges']['en-gb'] = 'Bridges';
$text['title-bridges']['ar-eg'] = '';
$text['title-bridges']['de-at'] = '';
$text['title-bridges']['de-ch'] = '';
$text['title-bridges']['de-de'] = '';
$text['title-bridges']['es-cl'] = '';
$text['title-bridges']['es-mx'] = '';
$text['title-bridges']['fr-ca'] = 'Ponts';
$text['title-bridges']['fr-fr'] = 'Ponts';
$text['title-bridges']['he-il'] = '';
$text['title-bridges']['it-it'] = '';
$text['title-bridges']['nl-nl'] = 'Bruggen';
$text['title-bridges']['pl-pl'] = 'Mostki';
$text['title-bridges']['pt-br'] = '';
$text['title-bridges']['pt-pt'] = '';
$text['title-bridges']['ro-ro'] = '';
$text['title-bridges']['ru-ru'] = '';
$text['title-bridges']['sv-se'] = '';
$text['title-bridges']['uk-ua'] = '';
$text['title-bridges']['en-us'] = "Bridges";
$text['title-bridges']['en-gb'] = "Bridges";
$text['title-bridges']['ar-eg'] = "الجسور";
$text['title-bridges']['de-at'] = "Brücken";
$text['title-bridges']['de-ch'] = "Brücken";
$text['title-bridges']['de-de'] = "Brücken";
$text['title-bridges']['es-cl'] = "Puentes";
$text['title-bridges']['es-mx'] = "Puentes";
$text['title-bridges']['fr-ca'] = "Ponts";
$text['title-bridges']['fr-fr'] = "Ponts";
$text['title-bridges']['he-il'] = "גשרים";
$text['title-bridges']['it-it'] = "Ponti";
$text['title-bridges']['nl-nl'] = "Bruggen";
$text['title-bridges']['pl-pl'] = "Mostki";
$text['title-bridges']['pt-br'] = "pontes";
$text['title-bridges']['pt-pt'] = "pontes";
$text['title-bridges']['ro-ro'] = "Poduri";
$text['title-bridges']['ru-ru'] = "Мосты";
$text['title-bridges']['sv-se'] = "Broar";
$text['title-bridges']['uk-ua'] = "Мости";
$text['title-bridges']['zh-cn'] = "桥梁";
$text['title-bridges']['ja-jp'] = "橋";
$text['title-bridges']['ko-kr'] = "교량";
$text['title-bridge']['en-us'] = 'Bridge';
$text['title-bridge']['en-gb'] = 'Bridge';
$text['title-bridge']['ar-eg'] = '';
$text['title-bridge']['de-at'] = '';
$text['title-bridge']['de-ch'] = '';
$text['title-bridge']['de-de'] = '';
$text['title-bridge']['es-cl'] = '';
$text['title-bridge']['es-mx'] = '';
$text['title-bridge']['fr-ca'] = 'Pont';
$text['title-bridge']['fr-fr'] = 'Pont';
$text['title-bridge']['he-il'] = '';
$text['title-bridge']['it-it'] = '';
$text['title-bridge']['nl-nl'] = 'Brug';
$text['title-bridge']['pl-pl'] = 'Mostek';
$text['title-bridge']['pt-br'] = '';
$text['title-bridge']['pt-pt'] = '';
$text['title-bridge']['ro-ro'] = '';
$text['title-bridge']['ru-ru'] = '';
$text['title-bridge']['sv-se'] = '';
$text['title-bridge']['uk-ua'] = '';
$text['title-bridge']['en-us'] = "Bridge";
$text['title-bridge']['en-gb'] = "Bridge";
$text['title-bridge']['ar-eg'] = "كوبري";
$text['title-bridge']['de-at'] = "Brücke";
$text['title-bridge']['de-ch'] = "Brücke";
$text['title-bridge']['de-de'] = "Brücke";
$text['title-bridge']['es-cl'] = "Puente";
$text['title-bridge']['es-mx'] = "Puente";
$text['title-bridge']['fr-ca'] = "Pont";
$text['title-bridge']['fr-fr'] = "Pont";
$text['title-bridge']['he-il'] = "לְגַשֵׁר";
$text['title-bridge']['it-it'] = "Ponte";
$text['title-bridge']['nl-nl'] = "Brug";
$text['title-bridge']['pl-pl'] = "Mostek";
$text['title-bridge']['pt-br'] = "Ponte";
$text['title-bridge']['pt-pt'] = "Ponte";
$text['title-bridge']['ro-ro'] = "Pod";
$text['title-bridge']['ru-ru'] = "Мост";
$text['title-bridge']['sv-se'] = "Bro";
$text['title-bridge']['uk-ua'] = "Міст";
$text['title-bridge']['zh-cn'] = "桥";
$text['title-bridge']['ja-jp'] = "橋";
$text['title-bridge']['ko-kr'] = "다리";
$text['title_description-bridge']['en-us'] = 'Add bridge statements to destination select list.';
$text['title_description-bridge']['en-gb'] = 'Add bridge statements to destination select list.';
$text['title_description-bridge']['ar-eg'] = '';
$text['title_description-bridge']['de-at'] = '';
$text['title_description-bridge']['de-ch'] = '';
$text['title_description-bridge']['de-de'] = '';
$text['title_description-bridge']['es-cl'] = '';
$text['title_description-bridge']['es-mx'] = '';
$text['title_description-bridge']['fr-ca'] = 'Ajouter des déclarations de pont à la liste de sélection';
$text['title_description-bridge']['fr-fr'] = 'Ajouter des déclarations de pont à la liste de sélection';
$text['title_description-bridge']['he-il'] = '';
$text['title_description-bridge']['it-it'] = '';
$text['title_description-bridge']['nl-nl'] = 'Voeg brug opdrachten toe aan bestemmings lijst.';
$text['title_description-bridge']['pl-pl'] = 'Dodaj wyrażenia mostkowania do listy wyboru destynacji.';
$text['title_description-bridge']['pt-br'] = '';
$text['title_description-bridge']['pt-pt'] = '';
$text['title_description-bridge']['ro-ro'] = '';
$text['title_description-bridge']['ru-ru'] = '';
$text['title_description-bridge']['sv-se'] = '';
$text['title_description-bridge']['uk-ua'] = '';
$text['title_description-bridge']['en-us'] = "Add bridge statements to destination select list.";
$text['title_description-bridge']['en-gb'] = "Add bridge statements to destination select list.";
$text['title_description-bridge']['ar-eg'] = "إضافة عبارات الجسر إلى قائمة تحديد الوجهة.";
$text['title_description-bridge']['de-at'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
$text['title_description-bridge']['de-ch'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
$text['title_description-bridge']['de-de'] = "Bridge-Anweisungen zur Zielauswahlliste hinzufügen.";
$text['title_description-bridge']['es-cl'] = "Agregue declaraciones de puente a la lista de selección de destino.";
$text['title_description-bridge']['es-mx'] = "Agregue declaraciones de puente a la lista de selección de destino.";
$text['title_description-bridge']['fr-ca'] = "Ajouter des déclarations de pont à la liste de sélection";
$text['title_description-bridge']['fr-fr'] = "Ajouter des déclarations de pont à la liste de sélection";
$text['title_description-bridge']['he-il'] = "הוסף הצהרות גשר לרשימת בחירת היעד.";
$text['title_description-bridge']['it-it'] = "Aggiungi istruzioni bridge allelenco di selezione della destinazione.";
$text['title_description-bridge']['nl-nl'] = "Voeg bridge opdrachten toe aan bestemmings lijst.";
$text['title_description-bridge']['pl-pl'] = "Dodaj wyrażenia mostkowania do listy wyboru destynacji.";
$text['title_description-bridge']['pt-br'] = "Adicione instruções de ponte à lista de seleção de destino.";
$text['title_description-bridge']['pt-pt'] = "Adicione instruções de ponte à lista de seleção de destino.";
$text['title_description-bridge']['ro-ro'] = "Adăugați declarații bridge la lista de selectare a destinației.";
$text['title_description-bridge']['ru-ru'] = "Добавьте операторы моста в список выбора места назначения.";
$text['title_description-bridge']['sv-se'] = "Lägg till bryggsatser till destinationsvallistan.";
$text['title_description-bridge']['uk-ua'] = "Додайте оператори моста до списку вибору призначення.";
$text['title_description-bridge']['zh-cn'] = "将桥接语句添加到目标选择列表。";
$text['title_description-bridge']['ja-jp'] = "宛先選択リストにブリッジ ステートメントを追加します。";
$text['title_description-bridge']['ko-kr'] = "대상 선택 목록에 브리지 문을 추가합니다.";
$text['label-bridge_name']['en-us'] = 'Name';
$text['label-bridge_name']['en-gb'] = 'Name';
$text['label-bridge_name']['ar-eg'] = '';
$text['label-bridge_name']['de-at'] = '';
$text['label-bridge_name']['de-ch'] = '';
$text['label-bridge_name']['de-de'] = '';
$text['label-bridge_name']['es-cl'] = '';
$text['label-bridge_name']['es-mx'] = '';
$text['label-bridge_name']['fr-ca'] = 'Nom';
$text['label-bridge_name']['fr-fr'] = 'Nom';
$text['label-bridge_name']['he-il'] = '';
$text['label-bridge_name']['it-it'] = '';
$text['label-bridge_name']['nl-nl'] = 'Naam';
$text['label-bridge_name']['pl-pl'] = 'Nazwa';
$text['label-bridge_name']['pt-br'] = '';
$text['label-bridge_name']['pt-pt'] = '';
$text['label-bridge_name']['ro-ro'] = '';
$text['label-bridge_name']['ru-ru'] = '';
$text['label-bridge_name']['sv-se'] = '';
$text['label-bridge_name']['uk-ua'] = '';
$text['label-bridge_name']['en-us'] = "Name";
$text['label-bridge_name']['en-gb'] = "Name";
$text['label-bridge_name']['ar-eg'] = "اسم";
$text['label-bridge_name']['de-at'] = "Name";
$text['label-bridge_name']['de-ch'] = "Name";
$text['label-bridge_name']['de-de'] = "Name";
$text['label-bridge_name']['es-cl'] = "Nombre";
$text['label-bridge_name']['es-mx'] = "Nombre";
$text['label-bridge_name']['fr-ca'] = "Nom";
$text['label-bridge_name']['fr-fr'] = "Nom";
$text['label-bridge_name']['he-il'] = "שֵׁם";
$text['label-bridge_name']['it-it'] = "Nome";
$text['label-bridge_name']['nl-nl'] = "Naam";
$text['label-bridge_name']['pl-pl'] = "Nazwa";
$text['label-bridge_name']['pt-br'] = "Nome";
$text['label-bridge_name']['pt-pt'] = "Nome";
$text['label-bridge_name']['ro-ro'] = "Nume";
$text['label-bridge_name']['ru-ru'] = "Имя";
$text['label-bridge_name']['sv-se'] = "namn";
$text['label-bridge_name']['uk-ua'] = "Імя";
$text['label-bridge_name']['zh-cn'] = "姓名";
$text['label-bridge_name']['ja-jp'] = "名前";
$text['label-bridge_name']['ko-kr'] = "이름";
$text['description-bridge_name']['en-us'] = 'Enter the name.';
$text['description-bridge_name']['en-gb'] = 'Enter the name.';
$text['description-bridge_name']['ar-eg'] = '';
$text['description-bridge_name']['de-at'] = '';
$text['description-bridge_name']['de-ch'] = '';
$text['description-bridge_name']['de-de'] = '';
$text['description-bridge_name']['es-cl'] = '';
$text['description-bridge_name']['es-mx'] = '';
$text['description-bridge_name']['fr-ca'] = 'Entrez le nom';
$text['description-bridge_name']['fr-fr'] = 'Entrez le nom';
$text['description-bridge_name']['he-il'] = '';
$text['description-bridge_name']['it-it'] = '';
$text['description-bridge_name']['nl-nl'] = 'Voer naam in.';
$text['description-bridge_name']['pl-pl'] = 'Wprowadź nazwę.';
$text['description-bridge_name']['pt-br'] = '';
$text['description-bridge_name']['pt-pt'] = '';
$text['description-bridge_name']['ro-ro'] = '';
$text['description-bridge_name']['ru-ru'] = '';
$text['description-bridge_name']['sv-se'] = '';
$text['description-bridge_name']['uk-ua'] = '';
$text['description-bridge_name']['en-us'] = "Enter the name.";
$text['description-bridge_name']['en-gb'] = "Enter the name.";
$text['description-bridge_name']['ar-eg'] = "أدخل الاسم.";
$text['description-bridge_name']['de-at'] = "Geben Sie den Namen ein.";
$text['description-bridge_name']['de-ch'] = "Geben Sie den Namen ein.";
$text['description-bridge_name']['de-de'] = "Geben Sie den Namen ein.";
$text['description-bridge_name']['es-cl'] = "Introduzca el nombre.";
$text['description-bridge_name']['es-mx'] = "Introduzca el nombre.";
$text['description-bridge_name']['fr-ca'] = "Entrez le nom";
$text['description-bridge_name']['fr-fr'] = "Entrez le nom";
$text['description-bridge_name']['he-il'] = "הזן את השם.";
$text['description-bridge_name']['it-it'] = "Inserisci il nome.";
$text['description-bridge_name']['nl-nl'] = "Voer naam in.";
$text['description-bridge_name']['pl-pl'] = "Wprowadź nazwę.";
$text['description-bridge_name']['pt-br'] = "Digite o nome.";
$text['description-bridge_name']['pt-pt'] = "Digite o nome.";
$text['description-bridge_name']['ro-ro'] = "Introduceți numele.";
$text['description-bridge_name']['ru-ru'] = "Введите имя.";
$text['description-bridge_name']['sv-se'] = "Ange namnet.";
$text['description-bridge_name']['uk-ua'] = "Введіть назву.";
$text['description-bridge_name']['zh-cn'] = "输入名称。";
$text['description-bridge_name']['ja-jp'] = "名前を入力します。";
$text['description-bridge_name']['ko-kr'] = "이름을 입력하세요.";
$text['label-bridge_destination']['en-us'] = 'Destination';
$text['label-bridge_destination']['en-gb'] = 'Destination';
$text['label-bridge_destination']['ar-eg'] = '';
$text['label-bridge_destination']['de-at'] = '';
$text['label-bridge_destination']['de-ch'] = '';
$text['label-bridge_destination']['de-de'] = '';
$text['label-bridge_destination']['es-cl'] = '';
$text['label-bridge_destination']['es-mx'] = '';
$text['label-bridge_destination']['fr-ca'] = 'Destination';
$text['label-bridge_destination']['fr-fr'] = 'Destination';
$text['label-bridge_destination']['he-il'] = '';
$text['label-bridge_destination']['it-it'] = '';
$text['label-bridge_destination']['nl-nl'] = 'Bestemming';
$text['label-bridge_destination']['pl-pl'] = 'Destynacja';
$text['label-bridge_destination']['pt-br'] = '';
$text['label-bridge_destination']['pt-pt'] = '';
$text['label-bridge_destination']['ro-ro'] = '';
$text['label-bridge_destination']['ru-ru'] = '';
$text['label-bridge_destination']['sv-se'] = '';
$text['label-bridge_destination']['uk-ua'] = '';
$text['label-bridge_destination']['en-us'] = "Destination";
$text['label-bridge_destination']['en-gb'] = "Destination";
$text['label-bridge_destination']['ar-eg'] = "وجهة";
$text['label-bridge_destination']['de-at'] = "Ziel";
$text['label-bridge_destination']['de-ch'] = "Ziel";
$text['label-bridge_destination']['de-de'] = "Ziel";
$text['label-bridge_destination']['es-cl'] = "Destino";
$text['label-bridge_destination']['es-mx'] = "Destino";
$text['label-bridge_destination']['fr-ca'] = "Destination";
$text['label-bridge_destination']['fr-fr'] = "Destination";
$text['label-bridge_destination']['he-il'] = "יַעַד";
$text['label-bridge_destination']['it-it'] = "Destinazione";
$text['label-bridge_destination']['nl-nl'] = "Bestemming";
$text['label-bridge_destination']['pl-pl'] = "Destynacja";
$text['label-bridge_destination']['pt-br'] = "Destino";
$text['label-bridge_destination']['pt-pt'] = "Destino";
$text['label-bridge_destination']['ro-ro'] = "Destinaţie";
$text['label-bridge_destination']['ru-ru'] = "Место назначения";
$text['label-bridge_destination']['sv-se'] = "Destination";
$text['label-bridge_destination']['uk-ua'] = "Пункт призначення";
$text['label-bridge_destination']['zh-cn'] = "目的地";
$text['label-bridge_destination']['ja-jp'] = "行き先";
$text['label-bridge_destination']['ko-kr'] = "목적지";
$text['description-bridge_destination']['en-us'] = 'Enter the destination.';
$text['description-bridge_destination']['en-gb'] = 'Enter the destination.';
$text['description-bridge_destination']['ar-eg'] = '';
$text['description-bridge_destination']['de-at'] = '';
$text['description-bridge_destination']['de-ch'] = '';
$text['description-bridge_destination']['de-de'] = '';
$text['description-bridge_destination']['es-cl'] = '';
$text['description-bridge_destination']['es-mx'] = '';
$text['description-bridge_destination']['fr-ca'] = 'Entrer la destination';
$text['description-bridge_destination']['fr-fr'] = 'Entrer la destination';
$text['description-bridge_destination']['he-il'] = '';
$text['description-bridge_destination']['it-it'] = '';
$text['description-bridge_destination']['nl-nl'] = 'Voer de bestemming in.';
$text['description-bridge_destination']['pl-pl'] = 'Wprowadź destynację.';
$text['description-bridge_destination']['pt-br'] = '';
$text['description-bridge_destination']['pt-pt'] = '';
$text['description-bridge_destination']['ro-ro'] = '';
$text['description-bridge_destination']['ru-ru'] = '';
$text['description-bridge_destination']['sv-se'] = '';
$text['description-bridge_destination']['uk-ua'] = '';
$text['description-bridge_destination']['en-us'] = "Enter the destination.";
$text['description-bridge_destination']['en-gb'] = "Enter the destination.";
$text['description-bridge_destination']['ar-eg'] = "أدخل الوجهة.";
$text['description-bridge_destination']['de-at'] = "Geben Sie das Ziel ein.";
$text['description-bridge_destination']['de-ch'] = "Geben Sie das Ziel ein.";
$text['description-bridge_destination']['de-de'] = "Geben Sie das Ziel ein.";
$text['description-bridge_destination']['es-cl'] = "Introduce el destino.";
$text['description-bridge_destination']['es-mx'] = "Introduce el destino.";
$text['description-bridge_destination']['fr-ca'] = "Entrer la destination";
$text['description-bridge_destination']['fr-fr'] = "Entrer la destination";
$text['description-bridge_destination']['he-il'] = "הזן את היעד.";
$text['description-bridge_destination']['it-it'] = "Inserisci la destinazione.";
$text['description-bridge_destination']['nl-nl'] = "Voer de bestemming in.";
$text['description-bridge_destination']['pl-pl'] = "Wprowadź destynację.";
$text['description-bridge_destination']['pt-br'] = "Insira o destino.";
$text['description-bridge_destination']['pt-pt'] = "Insira o destino.";
$text['description-bridge_destination']['ro-ro'] = "Introduceți destinația.";
$text['description-bridge_destination']['ru-ru'] = "Введите пункт назначения.";
$text['description-bridge_destination']['sv-se'] = "Ange destinationen.";
$text['description-bridge_destination']['uk-ua'] = "Введіть пункт призначення.";
$text['description-bridge_destination']['zh-cn'] = "输入目的地。";
$text['description-bridge_destination']['ja-jp'] = "目的地を入力します。";
$text['description-bridge_destination']['ko-kr'] = "목적지를 입력하세요.";
$text['label-bridge_enabled']['en-us'] = 'Enabled';
$text['label-bridge_enabled']['en-gb'] = 'Enabled';
$text['label-bridge_enabled']['ar-eg'] = '';
$text['label-bridge_enabled']['de-at'] = '';
$text['label-bridge_enabled']['de-ch'] = '';
$text['label-bridge_enabled']['de-de'] = '';
$text['label-bridge_enabled']['es-cl'] = '';
$text['label-bridge_enabled']['es-mx'] = '';
$text['label-bridge_enabled']['fr-ca'] = 'Activé';
$text['label-bridge_enabled']['fr-fr'] = 'Activé';
$text['label-bridge_enabled']['he-il'] = '';
$text['label-bridge_enabled']['it-it'] = '';
$text['label-bridge_enabled']['nl-nl'] = 'Geactiveerd';
$text['label-bridge_enabled']['pl-pl'] = 'Aktywny';
$text['label-bridge_enabled']['pt-br'] = '';
$text['label-bridge_enabled']['pt-pt'] = '';
$text['label-bridge_enabled']['ro-ro'] = '';
$text['label-bridge_enabled']['ru-ru'] = '';
$text['label-bridge_enabled']['sv-se'] = '';
$text['label-bridge_enabled']['uk-ua'] = '';
$text['label-bridge_enabled']['en-us'] = "Enabled";
$text['label-bridge_enabled']['en-gb'] = "Enabled";
$text['label-bridge_enabled']['ar-eg'] = "ممكن";
$text['label-bridge_enabled']['de-at'] = "Ermöglicht";
$text['label-bridge_enabled']['de-ch'] = "Ermöglicht";
$text['label-bridge_enabled']['de-de'] = "Ermöglicht";
$text['label-bridge_enabled']['es-cl'] = "Activada";
$text['label-bridge_enabled']['es-mx'] = "Activada";
$text['label-bridge_enabled']['fr-ca'] = "Activé";
$text['label-bridge_enabled']['fr-fr'] = "Activé";
$text['label-bridge_enabled']['he-il'] = "מופעל";
$text['label-bridge_enabled']['it-it'] = "Abilitato";
$text['label-bridge_enabled']['nl-nl'] = "Geactiveerd";
$text['label-bridge_enabled']['pl-pl'] = "Aktywny";
$text['label-bridge_enabled']['pt-br'] = "Habilitado";
$text['label-bridge_enabled']['pt-pt'] = "Habilitado";
$text['label-bridge_enabled']['ro-ro'] = "Activat";
$text['label-bridge_enabled']['ru-ru'] = "Включено";
$text['label-bridge_enabled']['sv-se'] = "Aktiverad";
$text['label-bridge_enabled']['uk-ua'] = "Увімкнено";
$text['label-bridge_enabled']['zh-cn'] = "启用";
$text['label-bridge_enabled']['ja-jp'] = "有効";
$text['label-bridge_enabled']['ko-kr'] = "사용";
$text['description-bridge_enabled']['en-us'] = 'Select to enable or disable.';
$text['description-bridge_enabled']['en-gb'] = 'Select to enable or disable.';
$text['description-bridge_enabled']['ar-eg'] = '';
$text['description-bridge_enabled']['de-at'] = '';
$text['description-bridge_enabled']['de-ch'] = '';
$text['description-bridge_enabled']['de-de'] = '';
$text['description-bridge_enabled']['es-cl'] = '';
$text['description-bridge_enabled']['es-mx'] = '';
$text['description-bridge_enabled']['fr-ca'] = 'Sélectionnez pour activer ou désactiver';
$text['description-bridge_enabled']['fr-fr'] = 'Sélectionnez pour activer ou désactiver';
$text['description-bridge_enabled']['he-il'] = '';
$text['description-bridge_enabled']['it-it'] = '';
$text['description-bridge_enabled']['nl-nl'] = 'Kies aktiveer/deactiveer.';
$text['description-bridge_enabled']['pl-pl'] = 'Wybierz czy aktywować lub dezaktywować.';
$text['description-bridge_enabled']['pt-br'] = '';
$text['description-bridge_enabled']['pt-pt'] = '';
$text['description-bridge_enabled']['ro-ro'] = '';
$text['description-bridge_enabled']['ru-ru'] = '';
$text['description-bridge_enabled']['sv-se'] = '';
$text['description-bridge_enabled']['uk-ua'] = '';
$text['description-bridge_enabled']['en-us'] = "Select to enable or disable.";
$text['description-bridge_enabled']['en-gb'] = "Select to enable or disable.";
$text['description-bridge_enabled']['ar-eg'] = "حدد للتمكين أو التعطيل.";
$text['description-bridge_enabled']['de-at'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
$text['description-bridge_enabled']['de-ch'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
$text['description-bridge_enabled']['de-de'] = "Wählen Sie zum Aktivieren oder Deaktivieren.";
$text['description-bridge_enabled']['es-cl'] = "Seleccione para habilitar o deshabilitar.";
$text['description-bridge_enabled']['es-mx'] = "Seleccione para habilitar o deshabilitar.";
$text['description-bridge_enabled']['fr-ca'] = "Sélectionnez pour activer ou désactiver";
$text['description-bridge_enabled']['fr-fr'] = "Sélectionnez pour activer ou désactiver";
$text['description-bridge_enabled']['he-il'] = "בחר כדי להפעיל או להשבית.";
$text['description-bridge_enabled']['it-it'] = "Selezionare per abilitare o disabilitare.";
$text['description-bridge_enabled']['nl-nl'] = "Kies aktiveer/deactiveer.";
$text['description-bridge_enabled']['pl-pl'] = "Wybierz czy aktywować lub dezaktywować.";
$text['description-bridge_enabled']['pt-br'] = "Selecione para habilitar ou desabilitar.";
$text['description-bridge_enabled']['pt-pt'] = "Selecione para habilitar ou desabilitar.";
$text['description-bridge_enabled']['ro-ro'] = "Selectați pentru a activa sau dezactiva.";
$text['description-bridge_enabled']['ru-ru'] = "Выберите, чтобы включить или отключить.";
$text['description-bridge_enabled']['sv-se'] = "Välj för att aktivera eller inaktivera.";
$text['description-bridge_enabled']['uk-ua'] = "Виберіть, щоб увімкнути або вимкнути.";
$text['description-bridge_enabled']['zh-cn'] = "选择启用或禁用。";
$text['description-bridge_enabled']['ja-jp'] = "有効または無効を選択します。";
$text['description-bridge_enabled']['ko-kr'] = "활성화 또는 비활성화를 선택합니다.";
$text['label-bridge_description']['en-us'] = 'Description';
$text['label-bridge_description']['en-gb'] = 'Description';
$text['label-bridge_description']['ar-eg'] = '';
$text['label-bridge_description']['de-at'] = '';
$text['label-bridge_description']['de-ch'] = '';
$text['label-bridge_description']['de-de'] = '';
$text['label-bridge_description']['es-cl'] = '';
$text['label-bridge_description']['es-mx'] = '';
$text['label-bridge_description']['fr-ca'] = 'La description';
$text['label-bridge_description']['fr-fr'] = 'La description';
$text['label-bridge_description']['he-il'] = '';
$text['label-bridge_description']['it-it'] = '';
$text['label-bridge_description']['nl-nl'] = 'Omschrijving';
$text['label-bridge_description']['pl-pl'] = 'Opis';
$text['label-bridge_description']['pt-br'] = '';
$text['label-bridge_description']['pt-pt'] = '';
$text['label-bridge_description']['ro-ro'] = '';
$text['label-bridge_description']['ru-ru'] = '';
$text['label-bridge_description']['sv-se'] = '';
$text['label-bridge_description']['uk-ua'] = '';
$text['label-bridge_description']['en-us'] = "Description";
$text['label-bridge_description']['en-gb'] = "Description";
$text['label-bridge_description']['ar-eg'] = "وصف";
$text['label-bridge_description']['de-at'] = "Beschreibung";
$text['label-bridge_description']['de-ch'] = "Beschreibung";
$text['label-bridge_description']['de-de'] = "Beschreibung";
$text['label-bridge_description']['es-cl'] = "Descripción";
$text['label-bridge_description']['es-mx'] = "Descripción";
$text['label-bridge_description']['fr-ca'] = "Description";
$text['label-bridge_description']['fr-fr'] = "Description";
$text['label-bridge_description']['he-il'] = "תיאור";
$text['label-bridge_description']['it-it'] = "Descrizione";
$text['label-bridge_description']['nl-nl'] = "Omschrijving";
$text['label-bridge_description']['pl-pl'] = "Opis";
$text['label-bridge_description']['pt-br'] = "Descrição";
$text['label-bridge_description']['pt-pt'] = "Descripção";
$text['label-bridge_description']['ro-ro'] = "Descriere";
$text['label-bridge_description']['ru-ru'] = "Описание";
$text['label-bridge_description']['sv-se'] = "Beskrivning";
$text['label-bridge_description']['uk-ua'] = "Опис";
$text['label-bridge_description']['tr-tr'] = "Açıklama";
$text['label-bridge_description']['zh-cn'] = "描述";
$text['label-bridge_description']['ja-jp'] = "説明";
$text['label-bridge_description']['ko-kr'] = "설명";
$text['description-bridge_description']['en-us'] = 'Enter the description. ';
$text['description-bridge_description']['en-gb'] = 'Enter the description. ';
$text['description-bridge_description']['ar-eg'] = '';
$text['description-bridge_description']['de-at'] = '';
$text['description-bridge_description']['de-ch'] = '';
$text['description-bridge_description']['de-de'] = '';
$text['description-bridge_description']['es-cl'] = '';
$text['description-bridge_description']['es-mx'] = '';
$text['description-bridge_description']['fr-ca'] = 'Entrez la description';
$text['description-bridge_description']['fr-fr'] = 'Entrez la description';
$text['description-bridge_description']['he-il'] = '';
$text['description-bridge_description']['it-it'] = '';
$text['description-bridge_description']['nl-nl'] = 'Voer omschrijving in.';
$text['description-bridge_description']['pl-pl'] = 'Wprowadź opis.';
$text['description-bridge_description']['pt-br'] = '';
$text['description-bridge_description']['pt-pt'] = '';
$text['description-bridge_description']['ro-ro'] = '';
$text['description-bridge_description']['ru-ru'] = '';
$text['description-bridge_description']['sv-se'] = '';
$text['description-bridge_description']['uk-ua'] = '';
$text['label-bridge_description']['en-us'] = "Description";
$text['label-bridge_description']['en-gb'] = "Description";
$text['label-bridge_description']['ar-eg'] = "";
$text['label-bridge_description']['de-at'] = "Beschreibung"; //copied from de-de
$text['label-bridge_description']['de-ch'] = "Beschreibung"; //copied from de-de
$text['label-bridge_description']['de-de'] = "Beschreibung";
$text['label-bridge_description']['es-cl'] = "Descripción";
$text['label-bridge_description']['es-mx'] = "Descripción"; //copied from es-cl
$text['label-bridge_description']['fr-ca'] = "Description"; //copied from fr-fr
$text['label-bridge_description']['fr-fr'] = "Description";
$text['label-bridge_description']['he-il'] = "";
$text['label-bridge_description']['it-it'] = "Descrizione";
$text['label-bridge_description']['nl-nl'] = "Omschrijving";
$text['label-bridge_description']['pl-pl'] = "Opis";
$text['label-bridge_description']['pt-br'] = "Descrição";
$text['label-bridge_description']['pt-pt'] = "Descripção";
$text['label-bridge_description']['ro-ro'] = "";
$text['label-bridge_description']['ru-ru'] = "Описание";
$text['label-bridge_description']['sv-se'] = "Beskrivning";
$text['label-bridge_description']['uk-ua'] = "Опис";
$text['label-bridge_description']['tr-tr'] = "Açıklama";
$text['description-bridge_description']['en-us'] = "Enter the description. ";
$text['description-bridge_description']['en-gb'] = "Enter the description. ";
$text['description-bridge_description']['ar-eg'] = "أدخل الوصف.";
$text['description-bridge_description']['de-at'] = "Geben Sie die Beschreibung ein.";
$text['description-bridge_description']['de-ch'] = "Geben Sie die Beschreibung ein.";
$text['description-bridge_description']['de-de'] = "Geben Sie die Beschreibung ein.";
$text['description-bridge_description']['es-cl'] = "Introduce la descripción.";
$text['description-bridge_description']['es-mx'] = "Introduce la descripción.";
$text['description-bridge_description']['fr-ca'] = "Entrez la description";
$text['description-bridge_description']['fr-fr'] = "Entrez la description";
$text['description-bridge_description']['he-il'] = "הזן את התיאור.";
$text['description-bridge_description']['it-it'] = "Inserisci la descrizione.";
$text['description-bridge_description']['nl-nl'] = "Voer omschrijving in.";
$text['description-bridge_description']['pl-pl'] = "Wprowadź opis.";
$text['description-bridge_description']['pt-br'] = "Digite a descrição.";
$text['description-bridge_description']['pt-pt'] = "Digite a descrição.";
$text['description-bridge_description']['ro-ro'] = "Introduceți descrierea.";
$text['description-bridge_description']['ru-ru'] = "Введите описание.";
$text['description-bridge_description']['sv-se'] = "Ange beskrivningen.";
$text['description-bridge_description']['uk-ua'] = "Введіть опис.";
$text['description-bridge_description']['zh-cn'] = "输入说明。";
$text['description-bridge_description']['ja-jp'] = "説明を入力します。";
$text['description-bridge_description']['ko-kr'] = "설명을 입력합니다.";
?>
+32 -17
View File
@@ -1,21 +1,36 @@
<?php
$apps[$x]['menu'][0]['title']['en-us'] = 'Bridges';
$apps[$x]['menu'][0]['title']['en-gb'] = 'Bridges';
$apps[$x]['menu'][0]['title']['es-cl'] = '';
$apps[$x]['menu'][0]['title']['fr-fr'] = '';
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
$apps[$x]['menu'][0]['title']['nl-nl'] = 'Bruggen';
$apps[$x]['menu'][0]['title']['pl'] = 'Mostkowania';
$apps[$x]['menu'][0]['title']['sv-se'] = '';
$apps[$x]['menu'][0]['title']['uk'] = '';
$apps[$x]['menu'][0]['title']['de-at'] = '';
$apps[$x]['menu'][0]['uuid'] = '345f0aad-8321-4a8b-9f08-c4730297660c';
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
$apps[$x]['menu'][0]['category'] = 'internal';
$apps[$x]['menu'][0]['path'] = '/app/bridges/bridges.php';
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
//$apps[$x]['menu'][0]['groups'][] = 'admin';
//$apps[$x]['menu'][0]['groups'][] = 'user';
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Bridges";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Bridges";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الجسور";
$apps[$x]['menu'][$y]['title']['de-at'] = "Brücken";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Brücken";
$apps[$x]['menu'][$y]['title']['de-de'] = "Brücken";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Puentes";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Puentes";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Ponts";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Ponts";
$apps[$x]['menu'][$y]['title']['he-il'] = "גשרים";
$apps[$x]['menu'][$y]['title']['it-it'] = "Ponti";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Bridges";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Mostkowania";
$apps[$x]['menu'][$y]['title']['pt-br'] = "pontes";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "pontes";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Poduri";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Мосты";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Broar";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Міста";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "桥梁";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "ブリッジ";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "교량";
$apps[$x]['menu'][$y]['uuid'] = "345f0aad-8321-4a8b-9f08-c4730297660c";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/bridges/bridges.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
+35 -28
View File
@@ -21,9 +21,8 @@
the Initial Developer. All Rights Reserved.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -37,7 +36,7 @@
$text = $language->get();
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$bridge_uuid = $_REQUEST["id"];
$id = $_REQUEST["id"];
@@ -46,17 +45,24 @@
$action = "add";
}
//set the defaults
$bridge_uuid = '';
$bridge_name = '';
$bridge_destination = '';
$bridge_enabled = '';
$bridge_description = '';
//get http post variables and set them to php variables
if (is_array($_POST)) {
$bridge_uuid = $_POST["bridge_uuid"];
if (!empty($_POST)) {
$bridge_uuid = $_POST["bridge_uuid"] ?? null;
$bridge_name = $_POST["bridge_name"];
$bridge_destination = $_POST["bridge_destination"];
$bridge_enabled = $_POST["bridge_enabled"];
$bridge_enabled = $_POST["bridge_enabled"] ?? 'false';
$bridge_description = $_POST["bridge_description"];
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//delete the bridge
if (permission_exists('bridge_delete')) {
@@ -88,10 +94,10 @@
//check for all required data
$msg = '';
if (strlen($bridge_name) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_name']."<br>\n"; }
if (strlen($bridge_destination) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_destination']."<br>\n"; }
if (strlen($bridge_enabled) == 0) { $msg .= $text['message-required']." ".$text['label-bridge_enabled']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (empty($bridge_name)) { $msg .= $text['message-required']." ".$text['label-bridge_name']."<br>\n"; }
if (empty($bridge_destination)) { $msg .= $text['message-required']." ".$text['label-bridge_destination']."<br>\n"; }
if (empty($bridge_enabled)) { $msg .= $text['message-required']." ".$text['label-bridge_enabled']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -105,7 +111,7 @@
}
//add the bridge_uuid
if (strlen($bridge_uuid) == 0) {
if (empty($bridge_uuid)) {
$bridge_uuid = uuid();
}
@@ -143,14 +149,14 @@
}
//pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && is_array($_GET) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
$bridge_uuid = $_GET["id"];
$sql = "select * from v_bridges ";
$sql .= "where bridge_uuid = :bridge_uuid ";
$parameters['bridge_uuid'] = $bridge_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
$row = $database->select($sql, $parameters ?? null, 'row');
if (!empty($row)) {
$bridge_name = $row["bridge_name"];
$bridge_destination = $row["bridge_destination"];
$bridge_enabled = $row["bridge_enabled"];
@@ -159,6 +165,9 @@
unset($sql, $parameters, $row);
}
//set the defaults
if (empty($bridge_enabled)) { $bridge_enabled = 'true'; }
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -215,20 +224,18 @@
echo " ".$text['label-bridge_enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='bridge_enabled'>\n";
if ($bridge_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='bridge_enabled' name='bridge_enabled' value='true' ".(!empty($bridge_enabled) && $bridge_enabled == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span>\n";
echo " </label>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
echo " <select class='formfld' id='bridge_enabled' name='bridge_enabled'>\n";
echo " <option value='true' ".($bridge_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($bridge_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
}
if ($bridge_enabled == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-bridge_enabled']."\n";
echo "</td>\n";
@@ -258,4 +265,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>
+28 -22
View File
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,15 +42,22 @@
$language = new text;
$text = $language->get();
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the http post data
if (is_array($_POST['bridges'])) {
if (!empty($_POST['bridges'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$bridges = $_POST['bridges'];
}
//process the http post data by action
if ($action != '' && is_array($bridges) && @sizeof($bridges) != 0) {
if (!empty($action) && !empty($bridges)) {
switch ($action) {
case 'copy':
if (permission_exists('bridge_add')) {
@@ -73,16 +79,16 @@
break;
}
header('Location: bridges.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search string
if (isset($_GET["search"])) {
if (!empty($search)) {
$search = strtolower($_GET["search"]);
$sql_search = " (";
$sql_search .= " lower(bridge_name) like :search ";
@@ -95,7 +101,7 @@
//get the count
$sql = "select count(bridge_uuid) from v_bridges ";
if ($_GET['show'] == "all" && permission_exists('bridge_all')) {
if (!empty($show) && $show == "all" && permission_exists('bridge_all')) {
if (isset($sql_search)) {
$sql .= "where ".$sql_search;
}
@@ -108,13 +114,13 @@
$parameters['domain_uuid'] = $domain_uuid;
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = $search ? "&search=".$search : null;
$param = ($_GET['show'] == 'all' && permission_exists('bridge_all')) ? "&show=all" : null;
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
$param = !empty($search) ? "&search=".$search : null;
$param = (isset($_GET['show']) && $_GET['show'] == 'all' && permission_exists('bridge_all')) ? "&show=all" : null;
$page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
@@ -124,7 +130,7 @@
$sql .= order_by($order_by, $order, 'bridge_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$bridges = $database->select($sql, $parameters, 'all');
$bridges = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -153,7 +159,7 @@
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('bridge_all')) {
if ($_GET['show'] == 'all') {
if (isset($show) && $show == 'all') {
echo " <input type='hidden' name='show' value='all'>\n";
}
else {
@@ -192,22 +198,22 @@
echo "<tr class='list-header'>\n";
if (permission_exists('bridge_add') || permission_exists('bridge_edit') || permission_exists('bridge_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($bridges ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($bridges) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
if (!empty($show) && $show == 'all' && permission_exists('bridge_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('bridge_name', $text['label-bridge_name'], $order_by, $order);
echo th_order_by('bridge_destination', $text['label-bridge_destination'], $order_by, $order);
echo th_order_by('bridge_enabled', $text['label-bridge_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-bridge_description']."</th>\n";
if (permission_exists('bridge_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($bridges) && @sizeof($bridges) != 0) {
if (!empty($bridges)) {
$x = 0;
foreach ($bridges as $row) {
if (permission_exists('bridge_edit')) {
@@ -220,7 +226,7 @@
echo " <input type='hidden' name='bridges[$x][uuid]' value='".escape($row['bridge_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == 'all' && permission_exists('bridge_all')) {
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('bridge_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td>\n";
@@ -242,7 +248,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['bridge_description'])."</td>\n";
if (permission_exists('bridge_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('bridge_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+3 -13
View File
@@ -57,16 +57,6 @@ if (!class_exists('bridges')) {
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete records
*/
@@ -90,7 +80,7 @@ if (!class_exists('bridges')) {
//build the delete array
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
}
@@ -142,7 +132,7 @@ if (!class_exists('bridges')) {
//get current toggle state
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -216,7 +206,7 @@ if (!class_exists('bridges')) {
//get checked records
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+24
View File
@@ -166,5 +166,29 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -5,12 +5,12 @@
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Block";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "حظر المكالمات";
$apps[$x]['menu'][$y]['title']['de-at'] = "Sperrlisten";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Einloggen";
$apps[$x]['menu'][$y]['title']['de-de'] = "Sperrlisten";
$apps[$x]['menu'][$y]['title']['el-gr'] = "Λίστα απορρίψεων";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Bloqueo de llamadas";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Block";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Call Block";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Liste Noire";
$apps[$x]['menu'][$y]['title']['he-il'] = "חסימת מספר";
$apps[$x]['menu'][$y]['title']['it-it'] = "Blocco Chiamate";
@@ -22,12 +22,18 @@
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Черный список";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Blockera Samtal";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Блокування дзвінків";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫块";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コール ブロック";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 차단";
$apps[$x]['menu'][$y]['uuid'] = "29295c90-b1b9-440b-9c7E-c8363c6e8975";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_block/call_block.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "user";
$y++;
?>
+62 -47
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -27,9 +27,8 @@
All of it has been rewritten over years.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -42,15 +41,22 @@
$language = new text;
$text = $language->get();
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data
if (is_array($_POST['call_blocks'])) {
if (!empty($_POST['call_blocks'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_blocks = $_POST['call_blocks'];
}
//process the http post data by action
if ($action != '' && is_array($call_blocks) && @sizeof($call_blocks) != 0) {
if (!empty($action) && !empty($call_blocks)) {
switch ($action) {
case 'copy':
if (permission_exists('call_block_add')) {
@@ -77,33 +83,26 @@
}
//get variables used to control the order
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$sql_search = " (";
$sql_search .= "lower(call_block_name) like :search ";
$sql_search .= "or call_block_country_code like :search ";
$sql_search .= "or lower(call_block_number) like :search ";
$sql_search .= "or lower(call_block_description) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
if (!empty($_GET["search"])) {
$search = strtolower($_GET["search"]);
}
//prepare to page the results
$sql = "select count(*) from view_call_block ";
$sql .= "where true ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
if ($show == "all" && permission_exists('call_block_all')) {
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and (domain_uuid = :domain_uuid) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
$sql .= "and extension_uuid in (";
$x = 0;
foreach ($_SESSION['user']['extension'] as $field) {
@@ -114,21 +113,29 @@
}
$sql .= ") ";
}
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(call_block_name) like :search ";
$sql .= " or lower(call_block_direction) like :search ";
$sql .= " or lower(call_block_number) like :search ";
$sql .= " or lower(call_block_app) like :search ";
$sql .= " or lower(call_block_data) like :search ";
$sql .= " or lower(call_block_description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
unset($parameters);
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".$search;
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
if ($show == "all" && permission_exists('call_block_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
@@ -136,15 +143,15 @@
//get the list
$sql = "select * from view_call_block ";
$sql .= "where true ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
if ($show == "all" && permission_exists('call_block_all')) {
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and (domain_uuid = :domain_uuid) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and extension_uuid in (";
$x = 0;
foreach ($_SESSION['user']['extension'] as $field) {
@@ -155,13 +162,21 @@
}
$sql .= ") ";
}
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(call_block_name) like :search ";
$sql .= " or lower(call_block_direction) like :search ";
$sql .= " or lower(call_block_number) like :search ";
$sql .= " or lower(call_block_app) like :search ";
$sql .= " or lower(call_block_data) like :search ";
$sql .= " or lower(call_block_description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, ['call_block_country_code','call_block_number']);
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -189,18 +204,18 @@
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_forward_all')) {
if ($_GET['show'] == 'all') {
if (permission_exists('call_block_all')) {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type).'&show=all'.($search != '' ? "&search=".urlencode($search) : null)]);
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.($search != '' ? "&search=".urlencode($search ?? '') : null)]);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_block.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
if (!empty($paging_controls_mini)) {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}
echo " </form>\n";
@@ -229,10 +244,10 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_block_add') || permission_exists('call_block_edit') || permission_exists('call_block_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
if ($show == 'all' && permission_exists('domain_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('call_block_direction', $text['label-direction'], $order_by, $order, null, "style='width: 1%;' class='center'");
@@ -245,12 +260,12 @@
echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('date_added', $text['label-date-added'], $order_by, $order, null, "class='shrink no-wrap'");
echo "<th class='hide-md-dn pct-20'>".$text['label-description']."</th>\n";
if (permission_exists('call_block_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($result)) {
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
if (permission_exists('call_block_edit')) {
@@ -263,7 +278,7 @@
echo " <input type='hidden' name='call_blocks[".$x."][uuid]' value='".escape($row['call_block_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == 'all' && permission_exists('domain_all')) {
if (!empty($show) && $show == 'all' && permission_exists('domain_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td class='center'>";
@@ -273,7 +288,7 @@
}
echo " </td>\n";
echo " <td class='center'>";
if (strlen($row['extension']) == 0) {
if (empty($row['extension'])) {
echo $text['label-all'];
}
else {
@@ -308,9 +323,9 @@
echo $text['label-'.$row['call_block_enabled']];
}
echo " </td>\n";
echo " <td class='no-wrap'>".date('j M Y', $row['date_added'])." <span class='hide-sm-dn'>".date(($_SESSION['domain']['time_format']['text'] == '12h' ? 'h:i:s a' : 'H:i:s'), $row['date_added'])."</span></td>\n";
echo " <td class='no-wrap'>".date('j M Y', $row['date_added'])." <span class='hide-sm-dn'>".date((!empty($_SESSION['domain']['time_format']['text']) == '12h' ? 'h:i:s a' : 'H:i:s'), $row['date_added'])."</span></td>\n";
echo " <td class='description overflow hide-md-dn'>".escape($row['call_block_description'])."</td>\n";
if (permission_exists('call_block_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_block_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+79 -51
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -27,9 +27,8 @@
Original version of Call Block was written by Gerrit Visser <gerrit308@gmail.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -41,8 +40,14 @@
$language = new text;
$text = $language->get();
//set the defaults
$call_block_name = '';
$call_block_country_code = '';
$call_block_number = '';
$call_block_description = '';
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$call_block_uuid = $_REQUEST["id"];
}
@@ -50,26 +55,37 @@
$action = "add";
}
//get order and order by and sanitize the values
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//get http post variables and set them to php variables
if (count($_POST) > 0) {
if (!empty($_POST)) {
//get the variables from the http post
$call_block_direction = $_POST["call_block_direction"];
$extension_uuid = $_POST["extension_uuid"];
$call_block_name = $_POST["call_block_name"];
$call_block_country_code = $_POST["call_block_country_code"];
$call_block_number = $_POST["call_block_number"];
$call_block_enabled = $_POST["call_block_enabled"];
$call_block_description = $_POST["call_block_description"];
$call_block_name = $_POST["call_block_name"] ?? null;
$call_block_country_code = $_POST["call_block_country_code"] ?? null;
$call_block_number = $_POST["call_block_number"] ?? null;
$call_block_enabled = $_POST["call_block_enabled"] ?? 'false';
$call_block_description = $_POST["call_block_description"] ?? null;
//get the call block app and data
$action_array = explode(':', $_POST["call_block_action"]);
$call_block_app = $action_array[0];
$call_block_data = $action_array[1];
$call_block_data = $action_array[1] ?? null;
//sanitize the data
$extension_uuid = preg_replace("#[^a-fA-F0-9./]#", "", $extension_uuid);
$call_block_country_code = preg_replace('#[^0-9./]#', '', $call_block_country_code ?? '');
$call_block_number = preg_replace('#[^0-9./]#', '', $call_block_number ?? '');
}
//handle the http post
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//handle action
if ($_POST['action'] != '') {
if (!empty($_POST['action'])) {
switch ($_POST['action']) {
case 'delete':
if (permission_exists('call_block_delete') && is_uuid($call_block_uuid)) {
@@ -82,8 +98,8 @@
}
break;
case 'add':
$xml_cdrs = $_POST['xml_cdrs'];
if (permission_exists('call_block_add') && is_array($xml_cdrs) && @sizeof($xml_cdrs) != 0) {
$xml_cdrs = $_POST['xml_cdrs'] ?? null;
if (!empty($xml_cdrs) && permission_exists('call_block_add')) {
$obj = new call_block;
$obj->call_block_direction = $call_block_direction;
$obj->extension_uuid = $extension_uuid;
@@ -108,10 +124,10 @@
//check for all required data
$msg = '';
//if (strlen($call_block_name) == 0) { $msg .= $text['label-provide-name']."<br>\n"; }
//if (strlen($call_block_number) == 0) { $msg .= $text['label-provide-number']."<br>\n"; }
if (strlen($call_block_enabled) == 0) { $msg .= $text['label-provide-enabled']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
//if (empty($call_block_name)) { $msg .= $text['label-provide-name']."<br>\n"; }
//if (empty($call_block_number)) { $msg .= $text['label-provide-number']."<br>\n"; }
if (empty($call_block_enabled)) { $msg .= $text['label-provide-enabled']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -125,7 +141,7 @@
}
//add or update the database
if (is_array($_POST) && sizeof($_POST) != 0 && $_POST["persistformvar"] != "true") {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//ensure call block is enabled in the dialplan
if ($action == "add" || $action == "update") {
@@ -137,7 +153,7 @@
$database = new database;
$rows = $database->select($sql, $parameters);
if (is_array($rows) && sizeof($rows) != 0) {
if (!empty($rows)) {
foreach ($rows as $index => $row) {
$array['dialplans'][$index]['dialplan_uuid'] = $row['dialplan_uuid'];
$array['dialplans'][$index]['dialplan_enabled'] = 'true';
@@ -164,7 +180,7 @@
$array['call_block'][0]['call_block_uuid'] = uuid();
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
if (is_uuid($extension_uuid)) {
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
}
$array['call_block'][0]['call_block_name'] = $call_block_name;
@@ -198,7 +214,7 @@
$parameters['call_block_uuid'] = $call_block_uuid;
$database = new database;
$result = $database->select($sql, $parameters);
if (is_array($result) && sizeof($result) != 0) {
if (!empty($result)) {
//set the domain_name
$domain_name = $result[0]["domain_name"];
@@ -211,7 +227,7 @@
$array['call_block'][0]['call_block_uuid'] = $call_block_uuid;
$array['call_block'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_block'][0]['call_block_direction'] = $call_block_direction;
if (is_uuid($extension_uuid)) {
if (!empty($extension_uuid) && is_uuid($extension_uuid)) {
$array['call_block'][0]['extension_uuid'] = $extension_uuid;
}
$array['call_block'][0]['call_block_name'] = $call_block_name;
@@ -238,7 +254,7 @@
}
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && empty($_POST["persistformvar"])) {
$call_block_uuid = $_GET["id"];
$sql = "select * from v_call_block ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -247,7 +263,7 @@
$parameters['call_block_uuid'] = $call_block_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
if (!empty($row)) {
$call_block_direction = $row["call_block_direction"];
$extension_uuid = $row["extension_uuid"];
$call_block_name = $row["call_block_name"];
@@ -261,6 +277,9 @@
unset($sql, $parameters, $row);
}
//set the defaults
if (empty($call_block_enabled)) { $call_block_enabled = 'true'; }
//get the extensions
if (permission_exists('call_block_all') || permission_exists('call_block_extension')) {
$sql = "select extension_uuid, extension, number_alias, user_context, description from v_extensions ";
@@ -356,7 +375,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='call_block_direction'>\n";
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
echo " <option value='outbound' ".($call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
echo " <option value='outbound' ".(!empty($call_block_direction) && $call_block_direction == "outbound" ? "selected" : null).">".$text['label-outbound']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-direction']."\n";
@@ -372,9 +391,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <select class='formfld' name='extension_uuid'>\n";
echo " <option value=''>".$text['label-all']."</option>\n";
if (is_array($extensions) && sizeof($extensions) != 0) {
if (!empty($extensions)) {
foreach ($extensions as $row) {
$selected = $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
$selected = !empty($extension_uuid) && $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
echo " <option value='".urlencode($row["extension_uuid"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
}
}
@@ -440,7 +459,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo " <option value='hold'>".$text['label-hold']."</option>\n";
}
if (permission_exists('call_block_extension')) {
if (is_array($extensions) && sizeof($extensions) != 0) {
if (!empty($extensions)) {
echo " <optgroup label='".$text['label-extension']."'>\n";
foreach ($extensions as &$row) {
$selected = ($call_block_app == 'extension' && $call_block_data == $row['extension']) ? "selected='selected'" : null;
@@ -450,7 +469,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
}
}
if (permission_exists('call_block_ivr')) {
if (is_array($ivrs) && sizeof($ivrs) != 0) {
if (!empty($ivrs)) {
echo " <optgroup label='".$text['label-ivr_menus']."'>\n";
foreach ($ivrs as &$row) {
$selected = ($call_block_app == 'ivr' && $call_block_data == $row['ivr_menu_extension']) ? "selected='selected'" : null;
@@ -460,7 +479,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
}
}
if (permission_exists('call_block_ring_group')) {
if (is_array($ring_groups) && sizeof($ring_groups) != 0) {
if (!empty($ring_groups)) {
echo " <optgroup label='".$text['label-ring_groups']."'>\n";
foreach ($ring_groups as &$row) {
$selected = ($call_block_app == 'ring_group' && $call_block_data == $row['ring_group_extension']) ? "selected='selected'" : null;
@@ -470,7 +489,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
}
}
if (permission_exists('call_block_voicemail')) {
if (is_array($voicemails) && sizeof($voicemails) != 0) {
if (!empty($voicemails)) {
echo " <optgroup label='".$text['label-voicemail']."'>\n";
foreach ($voicemails as &$row) {
$selected = ($call_block_app == 'voicemail' && $call_block_data == $row['voicemail_id']) ? "selected='selected'" : null;
@@ -493,10 +512,18 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='call_block_enabled'>\n";
echo " <option value='true' ".(($call_block_enabled == "true") ? "selected" : null).">".$text['label-true']."</option>\n";
echo " <option value='false' ".(($call_block_enabled == "false") ? "selected" : null).">".$text['label-false']."</option>\n";
echo " </select>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='call_block_enabled' name='call_block_enabled' value='true' ".($call_block_enabled == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span>\n";
echo " </label>\n";
}
else {
echo " <select class='formfld' id='call_block_enabled' name='call_block_enabled'>\n";
echo " <option value='true' ".($call_block_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($call_block_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
}
echo "<br />\n";
echo $text['description-enable']."\n";
echo "\n";
@@ -525,21 +552,21 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "</form>";
//get recent calls from the db (if not editing an existing call block record)
if (!is_uuid($_REQUEST["id"])) {
if (empty($_REQUEST["id"])) {
//without block all permission, limit to assigned extension(s)
if (!permission_exists('call_block_all') && is_array($_SESSION['user']['extension'])) {
if (!permission_exists('call_block_all') && !empty($_SESSION['user']['extension'])) {
foreach ($_SESSION['user']['extension'] as $assigned_extension) {
$assigned_extensions[$assigned_extension['extension_uuid']] = $assigned_extension['user'];
}
if (is_array($assigned_extensions) && sizeof($assigned_extensions) != 0) {
if (!empty($assigned_extensions)) {
$x = 0;
foreach ($assigned_extensions as $assigned_extension_uuid => $assigned_extension) {
$sql_where_array[] = "extension_uuid = :extension_uuid_".$x;
$parameters['extension_uuid_'.$x] = $assigned_extension_uuid;
$x++;
}
if (is_array($sql_where_array) && sizeof($sql_where_array) != 0) {
if (!empty($sql_where_array)) {
$sql_where .= "and (".implode(' or ', $sql_where_array).") ";
}
unset($sql_where_array);
@@ -550,7 +577,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
$sql = "select caller_id_name, caller_id_number, caller_destination, start_epoch, direction, hangup_cause, duration, billsec, xml_cdr_uuid ";
$sql .= "from v_xml_cdr where domain_uuid = :domain_uuid ";
$sql .= "and direction <> 'local' ";
$sql .= $sql_where;
$sql .= $sql_where ?? null;
$sql .= "order by start_stamp desc ";
$sql .= limit_offset($_SESSION['call_block']['recent_call_limit']['text']);
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
@@ -578,9 +605,9 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "<select class='formfld' style='".$select_margin."' name='extension_uuid'>\n";
echo " <option value='' disabled='disabled'>".$text['label-extension']."</option>\n";
echo " <option value='' selected='selected'>".$text['label-all']."</option>\n";
if (is_array($extensions) && sizeof($extensions) != 0) {
if (!empty($extensions)) {
foreach ($extensions as $row) {
$selected = $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
$selected = !empty($extension_uuid) && $extension_uuid == $row['extension_uuid'] ? "selected='selected'" : null;
echo " <option value='".urlencode($row["extension_uuid"])."' ".$selected.">".escape($row['extension'])." ".escape($row['description'])."</option>\n";
}
}
@@ -602,7 +629,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo "<table class='list' id='list_".$direction."' ".($direction == 'outbound' ? "style='display: none;'" : null).">\n";
echo "<tr class='list-header'>\n";
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".($result ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all_".$direction."' name='checkbox_all' onclick=\"list_all_toggle('".$direction."');\" ".(empty($result) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
echo "<th style='width: 1%;'>&nbsp;</th>\n";
echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order);
@@ -612,19 +639,19 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "class='right hide-sm-dn'");
echo "</tr>";
if (is_array($result) && @sizeof($result) != 0) {
if (!empty($result)) {
foreach ($result as $x => $row) {
if ($row['direction'] == $direction) {
$list_row_onclick_uncheck = "if (!this.checked) { document.getElementById('checkbox_all_".$direction."').checked = false; }";
$list_row_onclick_toggle = "onclick=\"document.getElementById('checkbox_".$x."').checked = document.getElementById('checkbox_".$x."').checked ? false : true; ".$list_row_onclick_uncheck."\"";
if (strlen($row['caller_id_number']) >= 7) {
if ($_SESSION['domain']['time_format']['text'] == '24h') {
if (!empty($_SESSION['domain']['time_format']['text']) && $_SESSION['domain']['time_format']['text'] == '24h') {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('H:i:s', $row['start_epoch']).'</span>';
}
else {
$tmp_start_epoch = date('j M Y', $row['start_epoch'])." <span class='hide-sm-dn'>".date('h:i:s a', $row['start_epoch']).'</span>';
}
echo "<tr class='list-row row_".$row['direction']."' href='".$list_row_url."'>\n";
echo "<tr class='list-row row_".$row['direction']."' href=''>\n";
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' class='checkbox_".$row['direction']."' name='xml_cdrs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"".$list_row_onclick_uncheck."\">\n";
echo " <input type='hidden' name='xml_cdrs[$x][uuid]' value='".escape($row['xml_cdr_uuid'])."' />\n";
@@ -635,6 +662,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_failed.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_outbound_answered.png")
) {
$title_mod = null;
echo " <td class='center' ".$list_row_onclick_toggle.">";
switch ($row['direction']) {
case "inbound":
@@ -692,7 +720,7 @@ if (permission_exists('call_block_all') || permission_exists('call_block_ring_gr
echo " document.getElementById('list_' + direction_other).style.display='none';\n";
echo " //uncheck all checkboxes\n";
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']\")\n";
echo " var checkboxes = document.querySelectorAll(\"input[type='checkbox']:not(#call_block_enabled)\")\n";
echo " if (checkboxes.length > 0) {\n";
echo " for (var i = 0; i < checkboxes.length; ++i) {\n";
echo " checkboxes[i].checked = false;\n";
+16 -20
View File
@@ -45,16 +45,6 @@ if (!class_exists('call_block')) {
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete records
*/
@@ -78,7 +68,7 @@ if (!class_exists('call_block')) {
//filter out unchecked, build where clause for below
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -154,7 +144,7 @@ if (!class_exists('call_block')) {
//get current toggle state
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -230,7 +220,7 @@ if (!class_exists('call_block')) {
//get checked records
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -301,7 +291,7 @@ if (!class_exists('call_block')) {
//filter checked records
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -311,7 +301,7 @@ if (!class_exists('call_block')) {
$sql = "select caller_id_name, caller_id_number, caller_destination from v_xml_cdr ";
$sql .= "where xml_cdr_uuid in (".implode(', ', $uuids).") ";
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
$rows = $database->select($sql, $parameters ?? null, 'all');
unset($sql);
}
@@ -329,11 +319,17 @@ if (!class_exists('call_block')) {
}
if ($this->call_block_direction == 'inbound') {
//remove e.164 and country code
$call_block_number = str_replace("+".trim($_SESSION['domain']['country_code']['numeric']), "", trim($row["caller_id_number"]));
if (trim($row["caller_id_number"])[0] == "+") {
//format e.164
$call_block_number = str_replace("+".trim($_SESSION['domain']['country_code']['numeric']), "", trim($row["caller_id_number"]));
}
else {
//remove the country code if its the first in the string
$call_block_number = ltrim(trim($row["caller_id_number"]), $_SESSION['domain']['country_code']['numeric'] ?? '');
}
//build the array
$array['call_block'][$x]['call_block_country_code'] = trim($_SESSION['domain']['country_code']['numeric']);
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_country_code'] = trim($_SESSION['domain']['country_code']['numeric'] ?? '');
$array['call_block'][$x]['call_block_name'] = '';
$array['call_block'][$x]['call_block_number'] = $call_block_number;
$array['call_block'][$x]['call_block_description'] = trim($row["caller_id_name"]);
}
@@ -360,7 +356,7 @@ if (!class_exists('call_block')) {
$call_block_number = str_replace("+".trim($_SESSION['domain']['country_code']['numeric']), "", trim($row["caller_id_number"]));
//build the array
$array['call_block'][$x]['call_block_name'] = trim($row["caller_id_name"]);
$array['call_block'][$x]['call_block_name'] = '';
$array['call_block'][$x]['call_block_number'] = $call_block_number;
$array['call_block'][$x]['call_block_description'] = trim($row["caller_id_name"]);
}
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+40 -14
View File
@@ -5,7 +5,7 @@
$apps[$x]['uuid'] = "efc11f6b-ed73-9955-4d4d-3a1bed75a056";
$apps[$x]['category'] = "Switch";;
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['version'] = "1.1";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "Schedule to immediately make multiple calls to the extension, an IVR Menu, Conference Room, or any other number.";
@@ -44,10 +44,24 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_send";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_start_time";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_accountcode";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_timeout";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
@@ -64,7 +78,7 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_phone_number_list";
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_phone_numbers";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
@@ -72,18 +86,7 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "broadcast_toll_allow";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_delete";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_all";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_send";
$apps[$x]['permissions'][$y]['name'] = "call_broadcast_toll_allow";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
@@ -191,4 +194,27 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
File diff suppressed because it is too large Load Diff
+13 -7
View File
@@ -3,29 +3,35 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Broadcast";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Broadcast";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "اتصل بالإذاعة";
$apps[$x]['menu'][$y]['title']['de-at'] = "Rundrufe";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rundrufe";
$apps[$x]['menu'][$y]['title']['de-de'] = "Rundrufe";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Llamada Broadcast";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Broadcast";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Téléphone";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Campagne d'Appels";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "שידור שיחה";
$apps[$x]['menu'][$y]['title']['it-it'] = "Chiamate Multiple";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Omroep";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Rozsyłanie rozmów";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Chamada em broadcast";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Chamada em Broadcast";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Apel Broadcast";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Массовые вызовы";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Samtalsdistribution";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Трансляція дзвінка";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "电话广播";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールブロードキャスト";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 브로드캐스트";
$apps[$x]['menu'][$y]['uuid'] = "50153bbf-78c5-b49e-7bd9-4b3e4b1134e6";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_broadcast/call_broadcast.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['path'] = "/app/call_broadcast/call_broadcast.php";
$y++;
?>
+77 -42
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2020
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,15 +42,22 @@
$language = new text;
$text = $language->get();
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data
if (is_array($_POST['call_broadcasts'])) {
if (!empty($_POST['call_broadcasts'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_broadcasts = $_POST['call_broadcasts'];
}
//process the http post data by action
if ($action != '' && is_array($call_broadcasts) && @sizeof($call_broadcasts) != 0) {
if (!empty($action) && is_array($call_broadcasts)) {
switch ($action) {
case 'copy':
if (permission_exists('call_broadcast_add')) {
@@ -72,53 +78,75 @@
}
//get the http get variables and set them to php variables
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$sql_search = " (";
$sql_search .= " lower(broadcast_name) like :search ";
$sql_search .= " or lower(broadcast_description) like :search ";
$sql_search .= " or lower(broadcast_caller_id_name) like :search ";
$sql_search .= " or lower(broadcast_caller_id_number) like :search ";
$sql_search .= " or lower(broadcast_phone_numbers) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
if (!empty($search)) {
$search = strtolower($_GET["search"]);
}
//get the count
$sql = "select count(*) from v_call_broadcasts ";
$sql .= "where true ";
if ($_GET['show'] != "all" || !permission_exists('call_broadcast_all')) {
if ($show != "all" || !permission_exists('call_broadcast_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(broadcast_name) like :search ";
$sql .= " or lower(broadcast_description) like :search ";
$sql .= " or lower(broadcast_caller_id_name) like :search ";
$sql .= " or lower(broadcast_caller_id_number) like :search ";
$sql .= " or lower(broadcast_phone_numbers) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//prepare the paging
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".urlencode($search);
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
$param = '';
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
if (!empty($search)) {
$param .= "&search=".urlencode($search);
}
if ($show == "all" && permission_exists('call_broadcast_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param ?? null, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param ?? null, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the call broadcasts
$sql = str_replace('count(*)','*', $sql);
$sql .= order_by($order_by, $order);
$sql = "select call_broadcast_uuid, domain_uuid, broadcast_name, ";
$sql .= "broadcast_description, broadcast_start_time, broadcast_timeout, ";
$sql .= "broadcast_concurrent_limit, recording_uuid, broadcast_caller_id_name, ";
$sql .= "broadcast_caller_id_number, broadcast_destination_type, broadcast_phone_numbers, ";
$sql .= "broadcast_avmd, broadcast_destination_data, broadcast_accountcode, broadcast_toll_allow ";
$sql .= "from v_call_broadcasts ";
$sql .= "where true ";
if ($show != "all" || !permission_exists('call_broadcast_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(broadcast_name) like :search ";
$sql .= " or lower(broadcast_description) like :search ";
$sql .= " or lower(broadcast_caller_id_name) like :search ";
$sql .= " or lower(broadcast_caller_id_number) like :search ";
$sql .= " or lower(broadcast_phone_numbers) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, 'broadcast_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -144,11 +172,11 @@
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_broadcast_all')) {
if ($_GET['show'] == 'all') {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type).'&show=all'.($search != '' ? "&search=".urlencode($search) : null)]);
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.(!empty($search) ? "&search=".urlencode($search ?? '') : null)]);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
@@ -180,21 +208,22 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_broadcast_add') || permission_exists('call_broadcast_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
if ($show == "all" && permission_exists('call_broadcast_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
}
echo th_order_by('broadcast_name', $text['label-name'], $order_by, $order);
echo th_order_by('broadcast_concurrent_limit', $text['label-concurrent-limit'], $order_by, $order);
echo th_order_by('broadcast_start_time', $text['label-start_time'], $order_by, $order);
echo th_order_by('broadcast_description', $text['label-description'], $order_by, $order);
if (permission_exists('call_broadcast_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($result) && @sizeof($result) != 0) {
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
if (permission_exists('call_broadcast_edit')) {
@@ -207,8 +236,8 @@
echo " <input type='hidden' name='call_broadcasts[$x][uuid]' value='".escape($row['call_broadcast_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_broadcast_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
if ($show == "all" && permission_exists('call_broadcast_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
@@ -218,15 +247,21 @@
}
echo " <td>";
if (permission_exists('call_broadcast_edit')) {
echo "<a href='".$list_row_url."'>".escape($row['broadcast_name'])."</a>";
echo "<a href='".$list_row_url."'>".escape($row['broadcast_name'] ?? '')."</a>";
}
else {
echo escape($row['broadcast_name']);
}
echo " </td>\n";
echo " <td>".escape($row['broadcast_concurrent_limit'])."</td>\n";
//determine start date and time
$broadcast_start_reference = !empty($row['update_date']) ?: !empty($row['insert_date']);
if ($row['broadcast_start_time'] && $broadcast_start_reference) {
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $row['broadcast_start_time']);
}
echo " <td>".escape($broadcast_start_time ?? '')."</td>\n";
echo " <td class='description overflow hide-xs'>".escape($row['broadcast_description'])."</td>\n";
if (permission_exists('call_broadcast_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_broadcast_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+93 -211
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -44,13 +43,25 @@
$text = $language->get();
//set the action with add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$call_broadcast_uuid = $_REQUEST["id"];
}
else {
$action = "add";
}
//set the defaults
$broadcast_name = '';
$broadcast_start_time = '';
$broadcast_timeout = '';
$broadcast_concurrent_limit = '';
$broadcast_caller_id_name = '';
$broadcast_caller_id_number = '';
$broadcast_accountcode = '';
$broadcast_destination_data = '';
$broadcast_description = '';
$broadcast_toll_allow = '';
//function to Upload CSV/TXT file
function upload_file($sql, $broadcast_phone_numbers) {
@@ -69,7 +80,7 @@
$separator = $getData[0];
$separator .= (isset($getData[1]) && $getData[1] != '')? '|'.$getData[1] : '';
$separator .= (isset($getData[2]) && $getData[2] != '')? ','.$getData[2] : '';
$separator .= '\n';
$separator .= PHP_EOL;
$upload_csv .= $separator;
}
fclose($file);
@@ -91,14 +102,14 @@
}
//get the http post variables and set them to php variables
if (count($_POST)>0) {
if (!empty($_POST)) {
$broadcast_name = $_POST["broadcast_name"];
$broadcast_start_time = $_POST["broadcast_start_time"];
$broadcast_timeout = $_POST["broadcast_timeout"];
$broadcast_concurrent_limit = $_POST["broadcast_concurrent_limit"];
$broadcast_caller_id_name = $_POST["broadcast_caller_id_name"];
$broadcast_caller_id_number = $_POST["broadcast_caller_id_number"];
$broadcast_destination_type = $_POST["broadcast_destination_type"];
//$broadcast_destination_type = $_POST["broadcast_destination_type"];
$broadcast_phone_numbers = $_POST["broadcast_phone_numbers"];
$broadcast_avmd = $_POST["broadcast_avmd"];
$broadcast_destination_data = $_POST["broadcast_destination_data"];
@@ -125,11 +136,11 @@
}
}
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//delete the call broadcast
if (permission_exists('call_broadcast_delete')) {
if ($_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
if (!empty($_POST['action']) && $_POST['action'] == 'delete' && is_uuid($call_broadcast_uuid)) {
//prepare
$call_broadcasts[0]['checked'] = 'true';
$call_broadcasts[0]['uuid'] = $call_broadcast_uuid;
@@ -156,18 +167,18 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
if (strlen($broadcast_name) == 0) { $msg .= "".$text['confirm-name']."<br>\n"; }
//if (strlen($broadcast_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
//if (strlen($broadcast_timeout) == 0) { $msg .= "Please provide: Timeout<br>\n"; }
//if (strlen($broadcast_concurrent_limit) == 0) { $msg .= "Please provide: Concurrent Limit<br>\n"; }
//if (strlen($recording_uuid) == 0) { $msg .= "Please provide: Recording<br>\n"; }
//if (strlen($broadcast_caller_id_name) == 0) { $msg .= "Please provide: Caller ID Name<br>\n"; }
//if (strlen($broadcast_caller_id_number) == 0) { $msg .= "Please provide: Caller ID Number<br>\n"; }
//if (strlen($broadcast_destination_type) == 0) { $msg .= "Please provide: Type<br>\n"; }
//if (strlen($broadcast_phone_numbers) == 0) { $msg .= "Please provide: Phone Number List<br>\n"; }
//if (strlen($broadcast_avmd) == 0) { $msg .= "Please provide: Voicemail Detection<br>\n"; }
//if (strlen($broadcast_destination_data) == 0) { $msg .= "Please provide: Destination<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (empty($broadcast_name)) { $msg .= "".$text['confirm-name']."<br>\n"; }
//if (empty($broadcast_description)) { $msg .= "Please provide: Description<br>\n"; }
//if (empty($broadcast_timeout)) { $msg .= "Please provide: Timeout<br>\n"; }
//if (empty($broadcast_concurrent_limit)) { $msg .= "Please provide: Concurrent Limit<br>\n"; }
//if (empty($recording_uuid)) { $msg .= "Please provide: Recording<br>\n"; }
//if (empty($broadcast_caller_id_name)) { $msg .= "Please provide: Caller ID Name<br>\n"; }
//if (empty($broadcast_caller_id_number)) { $msg .= "Please provide: Caller ID Number<br>\n"; }
//if (empty($broadcast_destination_type)) { $msg .= "Please provide: Type<br>\n"; }
//if (empty($broadcast_phone_numbers)) { $msg .= "Please provide: Phone Number List<br>\n"; }
//if (empty($broadcast_avmd)) { $msg .= "Please provide: Voicemail Detection<br>\n"; }
//if (empty($broadcast_destination_data)) { $msg .= "Please provide: Destination<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -181,7 +192,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
if (empty($_POST["persistformvar"])) {
//prep insert
if ($action == "add" && permission_exists('call_broadcast_add')) {
@@ -209,10 +220,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//execute
if (is_array($array) && @sizeof($array) != 0) {
if (!empty($array)) {
//add file selection and download sample
$file_res = upload_file($sql, $broadcast_phone_numbers);
$file_res = upload_file($sql ?? '', $broadcast_phone_numbers);
if ($file_res['code'] != true) {
$_SESSION["message_mood"] = "negative";
$_SESSION["message"] = $text['file-error'];
@@ -221,21 +232,39 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
$broadcast_phone_numbers = $file_res['sql'];
//common array items
//build the database array
$array['call_broadcasts'][0]['domain_uuid'] = $domain_uuid;
$array['call_broadcasts'][0]['broadcast_name'] = $broadcast_name;
$array['call_broadcasts'][0]['broadcast_start_time'] = $broadcast_start_time;
$array['call_broadcasts'][0]['broadcast_timeout'] = strlen($broadcast_timeout) != 0 ? $broadcast_timeout : null;
$array['call_broadcasts'][0]['broadcast_concurrent_limit'] = strlen($broadcast_concurrent_limit) != 0 ? $broadcast_concurrent_limit : null;
$array['call_broadcasts'][0]['broadcast_caller_id_name'] = $broadcast_caller_id_name;
$array['call_broadcasts'][0]['broadcast_caller_id_number'] = $broadcast_caller_id_number;
$array['call_broadcasts'][0]['broadcast_destination_type'] = $broadcast_destination_type;
$array['call_broadcasts'][0]['broadcast_phone_numbers'] = $broadcast_phone_numbers;
$array['call_broadcasts'][0]['broadcast_avmd'] = $broadcast_avmd;
$array['call_broadcasts'][0]['broadcast_destination_data'] = $broadcast_destination_data;
$array['call_broadcasts'][0]['broadcast_accountcode'] = $broadcast_accountcode;
if (permission_exists('call_broadcast_start_time')) {
$array['call_broadcasts'][0]['broadcast_start_time'] = strtotime($broadcast_start_time) - strtotime('now') >= 0 ? strtotime($broadcast_start_time) - strtotime('now') : null;
}
if (permission_exists('call_broadcast_accountcode')) {
$array['call_broadcasts'][0]['broadcast_accountcode'] = $broadcast_accountcode;
}
if (permission_exists('call_broadcast_timeout')) {
$array['call_broadcasts'][0]['broadcast_timeout'] = strlen($broadcast_timeout) != 0 ? $broadcast_timeout : null;
}
if (permission_exists('call_broadcast_concurrent_limit')) {
$array['call_broadcasts'][0]['broadcast_concurrent_limit'] = strlen($broadcast_concurrent_limit) != 0 ? $broadcast_concurrent_limit : null;
}
if (permission_exists("call_broadcast_caller_id")) {
$array['call_broadcasts'][0]['broadcast_caller_id_name'] = $broadcast_caller_id_name;
$array['call_broadcasts'][0]['broadcast_caller_id_number'] = $broadcast_caller_id_number;
}
if (permission_exists('call_broadcast_destination_number')) {
$array['call_broadcasts'][0]['broadcast_destination_data'] = $broadcast_destination_data;
}
//$array['call_broadcasts'][0]['broadcast_destination_type'] = $broadcast_destination_type;
if (permission_exists('call_broadcast_phone_numbers')) {
$array['call_broadcasts'][0]['broadcast_phone_numbers'] = $broadcast_phone_numbers;
}
if (permission_exists('call_broadcast_voicemail_detection')) { //broadcast_avmd
$array['call_broadcasts'][0]['broadcast_avmd'] = $broadcast_avmd;
}
if (permission_exists('call_broadcast_toll_allow')) {
$array['call_broadcasts'][0]['broadcast_toll_allow'] = $broadcast_toll_allow;
}
$array['call_broadcasts'][0]['broadcast_description'] = $broadcast_description;
$array['call_broadcasts'][0]['broadcast_toll_allow'] = $broadcast_toll_allow;
//execute
$database = new database;
@@ -254,7 +283,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
}
//pre-populate the form
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && empty($_POST["persistformvar"])) {
$call_broadcast_uuid = $_GET["id"];
$sql = "select * from v_call_broadcasts ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -263,20 +292,29 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (!empty($row)) {
$broadcast_name = $row["broadcast_name"];
$broadcast_start_time = $row["broadcast_start_time"];
$broadcast_timeout = $row["broadcast_timeout"];
$broadcast_concurrent_limit = $row["broadcast_concurrent_limit"];
$broadcast_caller_id_name = $row["broadcast_caller_id_name"];
$broadcast_caller_id_number = $row["broadcast_caller_id_number"];
$broadcast_destination_type = $row["broadcast_destination_type"];
//$broadcast_destination_type = $row["broadcast_destination_type"];
$broadcast_phone_numbers = $row["broadcast_phone_numbers"];
$broadcast_avmd = $row["broadcast_avmd"];
$broadcast_destination_data = $row["broadcast_destination_data"];
$broadcast_accountcode = $row["broadcast_accountcode"];
$broadcast_description = $row["broadcast_description"];
$broadcast_toll_allow = $row["broadcast_toll_allow"];
$insert_date = $row["insert_date"];
$update_date = $row["update_date"];
//determine start date and time based on insert or update date and 'start time' delay (in seconds)
$broadcast_start_reference = $update_date ?: $insert_date;
if ($broadcast_start_time && $broadcast_start_reference) {
$broadcast_start_time = date('Y-m-d H:i', strtotime($broadcast_start_reference) + $broadcast_start_time);
}
}
unset($sql, $parameters, $row);
}
@@ -330,15 +368,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-start_time']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='broadcast_start_time' value=\"".escape($broadcast_start_time)."\">\n";
echo "<td class='vtable' align='left' style='position: relative;'>\n";
echo " <input class='formfld datetimepicker-future' type='text' id='broadcast_start_time' name='broadcast_start_time' value=\"".escape($broadcast_start_time)."\" data-toggle='datetimepicker' data-target='#broadcast_start_time' onblur=\"$(this).datetimepicker('hide');\">\n";
echo "<br />\n";
echo "".$text['description-start_time']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (if_group("superadmin")){
if (permission_exists('call_broadcast_accountcode')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-accountcode']."\n";
@@ -364,6 +402,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('call_broadcast_concurrent_limit')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
@@ -390,7 +429,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//$parameters['domain_uuid'] = $domain_uuid;
//$database = new database;
//$rows = $database->select($sql, $parameters, 'all');
//if (is_array($rows) && @sizeof($rows) != 0) {
//if (!empty($rows)) {
// foreach ($rows as $row) {
// if ($recording_uuid == $row['recording_uuid']) {
// echo " <option value='".$row['recording_uuid']."' selected='yes'>".escape($row['recordingname'])."</option>\n";
@@ -431,7 +470,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
}
/*
/*
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Type\n";
@@ -457,7 +497,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "transfer (external number): 12081231234 XML default <br />\n";
echo "</td>\n";
echo "</tr>\n";
*/
*/
if (permission_exists('call_broadcast_destination_number')) {
echo "<tr>\n";
@@ -471,14 +511,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('call_broadcast_phone_number_list')) {
if (permission_exists('call_broadcast_phone_numbers')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-phone']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea class='formfld' style='width: 300px; height: 200px;' type='text' name='broadcast_phone_numbers' placeholder=\"".$text['label-list_example']."\">".str_replace('\n', "\n", $broadcast_phone_numbers)."</textarea>";
echo " <textarea class='formfld' style='width: 300px; height: 200px;' type='text' name='broadcast_phone_numbers' placeholder=\"".$text['label-list_example']."\">".str_replace('\n', "\n", $broadcast_phone_numbers ?? '')."</textarea>";
echo "<br><br>";
echo " <input type='file' name='broadcast_phone_numbers_file' accept='.csv,.txt' style=\"display:inline-block;\"><a href='sample.csv' download><i class='fas fa-cloud-download-alt' style='margin-right: 5px;'></i>".$text['label-sample_file']."</a>";
echo "<br /><br />";
@@ -494,16 +534,15 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='broadcast_avmd'>\n";
echo " <option value='false' ".(($broadcast_avmd == "false") ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " <option value='true' ".(($broadcast_avmd == "true") ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false'>".$text['option-false']."</option>\n";
echo " <option value='true' ".(!empty($broadcast_avmd) && $broadcast_avmd == "true" ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo "<br />\n";
echo $text['description-avmd']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('broadcast_toll_allow')) {
if (permission_exists('call_broadcast_toll_allow')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-broadcast_toll_allow']."\n";
@@ -515,7 +554,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-description']."\n";
@@ -537,164 +576,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</form>";
/*
if ($action == "update") {
echo "<table width='100%' border='0'>\n";
echo "<tr>\n";
echo "<td width='50%' nowrap><b>Call Broadcast</b></td>\n";
echo "<td width='50%' align='right'>&nbsp;</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<form method='get' name='frm' action='call_broadcast_send.php'>\n";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
echo " Category\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <select name='user_category' class='formfld'>\n";
echo " <option></option>\n";
$sql = "";
$sql .= "select distinct user_category as user_category from v_users ";
//$sql .= "where domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$rows = $database->select($sql, null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
if ($user_category == $row['user_category']) {
echo " <option value='".escape($row['user_category'])."' selected='yes'>".escape($row['user_category'])."</option>\n";
}
else {
echo " <option value='".escape($row['user_category'])."'>".escape($row['user_category'])."</option>\n";
}
}
}
unset($sql, $parameters, $rows, $row);
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
echo " Group\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <select name='group_name' class='formfld'>\n";
echo " <option></option>\n";
$sql = "";
$sql .= "select * from v_groups ";
//$sql .= "where domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$rows = $database->select($sql, null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
if ($recording_uuid == $row['group_name']) {
echo " <option value='".escape($row['group_name'])."' selected='yes'>".escape($row['group_name'])."</option>\n";
}
else {
echo " <option value='".escape($row['group_name'])."'>".escape($row['group_name'])."</option>\n";
}
}
}
unset($sql, $parameters, $rows, $row);
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
echo " Gateway\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <select name='gateway' class='formfld'>\n";
echo " <option></option>\n";
$sql = "";
$sql .= "select * from v_gateways ";
//$sql .= "where domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$rows = $database->select($sql, null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
if ($gateway == $row['gateway']) {
echo " <option value='".escape($row['gateway'])."' selected='yes'>".escape($row['gateway'])."</option>\n";
}
else {
echo " <option value='".escape($row['gateway'])."'>".escape($row['gateway'])."</option>\n";
}
}
}
unset($sql, $parameters, $rows, $row);
echo " <option value='loopback'>loopback</option>\n";
echo " </select>\n";
echo "<br />\n";
//echo "zzz.<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Phone Type\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='phonetype1' class='formfld'>\n";
echo " <option></option>\n";
echo " <option value='phone1'>phone1</option>\n";
echo " <option value='phone2'>phone2</option>\n";
echo " <option value='cell'>cell</option>\n";
//echo " <option value='zzz'>cell</option>\n";
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " Phone Type\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='phonetype2' class='formfld'>\n";
echo " <option></option>\n";
echo " <option value='phone1'>phone1</option>\n";
echo " <option value='phone2'>phone2</option>\n";
echo " <option value='cell'>cell</option>\n";
//echo " <option value='zzz'>cell</option>\n";
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo " <tr>\n";
echo " <td colspan='2' align='right'>\n";
echo " <input type='hidden' name='call_broadcast_uuid' value='".escape($call_broadcast_uuid)."'>\n";
echo " <input type='submit' name='submit' class='btn' value='Send Broadcast'>\n";
echo " </td>\n";
echo " </tr>";
echo "</table>";
echo "</form>";
}
*/
//include the footer
require_once "resources/footer.php";
?>
?>
+17 -18
View File
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//chec permissions
@@ -44,7 +43,7 @@
$text = $language->get();
//set the max execution time to 1 hour
ini_set(max_execution_time,3600);
ini_set('max_execution_time',3600);
//define the asynchronous command function
function cmd_async($cmd) {
@@ -65,12 +64,12 @@
}
//get the http get values and set as php variables
$group_name = $_GET["group_name"];
$call_broadcast_uuid = $_GET["id"];
$user_category = $_GET["user_category"];
$gateway = $_GET["gateway"];
$phonetype1 = $_GET["phonetype1"];
$phonetype2 = $_GET["phonetype2"];
$group_name = $_GET["group_name"] ?? '';
$call_broadcast_uuid = $_GET["id"] ?? '';
$user_category = $_GET["user_category"] ?? '';
$gateway = $_GET["gateway"] ?? '';
$phonetype1 = $_GET["phonetype1"] ?? '';
$phonetype2 = $_GET["phonetype2"] ?? '';
//get the call broadcast details from the database
$sql = "select * from v_call_broadcasts ";
@@ -80,12 +79,12 @@
$parameters['call_broadcast_uuid'] = $call_broadcast_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
if (!empty($row)) {
$broadcast_name = $row["broadcast_name"];
$broadcast_start_time = $row["broadcast_start_time"];
$broadcast_timeout = $row["broadcast_timeout"];
$broadcast_concurrent_limit = $row["broadcast_concurrent_limit"];
$recordingid = $row["recordingid"];
$recordingid = $row["recordingid"] ?? '';
$broadcast_caller_id_name = $row["broadcast_caller_id_name"];
$broadcast_caller_id_number = $row["broadcast_caller_id_number"];
$broadcast_destination_type = $row["broadcast_destination_type"];
@@ -94,7 +93,7 @@
$broadcast_avmd = $row["broadcast_avmd"];
$broadcast_accountcode = $row["broadcast_accountcode"];
$broadcast_description = $row["broadcast_description"];
//if (strlen($row["broadcast_destination_data"]) == 0) {
//if (empty($row["broadcast_destination_data"])) {
// $broadcast_destination_application = '';
// $broadcast_destination_data = '';
//}
@@ -107,13 +106,13 @@
unset($sql, $parameters, $row);
//set the defaults
if (strlen($broadcast_caller_id_name) == 0) {
if (empty($broadcast_caller_id_name)) {
$broadcast_caller_id_name = "anonymous";
}
if (strlen($broadcast_caller_id_number) == 0) {
if (empty($broadcast_caller_id_number)) {
$broadcast_caller_id_number = "0000000000";
}
if (strlen($broadcast_accountcode) == 0) {
if (empty($broadcast_accountcode)) {
$broadcast_accountcode = $_SESSION['domain_name'];;
}
if (isset($broadcast_start_time) && is_numeric($broadcast_start_time)) {
@@ -154,7 +153,7 @@
require_once "resources/header.php";
//send the call broadcast
if (strlen($broadcast_phone_numbers) > 0) {
if (!empty($broadcast_phone_numbers)) {
$broadcast_phone_number_array = explode ("\n", $broadcast_phone_numbers);
$count = 1;
foreach ($broadcast_phone_number_array as $tmp_value) {
@@ -207,7 +206,7 @@
//cmd_async($_SESSION['switch']['bin']['dir']."/fs_cli -x \"".$cmd."\";");
//spread the calls out so that they are scheduled with different times
if (strlen($broadcast_concurrent_limit) > 0 && strlen($broadcast_timeout) > 0) {
if (strlen($broadcast_concurrent_limit) > 0 && !empty($broadcast_timeout)) {
if ($broadcast_concurrent_limit == $count) {
$sched_seconds = $sched_seconds + $broadcast_timeout;
$count=0;
+3 -2
View File
@@ -23,8 +23,9 @@
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('call_broadcast_send')) {
//access granted
@@ -1,5 +1,30 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
/**
* call broadcast class
*
@@ -33,16 +58,6 @@ if (!class_exists('call_broadcast')) {
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete records
*/
@@ -66,7 +81,7 @@ if (!class_exists('call_broadcast')) {
//build the delete array
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
}
@@ -113,7 +128,7 @@ if (!class_exists('call_broadcast')) {
//get checked records
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
File diff suppressed because it is too large Load Diff
+13 -7
View File
@@ -3,29 +3,35 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Active Call Center";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Active Call Center";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "مركز الاتصال النشط";
$apps[$x]['menu'][$y]['title']['de-at'] = "Aktive Callcenter";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Active Call Center";
$apps[$x]['menu'][$y]['title']['de-de'] = "Aktive Callcenter";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Centro de Llamada Activo";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Active Call Center";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Centre d'Appels Active";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Centre d'Appel Actif";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "מרכז קריאה פעיל";
$apps[$x]['menu'][$y]['title']['it-it'] = "Call Center Attivi";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Actieve Call-Center";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Aktieve Callcenter";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Aktywność w Call Center ";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Call Center ativos";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Centro de Chamadas Activo";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Centru de apeluri activ";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Активные Колл-центры";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Aktivt Call Center";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Центр активного виклику";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "主动呼叫中心";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "アクティブコールセンター";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "활성 콜 센터";
$apps[$x]['menu'][$y]['uuid'] = "7fb0dd87-e984-9980-c512-2c76b887aeb2";
$apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_center_active/call_center_queue.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -44,7 +43,7 @@
//get the queue_name and set it as a variable
$queue_name = $_GET['queue_name'];
$name = $_GET['name'];
$name = $_GET['name'] ?? null;
//get a new session array
unset($_SESSION['queues']);
@@ -114,7 +113,7 @@
var url = 'call_center_active_inc.php?queue_name=<?php echo escape($queue_name); ?>&name=<?php echo urlencode(escape($name)); ?>';
new loadXmlHttp(url, 'ajax_response');
<?php
if (strlen($_SESSION["ajax_refresh_rate"]) == 0) { $_SESSION["ajax_refresh_rate"] = "1777"; }
if (empty($_SESSION["ajax_refresh_rate"])) { $_SESSION["ajax_refresh_rate"] = "1777"; }
echo "setInterval(function(){new loadXmlHttp(url, 'ajax_reponse');}, ".$_SESSION["ajax_refresh_rate"].");";
?>
}
@@ -25,9 +25,8 @@
James Rose <james.o.rose@gmail.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -47,7 +46,7 @@
$queue_uuid = $_GET['queue_name'];
//get the queues from the database
if (!is_array($_SESSION['queues'])) {
if (empty($_SESSION['queues']) || !is_array($_SESSION['queues'])) {
$sql = "select * from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by queue_name asc ";
@@ -144,7 +143,7 @@
$agent_result = str_to_named_array($event_socket_str, '|');
//get the agents from the database
if (!is_array($_SESSION['agents'])) {
if (empty($_SESSION['agents']) || !is_array($_SESSION['agents'])) {
$sql = "select * from v_call_center_agents ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by agent_name asc ";
@@ -158,8 +157,8 @@
echo "<tr class='list-header'>\n";
echo "<th>".$text['label-name']."</th>\n";
echo "<th>".$text['label-extension']."</th>\n";
echo "<th>".$text['label-status']."</th>\n";
echo "<th>".$text['label-state']."</th>\n";
echo "<th title=\"".$text['description-status']."\">".$text['label-status']."</th>\n";
echo "<th title=\"".$text['description-state']."\">".$text['label-state']."</th>\n";
echo "<th>".$text['label-status_change']."</th>\n";
echo "<th class='center'>".$text['label-missed']."</th>\n";
echo "<th class='center'>".$text['label-answered']."</th>\n";
@@ -261,7 +260,7 @@
}
else {
//$orig_call="{origination_caller_id_name=c2c-".urlencode(escape($name)).",origination_caller_id_number=".escape($agent_extension)."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." %26bridge(user/".escape($agent_extension)."@".$_SESSION['domain_name'].")";
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-call'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=bridge&extension=".urlencode($agent_extension)."&caller_id_name=".urlencode($name)."'); } else { this.blur(); return false; }"]);
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-call'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=bridge&extension=".urlencode($agent_extension)."&caller_id_name=".urlencode($name ?? '')."'); } else { this.blur(); return false; }"]);
}
echo "</td>";
}
@@ -319,7 +318,7 @@
echo "<th>".$text['label-name']."</th>\n";
echo "<th>".$text['label-number']."</th>\n";
echo "<th>".$text['label-status']."</th>\n";
if ((if_group("admin") || if_group("superadmin"))) {
if (permission_exists('call_center_active_options')) {
echo "<th>".$text['label-options']."</th>\n";
}
echo "<th>".$text['label-agent']."</th>\n";
@@ -328,7 +327,7 @@
if (is_array($result)) {
foreach ($result as $row) {
$queue = $row['queue'];
$system = $row['system'];
$system = $row['system'] ?? null;
$uuid = $row['uuid'];
$session_uuid = $row['session_uuid'];
$caller_number = $row['cid_number'];
@@ -367,11 +366,12 @@
echo "<td>".escape($caller_name)."&nbsp;</td>\n";
echo "<td>".escape($caller_number)."&nbsp;</td>\n";
echo "<td>".escape($state)."</td>\n";
if (if_group("admin") || if_group("superadmin")) {
if (permission_exists('call_center_active_options')) {
echo "<td>";
if ($state != "Abandoned") {
$orig_command="{origination_caller_id_name=eavesdrop,origination_caller_id_number=".escape($q_caller_number)."}user/".escape($_SESSION['user']['extension'][0]['user'])."@".escape($_SESSION['domain_name'])." %26eavesdrop(".escape($session_uuid).")";
$orig_command = "{origination_caller_id_name=eavesdrop,origination_caller_id_number=".escape($q_caller_number ?? '')."}user/".escape($_SESSION['user']['extension'][0]['user'] ?? '')."@".escape($_SESSION['domain_name'])." %26eavesdrop(".escape($session_uuid).")";
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-eavesdrop'],'onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=eavesdrop&caller_id_number=".urlencode($caller_number)."&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
echo button::create(['type'=>'button','class'=>'link','label'=>$text['label-transfer'],'style'=>'margin-left: 15px;','onclick'=>"if (confirm('".$text['message-confirm']."')) { send_command('call_center_exec.php?command=uuid_pickup&uuid=".urlencode($session_uuid)."'); } else { this.blur(); return false; }"]);
}
else {
echo "&nbsp;";
+7 -5
View File
@@ -27,13 +27,12 @@
POSSIBILITY OF SUCH DAMAGE.
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('call_center_active_view')) {
if (permission_exists('call_center_active_options')) {
//access granted
}
else {
@@ -78,6 +77,9 @@
case "uuid_transfer":
$switch_command = "uuid_transfer ".$uuid." -bleg ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
break;
case "uuid_pickup":
$switch_command = "uuid_transfer ".$uuid." ".$_SESSION['user']['extension'][0]['user']." XML ".$_SESSION['domain_name'];
break;
case "bridge":
$switch_command = "originate {origination_caller_id_name=".$caller_id_name.",origination_caller_id_number=".$caller_id_number."}user/".$_SESSION['user']['extension'][0]['user']."@".$_SESSION['domain_name']." bridge(user/".$extension."@".$_SESSION['domain_name'].")";
break;
@@ -130,7 +132,7 @@
}
//fs cmd
if (strlen($switch_cmd) > 0) {
if (!empty($switch_cmd)) {
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//ensure the connection exists
+8 -9
View File
@@ -17,15 +17,14 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,12 +42,12 @@
$text = $language->get();
//get the variables
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? null;
$order = $_GET["order"] ?? null;
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$search = strtolower($_GET["search"] ?? '');
if (!empty($search)) {
$sql_search = " (";
$sql_search .= "lower(queue_name) like :search ";
$sql_search .= "or lower(queue_description) like :search ";
@@ -69,7 +68,7 @@
//paging the records
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".$search;
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
$page = !empty($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+80
View File
@@ -144,6 +144,9 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "call_center_email_address";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
//default settings
$y = 0;
@@ -280,6 +283,30 @@
$apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_record";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_call_center_queues";
@@ -424,10 +451,39 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_email_address";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "queue_description";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_call_center_tiers";
@@ -496,5 +552,29 @@
$apps[$x]['db'][$y]['fields'][$z]['name'] = "tier_position";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
+46 -41
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2021
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -35,7 +35,7 @@ if ($domains_processed == 1) {
$sql .= "and (t.call_center_queue_uuid is null or t.call_center_agent_uuid is null) ";
$database = new database;
$tiers = $database->select($sql, null, 'all');
if (is_array($tiers) && @sizeof($tiers) != 0) {
if (!empty($tiers)) {
foreach ($tiers as $index => &$row) {
if ($row['call_center_queue_uuid'] == null && $row['queue_uuid'] != null) {
$array['call_center_tiers'][$index]['call_center_queue_uuid'] = $row['queue_uuid'];
@@ -43,12 +43,12 @@ if ($domains_processed == 1) {
if ($row['call_center_agent_uuid'] == null && $row['agent_uuid'] != null) {
$array['call_center_tiers'][$index]['call_center_agent_uuid'] = $row['agent_uuid'];
}
if (is_array($array['call_center_tiers'][$index]) && @sizeof($array['call_center_tiers'][$index]) != 0) {
if (!empty($array['call_center_tiers'][$index])) {
$array['call_center_tiers'][$index]['call_center_tier_uuid'] = $row['call_center_tier_uuid'];
}
}
if (is_array($array) && @sizeof($array) != 0) {
if (!empty($array)) {
$p = new permissions;
$p->add('call_center_tier_edit', 'temp');
@@ -65,19 +65,21 @@ if ($domains_processed == 1) {
unset($sql);
//update all callcenter dialplans to have the @domain in the queue name
$sql = "select q.domain_uuid, d.domain_name, q.call_center_queue_uuid, q.dialplan_uuid, ";
/*
$sql = "select q.domain_uuid, d.domain_name, q.call_center_queue_uuid, q.dialplan_uuid, dp.dialplan_xml, ";
$sql .= "q.queue_name, q.queue_extension, q.queue_timeout_action, q.queue_cid_prefix, q.queue_cc_exit_keys, ";
$sql .= "q.queue_description, q.queue_time_base_score_sec, q.queue_greeting ";
$sql .= "from v_call_center_queues as q, v_domains as d ";
$sql .= "from v_call_center_queues as q, v_dialplans as dp, v_domains as d ";
$sql .= "where q.domain_uuid = d.domain_uuid ";
$sql .= "and (q.dialplan_uuid = dp.dialplan_uuid or q.dialplan_uuid is null) ";
$database = new database;
$call_center_queues = $database->select($sql, null, 'all');
$id = 0;
if (is_array($call_center_queues)) {
if (!empty($call_center_queues)) {
foreach ($call_center_queues as $row) {
//get the application and data
$action_array = explode(":",$row['queue_timeout_action']);
$action_array = explode(":",$row['queue_timeout_action'] ?? '');
$queue_timeout_app = $action_array[0];
unset($action_array[0]);
$queue_timeout_data = implode($action_array);
@@ -85,7 +87,7 @@ if ($domains_processed == 1) {
//add the recording path if needed
if ($row['queue_greeting'] != '') {
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$row['domain_name'].'/'.$row['queue_greeting'])) {
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['queue_greeting'];
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$row['domain_name'].'/'.$row['queue_greeting'];
}
else {
$queue_greeting_path = trim($row['queue_greeting']);
@@ -93,59 +95,61 @@ if ($domains_processed == 1) {
}
//build the xml dialplan
$dialplan_xml = "<extension name=\"".$row["queue_name"]."\" continue=\"\" uuid=\"".$row["dialplan_uuid"]."\">\n";
$dialplan_xml = "<extension name=\"".xml::sanitize($row["queue_name"])."\" continue=\"\" uuid=\"".xml::sanitize($row["dialplan_uuid"])."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^([^#]+#)(.*)\$\" break=\"never\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"caller_id_name=\$2\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$row["queue_extension"]."$\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^(callcenter\+)?".xml::sanitize($row["queue_extension"])."$\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
if (is_uuid($row['call_center_queue_uuid'])) {
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$row['call_center_queue_uuid']."\"/>\n";
if (!empty($row['call_center_queue_uuid']) && is_uuid($row['call_center_queue_uuid'])) {
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".xml::sanitize($row['call_center_queue_uuid'])."\"/>\n";
}
if (is_numeric($queue_extension)) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$row['queue_extension']."\"/>\n";
if (is_numeric($row['queue_extension'])) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".xml::sanitize($row['queue_extension'])."\"/>\n";
}
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=call_center_queue_uuid\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=\${cc_export_vars},call_center_queue_uuid,sip_h_Alert-Info\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
if ($row['queue_time_base_score_sec'] != '') {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$row['queue_time_base_score_sec']."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".xml::sanitize($row['queue_time_base_score_sec'])."\"/>\n";
}
if ($row['queue_greeting_path'] != '') {
$greeting_array = explode(':', $row['queue_greeting_path']);
if (!empty($row['queue_greeting'])) {
$greeting_array = explode(':', $row['queue_greeting']);
if (count($greeting_array) == 1) {
$dialplan_xml .= " <action application=\"playback\" data=\"".$row['queue_greeting_path']."\"/>\n";
$dialplan_xml .= " <action application=\"playback\" data=\"".xml::sanitize($queue_greeting_path)."\"/>\n";
}
else {
if ($greeting_array[0] == 'say' || $greeting_array[0] == 'tone_stream' || $greeting_array[0] == 'phrase') {
$dialplan_xml .= " <action application=\"".$greeting_array[0]."\" data=\"".$greeting_array[1]."\"/>\n";
$dialplan_xml .= " <action application=\"".xml::sanitize($greeting_array[0])."\" data=\"".xml::sanitize($greeting_array[1])."\"/>\n";
}
}
}
if (strlen($row['queue_cid_prefix']) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".$row['queue_cid_prefix']."#\${caller_id_name}\"/>\n";
if (!empty($row['queue_cid_prefix'])) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".xml::sanitize($row['queue_cid_prefix'])."#\${caller_id_name}\"/>\n";
}
if (strlen($row['queue_cc_exit_keys']) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".$row['queue_cc_exit_keys']."\"/>\n";
if (!empty($row['queue_cc_exit_keys'])) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($row['queue_cc_exit_keys'])."\"/>\n";
}
$dialplan_xml .= " <action application=\"callcenter\" data=\"".$row['queue_extension']."@".$row['domain_name']."\"/>\n";
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($row['queue_extension'])."@".xml::sanitize($row['domain_name'])."\"/>\n";
//if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) {
$dialplan_xml .= " <action application=\"".$queue_timeout_app."\" data=\"".$queue_timeout_data."\"/>\n";
$dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n";
//}
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
$dialplan_xml .= "</extension>";
//build the dialplan array
$array['dialplans'][$id]["domain_uuid"] = $row["domain_uuid"];
$array['dialplans'][$id]["dialplan_uuid"] = $row["dialplan_uuid"];
$array['dialplans'][$id]["dialplan_name"] = $row["queue_name"];
$array['dialplans'][$id]["dialplan_number"] = $row["queue_extension"];
$array['dialplans'][$id]["dialplan_context"] = $row['domain_name'];
$array['dialplans'][$id]["dialplan_continue"] = "false";
$array['dialplans'][$id]["dialplan_xml"] = $dialplan_xml;
$array['dialplans'][$id]["dialplan_order"] = "230";
$array['dialplans'][$id]["dialplan_enabled"] = "true";
$array['dialplans'][$id]["dialplan_description"] = $row["queue_description"];
$array['dialplans'][$id]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
if (md5($row["dialplan_xml"]) != md5($dialplan_xml)) {
$array['dialplans'][$id]["domain_uuid"] = $row["domain_uuid"];
$array['dialplans'][$id]["dialplan_uuid"] = $row["dialplan_uuid"];
$array['dialplans'][$id]["dialplan_name"] = $row["queue_name"];
$array['dialplans'][$id]["dialplan_number"] = $row["queue_extension"];
$array['dialplans'][$id]["dialplan_context"] = $row['domain_name'];
$array['dialplans'][$id]["dialplan_continue"] = "false";
$array['dialplans'][$id]["dialplan_xml"] = $dialplan_xml;
$array['dialplans'][$id]["dialplan_order"] = "230";
$array['dialplans'][$id]["dialplan_enabled"] = "true";
$array['dialplans'][$id]["dialplan_description"] = $row["queue_description"];
$array['dialplans'][$id]["app_uuid"] = "95788e50-9500-079e-2807-fd530b0ea370";
}
//increment the array id
$id++;
@@ -154,8 +158,8 @@ if ($domains_processed == 1) {
}
unset ($prep_statement);
//save the array to the database
if (is_array($array)) {
//save the array to the database
if (!empty($array)) {
//add the dialplan permission
$p = new permissions;
$p->add("dialplan_add", "temp");
@@ -172,6 +176,7 @@ if ($domains_processed == 1) {
$p->delete("dialplan_add", "temp");
$p->delete("dialplan_edit", "temp");
}
*/
}
File diff suppressed because it is too large Load Diff
+23 -12
View File
@@ -3,56 +3,67 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Centers";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Centers";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "مراكز الاتصال";
$apps[$x]['menu'][$y]['title']['de-at'] = "Callcenter";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Call Centers";
$apps[$x]['menu'][$y]['title']['de-de'] = "Callcenter";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Centro de Llamadas";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Centers";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Centre d' appels";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Centre d'appel";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "Call Centers";
$apps[$x]['menu'][$y]['title']['it-it'] = "Stato Agenti";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Call-Centers";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Call Center ";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Call Center";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Centro de Chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Centre de apeluri";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Колл-центр";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Call Center";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Кол-центр";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫中心";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールセンター";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "콜센터";
$apps[$x]['menu'][$y]['uuid'] = "6c072b29-5b6c-49fc-008e-95e24c77de99";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_centers/call_center_queues.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['menu'][$y]['title']['en-us'] = "Agent Status";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Agent Status";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الوكيل";
$apps[$x]['menu'][$y]['title']['de-at'] = "Agenten Status";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Status";
$apps[$x]['menu'][$y]['title']['de-de'] = "Agenten Status";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Estado de Agente";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Agente Status";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Agent Status";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "État de l'agent";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['it-it'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "מצב הסוכן";
$apps[$x]['menu'][$y]['title']['it-it'] = "Stato dell'agente";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Agent status";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Status agenta";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Estado do agente";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Estado do Agente";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Statutul agentului";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Статус агента";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Agent Status";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Статус оператора";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "代理状态";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "エージェントステータス";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "에이전트 상태";
$apps[$x]['menu'][$y]['uuid'] = "597c483a-51a9-f95a-8d54-ea7d87ada2b8";
$apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_centers/call_center_agent_status.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
+62 -77
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2020
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -43,15 +42,20 @@
$language = new text;
$text = $language->get();
//set the defaults
$agent_id = '';
$agent_name = '';
$agent_password = '';
//check for duplicates
if ($_GET["check"] == 'duplicate') {
if (!empty($_GET["check"]) && $_GET["check"] == 'duplicate') {
//agent id
if ($_GET["agent_id"] != '') {
if (!empty($_GET["agent_id"])) {
$sql = "select agent_name ";
$sql .= "from v_call_center_agents ";
$sql .= "where agent_id = :agent_id ";
$sql .= "and domain_uuid = :domain_uuid ";
if (is_uuid($_GET["agent_uuid"])) {
if (!empty($_GET["agent_uuid"]) && is_uuid($_GET["agent_uuid"])) {
$sql .= " and call_center_agent_uuid <> :call_center_agent_uuid ";
$parameters['call_center_agent_uuid'] = $_GET["agent_uuid"];
}
@@ -59,7 +63,7 @@
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0 && $row['agent_name'] != '') {
if (!empty($row) && !empty($row['agent_name'])) {
echo $text['message-duplicate_agent_id'].(if_group("superadmin") ? ": ".$row["agent_name"] : null);
}
unset($sql, $parameters);
@@ -69,7 +73,7 @@
}
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$call_center_agent_uuid = $_REQUEST["id"];
}
@@ -78,8 +82,8 @@
}
//get http post variables and set them to php variables
if (is_array($_POST)) {
$call_center_agent_uuid = $_POST["call_center_agent_uuid"];
if (!empty($_POST)) {
$call_center_agent_uuid = $_POST["call_center_agent_uuid"] ?? null;
$user_uuid = $_POST["user_uuid"];
$agent_name = $_POST["agent_name"];
$agent_type = $_POST["agent_type"];
@@ -98,7 +102,7 @@
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//validate the token
$token = new token;
@@ -110,23 +114,18 @@
//check for all required data
$msg = '';
//if (strlen($call_center_agent_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
//if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
if (strlen($agent_name) == 0) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
if (strlen($agent_type) == 0) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
if (strlen($agent_call_timeout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
//if (strlen($agent_id) == 0) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
//if (strlen($agent_password) == 0) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
//if (strlen($agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
if (strlen($agent_contact) == 0) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
if (strlen($agent_no_answer_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_no_answer_delay_time']."<br>\n"; }
if (strlen($agent_max_no_answer) == 0) { $msg .= $text['message-required']." ".$text['label-agent_max_no_answer']."<br>\n"; }
if (strlen($agent_wrap_up_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_wrap_up_time']."<br>\n"; }
if (strlen($agent_reject_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_reject_delay_time']."<br>\n"; }
if (strlen($agent_busy_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_busy_delay_time']."<br>\n"; }
//if (strlen($agent_logout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
//if (empty($call_center_agent_uuid)) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
//if (empty($user_uuid)) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
if (empty($agent_name)) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
if (empty($agent_type)) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
if (empty($agent_call_timeout)) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
//if (empty($agent_id)) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
//if (empty($agent_password)) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
//if (empty($agent_status)) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
if (empty($agent_contact)) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
//if (empty($agent_logout)) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -139,8 +138,16 @@
return;
}
//set default values
if (empty($agent_call_timeout)) { $agent_call_timeout = "20"; }
if (empty($agent_max_no_answer)) { $agent_max_no_answer = "0"; }
if (empty($agent_wrap_up_time)) { $agent_wrap_up_time = "10"; }
if (empty($agent_no_answer_delay_time)) { $agent_no_answer_delay_time = "30"; }
if (empty($agent_reject_delay_time)) { $agent_reject_delay_time = "90"; }
if (empty($agent_busy_delay_time)) { $agent_busy_delay_time = "90"; }
//add the call_center_agent_uuid
if (strlen($call_center_agent_uuid) == 0) {
if (empty($call_center_agent_uuid)) {
$call_center_agent_uuid = uuid();
}
@@ -159,6 +166,9 @@
$agent_contact = str_replace("@", "/", $agent_contact);
}
//freeswitch expands the contact string, so we need to sanitize it.
$agent_contact = str_replace('$', '', $agent_contact);
//prepare the array
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['call_center_agents'][0]['call_center_agent_uuid'] = $call_center_agent_uuid;
@@ -272,13 +282,13 @@
header("Location: call_center_agents.php");
return;
}
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
} //(is_array($_POST) && empty($_POST["persistformvar"]))
//initialize the destinations object
$destination = new destinations;
//pre-populate the form
if (is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
if (!empty($_GET["id"]) && is_uuid($_GET["id"]) && empty($_POST["persistformvar"])) {
$call_center_agent_uuid = $_GET["id"];
$sql = "select * from v_call_center_agents ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -287,7 +297,7 @@
$parameters['call_center_agent_uuid'] = $call_center_agent_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (!empty($row)) {
$call_center_agent_uuid = $row["call_center_agent_uuid"];
$user_uuid = $row["user_uuid"];
$agent_name = $row["agent_name"];
@@ -309,13 +319,13 @@
}
//set default values
if (strlen($agent_type) == 0) { $agent_type = "callback"; }
if (strlen($agent_call_timeout) == 0) { $agent_call_timeout = "20"; }
if (strlen($agent_max_no_answer) == 0) { $agent_max_no_answer = "0"; }
if (strlen($agent_wrap_up_time) == 0) { $agent_wrap_up_time = "10"; }
if (strlen($agent_no_answer_delay_time) == 0) { $agent_no_answer_delay_time = "30"; }
if (strlen($agent_reject_delay_time) == 0) { $agent_reject_delay_time = "90"; }
if (strlen($agent_busy_delay_time) == 0) { $agent_busy_delay_time = "90"; }
if (empty($agent_type)) { $agent_type = "callback"; }
if (empty($agent_call_timeout)) { $agent_call_timeout = "20"; }
if (empty($agent_max_no_answer)) { $agent_max_no_answer = "0"; }
if (empty($agent_wrap_up_time)) { $agent_wrap_up_time = "10"; }
if (empty($agent_no_answer_delay_time)) { $agent_no_answer_delay_time = "30"; }
if (empty($agent_reject_delay_time)) { $agent_reject_delay_time = "90"; }
if (empty($agent_busy_delay_time)) { $agent_busy_delay_time = "90"; }
//create token
$object = new token;
@@ -346,7 +356,7 @@
function check_duplicates() {
//check agent id
var agent_id = document.getElementById('agent_id').value;
$("#duplicate_agent_id_response").load("call_center_agent_edit.php?check=duplicate&agent_id="+agent_id+"&agent_uuid=<?php echo escape($call_center_agent_uuid); ?>", function() {
$("#duplicate_agent_id_response").load("call_center_agent_edit.php?check=duplicate&agent_id="+agent_id+"&agent_uuid=<?php echo escape($call_center_agent_uuid ?? ''); ?>", function() {
var duplicate_agent_id = false;
if ($("#duplicate_agent_id_response").html() != '') {
$('#agent_id').addClass('formfld_highlight_bad');
@@ -440,18 +450,13 @@
echo " <td class='vtable' align='left'>";
echo " <select name=\"user_uuid\" class='formfld' style='width: auto;'>\n";
echo " <option value=\"\"></option>\n";
foreach($users as $field) {
if ($user_uuid == $field['user_uuid']) {
echo " <option value='".escape($field['user_uuid'])."' selected='selected'>".escape($field['username'])."</option>\n";
}
else {
echo " <option value='".escape($field['user_uuid'])."' $selected>".escape($field['username'])."</option>\n";
}
foreach ($users as $field) {
echo " <option value='".escape($field['user_uuid'])."' ".(!empty($user_uuid) && $user_uuid == $field['user_uuid'] ? "selected='selected'" : null).">".escape($field['username'])."</option>\n";
}
echo " </select>";
unset($users);
echo " <br>\n";
echo " ".$text['description-users']."\n";
echo " ".!empty($text['description-users'])."\n";
echo " </td>";
echo " </tr>";
@@ -483,7 +488,7 @@
echo " ".$text['label-contact']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo $destination->select('user_contact', 'agent_contact', $agent_contact);
echo $destination->select('user_contact', 'agent_contact', ($agent_contact ?? null));
echo "<br />\n";
echo $text['description-contact']."\n";
echo "</td>\n";
@@ -495,31 +500,11 @@
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='agent_status'>\n";
echo " <option value=''></option>\n";
if ($agent_status == "Logged Out") {
echo " <option value='Logged Out' SELECTED >".$text['option-logged_out']."</option>\n";
}
else {
echo " <option value='Logged Out'>".$text['option-logged_out']."</option>\n";
}
if ($agent_status == "Available") {
echo " <option value='Available' SELECTED >".$text['option-available']."</option>\n";
}
else {
echo " <option value='Available'>".$text['option-available']."</option>\n";
}
if ($agent_status == "Available (On Demand)") {
echo " <option value='Available (On Demand)' SELECTED >".$text['option-available_on_demand']."</option>\n";
}
else {
echo " <option value='Available (On Demand)'>".$text['option-available_on_demand']."</option>\n";
}
if ($agent_status == "On Break") {
echo " <option value='On Break' SELECTED >".$text['option-on_break']."</option>\n";
}
else {
echo " <option value='On Break'>".$text['option-on_break']."</option>\n";
}
echo " <option value=''></option>\n";
echo " <option value='Logged Out' ".(!empty($agent_status) && $agent_status == "Logged Out" ? "selected='selected'" : null).">".$text['option-logged_out']."</option>\n";
echo " <option value='Available' ".(!empty($agent_status) && $agent_status == "Available" ? "selected='selected'" : null).">".$text['option-available']."</option>\n";
echo " <option value='Available (On Demand)' ".(!empty($agent_status) && $agent_status == "Available (On Demand)" ? "selected='selected'" : null).">".$text['option-available_on_demand']."</option>\n";
echo " <option value='On Break' ".(!empty($agent_status) && $agent_status == "On Break" ? "selected='selected'" : null).">".$text['option-on_break']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-status']."\n";
@@ -587,8 +572,8 @@
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='agent_record'>\n";
echo " <option value='true' ".($agent_record == "true" ? "selected='selected'" : '')." >".$text['option-true']."</option>\n";
echo " <option value='false' ".($agent_record != "true" ? "selected='selected'" : '').">".$text['option-false']."</option>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".(!empty($agent_record) && $agent_record != "true" ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-record_template']."\n";
+23 -20
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -49,7 +48,7 @@
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$tiers = $database->select($sql, $parameters, 'all');
if (is_array($tiers) && count($tiers) == 0) {
if (empty($tiers)) {
$per_queue_login = true;
}
else {
@@ -94,7 +93,7 @@
//add the status to the call_center_queues array
$x = 0;
if (is_array($call_center_queues)) {
if (!empty($call_center_queues)) {
foreach ($call_center_queues as $queue) {
//set the queue id
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
@@ -110,7 +109,7 @@
//get the agent status from mod_callcenter and update the agent status in the agents array
$x = 0;
if (is_array($agents)) {
if (!empty($agents)) {
foreach ($agents as $row) {
//add the domain name
$domain_name = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
@@ -118,14 +117,14 @@
//update the queue status
$i = 0;
if (is_array($call_center_queues)) {
if (!empty($call_center_queues)) {
foreach ($call_center_queues as $queue) {
$agents[$x]['queues'][$i]['agent_name'] = $row['agent_name'];
$agents[$x]['queues'][$i]['queue_name'] = $queue['queue_name'];
$agents[$x]['queues'][$i]['call_center_agent_uuid'] = $row['call_center_agent_uuid'];
$agents[$x]['queues'][$i]['call_center_queue_uuid'] = $queue['call_center_queue_uuid'];
$agents[$x]['queues'][$i]['queue_status'] = 'Logged Out';
if (is_array($queue['queue_list'])) {
if (!empty($queue['queue_list'])) {
foreach ($queue['queue_list'] as $queue_list) {
if ($row['call_center_agent_uuid'] == $queue_list['name']) {
$agents[$x]['queues'][$i]['queue_status'] = 'Available';
@@ -137,7 +136,7 @@
}
//update the agent status
if (is_array($agent_list)) {
if (!empty($agent_list)) {
foreach ($agent_list as $r) {
if ($r['name'] == $row['call_center_agent_uuid']) {
$agents[$x]['agent_status'] = $r['status'];
@@ -151,7 +150,7 @@
}
//remove rows from the http post array where the status has not changed
if (is_array($_POST['agents']) && !$per_queue_login) {
if (!empty($_POST['agents']) && !$per_queue_login) {
foreach($_POST['agents'] as $key => $row) {
foreach($agents as $k => $field) {
if ($field['agent_name'] === $row['agent_name'] && $field['agent_status'] === $row['agent_status']) {
@@ -162,14 +161,14 @@
}
//use the http post array to change the status
if (is_array($_POST['agents'])) {
if (!empty($_POST['agents'])) {
foreach($_POST['agents'] as $row) {
if (isset($row['agent_status'])) {
if (!empty($row['agent_status'])) {
//agent set status
if ($fp) {
//set the user_status
if (!isset($row['queue_name'])) {
$array['users'][0]['user_uuid'] = $row['user_uuid'];
$array['users'][0]['user_uuid'] = $row['user_uuid'] ?? null;
$array['users'][0]['user_status'] = $row['agent_status'];
$array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
@@ -225,7 +224,7 @@
//get the queue_id
if (isset($row['queue_uuid']) && is_uuid($row['queue_uuid'])) {
if (is_array($call_center_queues)) {
if (!empty($call_center_queues)) {
foreach ($call_center_queues as $queue) {
if ($queue['call_center_queue_uuid'] == $row['queue_uuid']) {
$queue_id = $queue['queue_extension'].'@'.$queue['domain_name'];
@@ -288,11 +287,15 @@
} //foreach
//send a message
message::add($text['confirm-add']);
message::add($text['message-status_set']);
header("Location: call_center_agent_status.php");
return;
} //post
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//includes the header
$document['title'] = $text['title-call_center_agent_status'];
require_once "resources/header.php";
@@ -329,7 +332,7 @@
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (is_array($_POST['agents']) && !$per_queue_login) {
if (!empty($_POST['agents']) && !$per_queue_login) {
echo $text['description-call_center_agent_status']."\n";
echo "<br /><br />\n";
}
@@ -348,7 +351,7 @@
}
echo "</tr>\n";
if (is_array($agents) && @sizeof($agents) != 0) {
if (!empty($agents)) {
$x = 0;
foreach ($agents as $row) {
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
@@ -369,14 +372,14 @@
if ($per_queue_login) {
$html .= " <td class='description'>";
if (is_array($row['queues'])) {
if (!empty($row['queues'])) {
$html .= " <table class='list' >\n";
$html .= " <tr>\n";
$html .= " <th>".$text['label-queue']."</th>\n";
$html .= " <th>".$text['label-status']."</th>\n";
$html .= " <th>".$text['label-options']."</th>\n";
$html .= " </tr>\n";
if (is_array($row['queues'])) {
if (!empty($row['queues'])) {
foreach ($row['queues'] as $queue) {
$x++;
$onclick = "onclick=\"cycle('agents[".$x."][agent_status]');\"";
+54 -38
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2018
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,15 +42,18 @@
$language = new text;
$text = $language->get();
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data
if (is_array($_POST['call_center_agents'])) {
if (!empty($_POST['call_center_agents'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_center_agents = $_POST['call_center_agents'];
}
//process the http post data by action
if ($action != '' && is_array($call_center_agents) && @sizeof($call_center_agents) != 0) {
if (!empty($action) && !empty($call_center_agents)) {
switch ($action) {
case 'delete':
if (permission_exists('call_center_agent_delete')) {
@@ -66,50 +68,64 @@
}
//get http variables and set them to php variables
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$sql_search = " (";
$sql_search .= "lower(agent_name) like :search ";
$sql_search .= "or lower(agent_id) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
//add the search and show variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//get total call center agent count from the database
$sql = "select count(*) from v_call_center_agents ";
$sql .= "where true ";
if ($_GET['show'] != "all" || !permission_exists('call_center_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
if ($show == "all" && permission_exists('call_center_all')) {
$sql .= "where true ";
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(agent_name) like :search ";
$sql .= " or lower(agent_id) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.strtolower($search).'%';
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".urlencode($search);
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if ($show == "all" && permission_exists('call_center_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
$page = !empty($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)', '*', $sql);
$sql = "select * ";
$sql .= "from v_call_center_agents ";
if ($show == "all" && permission_exists('call_center_all')) {
$sql .= "where true ";
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(agent_name) like :search ";
$sql .= " or lower(agent_id) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.strtolower($search).'%';
}
$sql .= order_by($order_by, $order, 'agent_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -139,7 +155,7 @@
}
echo "<form id='form_search' class='inline' method='get'>";
if (permission_exists('call_center_all')) {
if ($_GET['show'] == 'all') {
if (!empty($_GET['show']) && $_GET['show'] == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
@@ -172,10 +188,10 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_center_agent_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if ($show == "all" && permission_exists('call_center_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
}
//echo th_order_by('domain_uuid', 'domain_uuid', $order_by, $order);
@@ -189,12 +205,12 @@
//echo th_order_by('agent_wrap_up_time', $text['label-wrap_up_time'], $order_by, $order);
//echo th_order_by('agent_reject_delay_time', $text['label-reject_delay_time'], $order_by, $order);
//echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order);
if (permission_exists('call_center_agent_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($result)) {
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
if (permission_exists('call_center_agent_edit')) {
@@ -207,8 +223,8 @@
echo " <input type='hidden' name='call_center_agents[$x][uuid]' value='".escape($row['call_center_agent_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
if ($show == "all" && permission_exists('call_center_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
@@ -236,7 +252,7 @@
$sql .= "where gateway_uuid = :gateway_uuid ";
$parameters['gateway_uuid'] = $bridge_statement[2];
$database = new database;
$result = $database->select($sql, $parameters, 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
if (count($result) > 0) {
$gateway_name = $result[0]['gateway'];
$agent_contact = str_replace($bridge_statement[2], $gateway_name, $agent_contact);
@@ -249,7 +265,7 @@
//echo " <td>".$row[agent_wrap_up_time]."</td>\n";
//echo " <td>".$row[agent_reject_delay_time]."</td>\n";
//echo " <td>".$row[agent_busy_delay_time]."</td>\n";
if (permission_exists('call_center_agent_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_center_agent_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+154 -132
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -43,8 +42,18 @@
$language = new text;
$text = $language->get();
//set the defaults
$queue_name = '';
$queue_extension = '';
$queue_time_base_score_sec = '';
$queue_cid_prefix = '';
$queue_announce_frequency = '';
$queue_cc_exit_keys = '';
$queue_description = '';
$queue_timeout_action = '';
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$call_center_queue_uuid = $_REQUEST["id"];
}
@@ -57,7 +66,7 @@
//get total call center queues count from the database, check limit, if defined
if ($action == 'add') {
if ($_SESSION['limit']['call_center_queues']['numeric'] != '') {
if (!empty($_SESSION['limit']['call_center_queues']['numeric'])) {
$sql = "select count(*) from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
@@ -74,10 +83,10 @@
}
//get http post variables and set them to php variables
if (is_array($_POST)) {
if (!empty($_POST)) {
//get the post variables a run a security chack on them
//$domain_uuid = $_POST["domain_uuid"];
$dialplan_uuid = $_POST["dialplan_uuid"];
$dialplan_uuid = $_POST["dialplan_uuid"] ?? null;
$queue_name = $_POST["queue_name"];
$queue_extension = $_POST["queue_extension"];
$queue_greeting = $_POST["queue_greeting"];
@@ -94,16 +103,17 @@
$queue_tier_rule_wait_second = $_POST["queue_tier_rule_wait_second"];
$queue_tier_rule_wait_multiply_level = $_POST["queue_tier_rule_wait_multiply_level"];
$queue_tier_rule_no_agent_no_wait = $_POST["queue_tier_rule_no_agent_no_wait"];
$queue_timeout_action = $_POST["queue_timeout_action"];
$queue_timeout_action = $_POST["queue_timeout_action"] ?? null;
$queue_discard_abandoned_after = $_POST["queue_discard_abandoned_after"];
$queue_abandoned_resume_allowed = $_POST["queue_abandoned_resume_allowed"];
$queue_cid_prefix = $_POST["queue_cid_prefix"];
$queue_outbound_caller_id_name = $_POST["queue_outbound_caller_id_name"];
$queue_outbound_caller_id_number = $_POST["queue_outbound_caller_id_number"];
$queue_announce_position = $_POST["queue_announce_position"];
$queue_outbound_caller_id_name = $_POST["queue_outbound_caller_id_name"] ?? null;
$queue_outbound_caller_id_number = $_POST["queue_outbound_caller_id_number"] ?? null;
$queue_announce_position = $_POST["queue_announce_position"] ?? null;
$queue_announce_sound = $_POST["queue_announce_sound"];
$queue_announce_frequency = $_POST["queue_announce_frequency"];
$queue_cc_exit_keys = $_POST["queue_cc_exit_keys"];
$queue_email_address = $_POST["queue_email_address"] ?? null;
$queue_description = $_POST["queue_description"];
//remove invalid characters
@@ -115,7 +125,7 @@
}
//delete the tier (agent from the queue)
if ($_REQUEST["a"] == "delete" && is_uuid($_REQUEST["id"]) && permission_exists("call_center_tier_delete")) {
if (!empty($_REQUEST["a"]) && $_REQUEST["a"] == "delete" && is_uuid($_REQUEST["id"]) && permission_exists("call_center_tier_delete")) {
//set the variables
$call_center_queue_uuid = $_REQUEST["id"];
$call_center_tier_uuid = $_REQUEST["call_center_tier_uuid"];
@@ -132,7 +142,7 @@
$tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
if (is_array($tiers) && sizeof($tiers) != 0) {
if (!empty($tiers)) {
foreach ($tiers as &$row) {
$call_center_agent_uuid = $row["call_center_agent_uuid"];
$call_center_queue_uuid = $row["call_center_queue_uuid"];
@@ -153,7 +163,7 @@
}
//delete the tier from the database
if (strlen($call_center_tier_uuid) > 0) {
if (!empty($call_center_tier_uuid)) {
$array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid;
$array['call_center_tiers'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
@@ -171,7 +181,7 @@
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//get the uuid from the POST
if ($action == "update") {
@@ -188,27 +198,27 @@
//check for all required data
$msg = '';
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
if (strlen($queue_name) == 0) { $msg .= $text['message-required'].$text['label-queue_name']."<br>\n"; }
if (strlen($queue_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
if (strlen($queue_strategy) == 0) { $msg .= $text['message-required'].$text['label-strategy']."<br>\n"; }
//if (strlen($queue_moh_sound) == 0) { $msg .= $text['message-required'].$text['label-music_on_hold']."<br>\n"; }
//if (strlen($queue_record_template) == 0) { $msg .= $text['message-required'].$text['label-record_template']."<br>\n"; }
//if (strlen($queue_time_base_score) == 0) { $msg .= $text['message-required'].$text['label-time_base_score']."<br>\n"; }
//if (strlen($queue_time_base_score_sec) == 0) { $msg .= $text['message-required'].$text['label-time_base_score_sec']."<br>\n"; }
//if (strlen($queue_max_wait_time) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time']."<br>\n"; }
//if (strlen($queue_max_wait_time_with_no_agent) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent']."<br>\n"; }
//if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent_time_reached']."<br>\n"; }
//if (strlen($queue_tier_rules_apply) == 0) { $msg .= $text['message-required'].$text['label-tier_rules_apply']."<br>\n"; }
//if (strlen($queue_tier_rule_wait_second) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_wait_second']."<br>\n"; }
//if (strlen($queue_tier_rule_wait_multiply_level) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_wait_multiply_level']."<br>\n"; }
//if (strlen($queue_tier_rule_no_agent_no_wait) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_no_agent_no_wait']."<br>\n"; }
//if (strlen($queue_timeout_action) == 0) { $msg .= $text['message-required'].$text['label-timeout_action']."<br>\n"; }
//if (strlen($queue_discard_abandoned_after) == 0) { $msg .= $text['message-required'].$text['label-discard_abandoned_after']."<br>\n"; }
//if (strlen($queue_abandoned_resume_allowed) == 0) { $msg .= $text['message-required'].$text['label-abandoned_resume_allowed']."<br>\n"; }
//if (strlen($queue_cid_prefix) == 0) { $msg .= $text['message-required'].$text['label-caller_id_name_prefix']."<br>\n"; }
//if (strlen($queue_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
//if (empty($domain_uuid)) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
if (empty($queue_name)) { $msg .= $text['message-required'].$text['label-queue_name']."<br>\n"; }
if (empty($queue_extension)) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
if (empty($queue_strategy)) { $msg .= $text['message-required'].$text['label-strategy']."<br>\n"; }
//if (empty($queue_moh_sound)) { $msg .= $text['message-required'].$text['label-music_on_hold']."<br>\n"; }
//if (empty($queue_record_template)) { $msg .= $text['message-required'].$text['label-record_template']."<br>\n"; }
//if (empty($queue_time_base_score)) { $msg .= $text['message-required'].$text['label-time_base_score']."<br>\n"; }
//if (empty($queue_time_base_score_sec)) { $msg .= $text['message-required'].$text['label-time_base_score_sec']."<br>\n"; }
//if (empty($queue_max_wait_time)) { $msg .= $text['message-required'].$text['label-max_wait_time']."<br>\n"; }
//if (empty($queue_max_wait_time_with_no_agent)) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent']."<br>\n"; }
//if (empty($queue_max_wait_time_with_no_agent_time_reached)) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent_time_reached']."<br>\n"; }
//if (empty($queue_tier_rules_apply)) { $msg .= $text['message-required'].$text['label-tier_rules_apply']."<br>\n"; }
//if (empty($queue_tier_rule_wait_second)) { $msg .= $text['message-required'].$text['label-tier_rule_wait_second']."<br>\n"; }
//if (empty($queue_tier_rule_wait_multiply_level)) { $msg .= $text['message-required'].$text['label-tier_rule_wait_multiply_level']."<br>\n"; }
//if (empty($queue_tier_rule_no_agent_no_wait)) { $msg .= $text['message-required'].$text['label-tier_rule_no_agent_no_wait']."<br>\n"; }
//if (empty($queue_timeout_action)) { $msg .= $text['message-required'].$text['label-timeout_action']."<br>\n"; }
//if (empty($queue_discard_abandoned_after)) { $msg .= $text['message-required'].$text['label-discard_abandoned_after']."<br>\n"; }
//if (empty($queue_abandoned_resume_allowed)) { $msg .= $text['message-required'].$text['label-abandoned_resume_allowed']."<br>\n"; }
//if (empty($queue_cid_prefix)) { $msg .= $text['message-required'].$text['label-caller_id_name_prefix']."<br>\n"; }
//if (empty($queue_description)) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -225,27 +235,27 @@
$_POST["domain_uuid"] = $_SESSION["domain_uuid"];
//add the call_center_queue_uuid
if (strlen($_POST["call_center_queue_uuid"]) == 0) {
if (empty($_POST["call_center_queue_uuid"])) {
$call_center_queue_uuid = uuid();
$_POST["call_center_queue_uuid"] = $call_center_queue_uuid;
}
//add the dialplan_uuid
if (strlen($_POST["dialplan_uuid"]) == 0) {
if (empty($_POST["dialplan_uuid"])) {
$dialplan_uuid = uuid();
$_POST["dialplan_uuid"] = $dialplan_uuid;
}
//update the call centier tiers array
$x = 0;
if (is_array($_POST["call_center_tiers"]) && @sizeof($_POST["call_center_tiers"]) != 0) {
if (!empty($_POST["call_center_tiers"])) {
foreach ($_POST["call_center_tiers"] as $row) {
//add the domain_uuid
if (strlen($row["domain_uuid"]) == 0) {
if (empty($row["domain_uuid"])) {
$_POST["call_center_tiers"][$x]["domain_uuid"] = $_SESSION['domain_uuid'];
}
//unset ring_group_destination_uuid if the field has no value
if (strlen($row["call_center_agent_uuid"]) == 0) {
if (empty($row["call_center_agent_uuid"])) {
unset($_POST["call_center_tiers"][$x]);
}
//increment the row
@@ -260,7 +270,7 @@
$queue_timeout_data = implode($action_array);
//add the recording path if needed
if ($queue_greeting != '') {
if (!empty($queue_greeting)) {
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting)) {
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting;
}
@@ -298,16 +308,21 @@
$array['call_center_queues'][0]['queue_outbound_caller_id_number'] = $queue_outbound_caller_id_number;
}
$array['call_center_queues'][0]['queue_announce_position'] = $queue_announce_position;
$array['call_center_queues'][0]['queue_announce_sound'] = $queue_announce_sound;
if (permission_exists('call_center_announce_sound')) {
$array['call_center_queues'][0]['queue_announce_sound'] = $queue_announce_sound;
}
$array['call_center_queues'][0]['queue_announce_frequency'] = $queue_announce_frequency;
$array['call_center_queues'][0]['queue_cc_exit_keys'] = $queue_cc_exit_keys;
if (permission_exists('call_center_email_address')) {
$array['call_center_queues'][0]['queue_email_address'] = $queue_email_address;
}
$array['call_center_queues'][0]['queue_description'] = $queue_description;
$array['call_center_queues'][0]['call_center_queue_uuid'] = $call_center_queue_uuid;
$array['call_center_queues'][0]['dialplan_uuid'] = $dialplan_uuid;
$array['call_center_queues'][0]['domain_uuid'] = $domain_uuid;
$y = 0;
if (is_array($_POST["call_center_tiers"]) && @sizeof($_POST["call_center_tiers"]) != 0) {
if (!empty($_POST["call_center_tiers"])) {
foreach ($_POST["call_center_tiers"] as $row) {
if (is_uuid($row['call_center_tier_uuid'])) {
$call_center_tier_uuid = $row['call_center_tier_uuid'];
@@ -315,7 +330,7 @@
else {
$call_center_tier_uuid = uuid();
}
if (strlen($row['call_center_agent_uuid']) > 0) {
if (!empty($row['call_center_agent_uuid'])) {
$array["call_center_queues"][0]["call_center_tiers"][$y]["call_center_tier_uuid"] = $call_center_tier_uuid;
$array['call_center_queues'][0]["call_center_tiers"][$y]["call_center_agent_uuid"] = $row['call_center_agent_uuid'];
$array['call_center_queues'][0]["call_center_tiers"][$y]["tier_level"] = $row['tier_level'];
@@ -326,44 +341,53 @@
}
}
//add definable export variables can be set in default settings
$export_variables = 'call_center_queue_uuid,sip_h_Alert-Info';
if (!empty($_SESSION['call_center']['export_vars'])) {
foreach ($_SESSION['call_center']['export_vars'] as $export_variable) {
$export_variables .= ','.$export_variable;
}
}
//build the xml dialplan
$dialplan_xml = "<extension name=\"".$queue_name."\" continue=\"\" uuid=\"".$dialplan_uuid."\">\n";
$dialplan_xml = "<extension name=\"".xml::sanitize($queue_name)."\" continue=\"\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^([^#]+#)(.*)\$\" break=\"never\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"caller_id_name=\$2\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^(callcenter\+)?".$queue_extension."$\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^(callcenter\+)?".xml::sanitize($queue_extension)."$\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
if (is_uuid($call_center_queue_uuid)) {
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$call_center_queue_uuid."\"/>\n";
if (!empty($call_center_queue_uuid) && is_uuid($call_center_queue_uuid)) {
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".xml::sanitize($call_center_queue_uuid)."\"/>\n";
}
if (is_numeric($queue_extension)) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$queue_extension."\"/>\n";
if (!empty($queue_extension) && is_numeric($queue_extension)) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".xml::sanitize($queue_extension)."\"/>\n";
}
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=call_center_queue_uuid\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=\${cc_export_vars},".$export_variables."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"hangup_after_bridge=true\"/>\n";
if ($queue_time_base_score_sec != '') {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$queue_time_base_score_sec."\"/>\n";
if (!empty($queue_time_base_score_sec)) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".xml::sanitize($queue_time_base_score_sec)."\"/>\n";
}
if ($queue_greeting_path != '') {
if (!empty($queue_greeting_path)) {
$dialplan_xml .= " <action application=\"sleep\" data=\"1000\"/>\n";
$greeting_array = explode(':', $queue_greeting_path);
if (count($greeting_array) == 1) {
$dialplan_xml .= " <action application=\"playback\" data=\"".$queue_greeting_path."\"/>\n";
$dialplan_xml .= " <action application=\"playback\" data=\"".xml::sanitize($queue_greeting_path)."\"/>\n";
}
else {
if ($greeting_array[0] == 'say' || $greeting_array[0] == 'tone_stream' || $greeting_array[0] == 'phrase') {
$dialplan_xml .= " <action application=\"".$greeting_array[0]."\" data=\"".$greeting_array[1]."\"/>\n";
$dialplan_xml .= " <action application=\"".xml::sanitize($greeting_array[0])."\" data=\"".xml::sanitize($greeting_array[1])."\"/>\n";
}
}
}
if (strlen($queue_cid_prefix) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".$queue_cid_prefix."#\${caller_id_name}\"/>\n";
if (!empty($queue_cid_prefix)) {
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".xml::sanitize($queue_cid_prefix)."#\${caller_id_name}\"/>\n";
}
if (strlen($queue_cc_exit_keys) > 0) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".$queue_cc_exit_keys."\"/>\n";
if (!empty($queue_cc_exit_keys)) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n";
}
$dialplan_xml .= " <action application=\"callcenter\" data=\"".$queue_extension."@".$_SESSION["domain_name"]."\"/>\n";
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$_SESSION["domain_name"]."\"/>\n";
if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) {
$dialplan_xml .= " <action application=\"".$queue_timeout_app."\" data=\"".$queue_timeout_data."\"/>\n";
$dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n";
}
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
@@ -427,11 +451,11 @@
remove_config_from_cache('configuration:callcenter.conf');
//add agent/tier to queue
$agent_name = $_POST["agent_name"];
$tier_level = $_POST["tier_level"];
$tier_position = $_POST["tier_position"];
$agent_name = $_POST["agent_name"] ?? null;
$tier_level = $_POST["tier_level"] ?? null;
$tier_position = $_POST["tier_position"] ?? null;
if ($agent_name != '') {
if (!empty($agent_name)) {
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//add the agent using event socket
@@ -476,10 +500,10 @@
}
return;
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
} //(count($_POST)>0 && empty($_POST["persistformvar"]))
//pre-populate the form
if (is_array($_GET) && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && is_uuid($_GET["id"]) && empty($_POST["persistformvar"])) {
$call_center_queue_uuid = $_GET["id"];
$sql = "select * from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -490,7 +514,7 @@
$call_center_queues = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
if (is_array($call_center_queues)) {
if (!empty($call_center_queues)) {
foreach ($call_center_queues as &$row) {
$queue_name = $row["queue_name"];
$dialplan_uuid = $row["dialplan_uuid"];
@@ -519,6 +543,7 @@
$queue_announce_sound = $row["queue_announce_sound"];
$queue_announce_frequency = $row["queue_announce_frequency"];
$queue_cc_exit_keys = $row["queue_cc_exit_keys"];
$queue_email_address = $row["queue_email_address"];
$queue_description = $row["queue_description"];
}
}
@@ -532,14 +557,14 @@
$sql .= "and t.domain_uuid = :domain_uuid ";
$sql .= "order by tier_level asc, tier_position asc, a.agent_name asc";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
$database = new database;
$tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//add an empty row to the tiers array
if (count($tiers) == 0) {
$rows = $_SESSION['call_center']['agent_add_rows']['numeric'];
$rows = $_SESSION['call_center']['agent_add_rows']['numeric'] ?? null;
$id = 0;
}
if (count($tiers) > 0) {
@@ -549,7 +574,7 @@
for ($x = 0; $x < $rows; $x++) {
$tiers[$id]['call_center_tier_uuid'] = uuid();
$tiers[$id]['call_center_agent_uuid'] = '';
$tiers[$id]['call_center_queue_uuid'] = $call_center_queue_uuid;
$tiers[$id]['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
$tiers[$id]['tier_level'] = '';
$tiers[$id]['tier_position'] = '';
$tiers[$id]['agent_name'] = '';
@@ -570,19 +595,19 @@
$sounds = $sounds->get();
//set default values
if (strlen($queue_strategy) == 0) { $queue_strategy = "longest-idle-agent"; }
if (strlen($queue_moh_sound) == 0) { $queue_moh_sound = "\$\${hold_music}"; }
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = "system"; }
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = ""; }
if (strlen($queue_max_wait_time) == 0) { $queue_max_wait_time = "0"; }
if (strlen($queue_max_wait_time_with_no_agent) == 0) { $queue_max_wait_time_with_no_agent = "90"; }
if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $queue_max_wait_time_with_no_agent_time_reached = "30"; }
if (strlen($queue_tier_rules_apply) == 0) { $queue_tier_rules_apply = "false"; }
if (strlen($queue_tier_rule_wait_second) == 0) { $queue_tier_rule_wait_second = "30"; }
if (strlen($queue_tier_rule_wait_multiply_level) == 0) { $queue_tier_rule_wait_multiply_level = "true"; }
if (strlen($queue_tier_rule_no_agent_no_wait) == 0) { $queue_tier_rule_no_agent_no_wait = "true"; }
if (strlen($queue_discard_abandoned_after) == 0) { $queue_discard_abandoned_after = "900"; }
if (strlen($queue_abandoned_resume_allowed) == 0) { $queue_abandoned_resume_allowed = "false"; }
if (empty($queue_strategy)) { $queue_strategy = "longest-idle-agent"; }
if (empty($queue_moh_sound)) { $queue_moh_sound = "\$\${hold_music}"; }
if (empty($queue_time_base_score)) { $queue_time_base_score = "system"; }
if (empty($queue_time_base_score)) { $queue_time_base_score = ""; }
if (empty($queue_max_wait_time)) { $queue_max_wait_time = "0"; }
if (empty($queue_max_wait_time_with_no_agent)) { $queue_max_wait_time_with_no_agent = "90"; }
if (empty($queue_max_wait_time_with_no_agent_time_reached)) { $queue_max_wait_time_with_no_agent_time_reached = "30"; }
if (empty($queue_tier_rules_apply)) { $queue_tier_rules_apply = "false"; }
if (empty($queue_tier_rule_wait_second)) { $queue_tier_rule_wait_second = "30"; }
if (empty($queue_tier_rule_wait_multiply_level)) { $queue_tier_rule_wait_multiply_level = "true"; }
if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; }
if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; }
if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; }
//create token
$object = new token;
@@ -615,7 +640,7 @@
require_once "resources/header.php";
//only allow a uuid
if (!is_uuid($call_center_queue_uuid)) {
if (empty($call_center_queue_uuid)) {
$call_center_queue_uuid = null;
}
@@ -671,9 +696,9 @@
if (permission_exists('call_center_wallboard')) {
echo button::create(['type'=>'button','label'=>$text['button-wallboard'],'icon'=>'th','link'=>PROJECT_PATH.'/app/call_center_wallboard/call_center_wallboard.php?queue_name='.urlencode($call_center_queue_uuid)]);
}
echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-restart'],'icon'=>'sync-alt','link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
//echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]);
//echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
}
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
@@ -715,7 +740,7 @@
echo "<optgroup label=".$text['label-'.$key].">\n";
$selected = false;
foreach($value as $row) {
if ($queue_greeting == $row["value"]) {
if (!empty($queue_greeting) && $queue_greeting == $row["value"]) {
$selected = true;
echo " <option value='".escape($row["value"])."' selected='selected'>".escape($row["name"])."</option>\n";
}
@@ -725,12 +750,6 @@
}
echo "</optgroup>\n";
}
if (if_group("superadmin")) {
if (!$selected && strlen($queue_greeting) > 0) {
echo " <option value='".escape($queue_greeting)."' selected='selected'>".escape($queue_greeting)."</option>\n";
}
unset($selected);
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-greeting']."\n";
@@ -804,7 +823,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('call_center_tier_view') && is_array($agents) && count($agents) > 0) {
if (permission_exists('call_center_tier_view') && !empty($agents) && is_array($agents)) {
echo "<tr>";
echo " <td class='vncell' valign='top'>".$text['label-agents']."</td>";
echo " <td class='vtable' align='left'>";
@@ -820,7 +839,7 @@
foreach($tiers as $field) {
echo " <tr>\n";
echo " <td class=''>";
if (strlen($field['call_center_tier_uuid']) > 0) {
if (!empty($field['call_center_tier_uuid'])) {
echo " <input name='call_center_tiers[".$x."][call_center_tier_uuid]' type='hidden' value=\"".escape($field['call_center_tier_uuid'])."\">\n";
}
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\" style=\"width: 200px\">\n";
@@ -876,7 +895,7 @@
}
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-music_on_hold']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
@@ -896,13 +915,13 @@
echo "<td class='vtable' align='left'>\n";
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}";
echo " <select class='formfld' name='queue_record_template'>\n";
if (strlen($queue_record_template) > 0) {
if (!empty($queue_record_template)) {
echo " <option value='".escape($queue_record_template)."' selected='selected' >".$text['option-true']."</option>\n";
}
else {
echo " <option value='".escape($record_template)."'>".$text['option-true']."</option>\n";
}
if (strlen($queue_record_template) == 0) {
if (empty($queue_record_template)) {
echo " <option value='' selected='selected' >".$text['option-false']."</option>\n";
}
else {
@@ -1128,7 +1147,7 @@
echo " ".$text['label-outbound_caller_id_name']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_name' maxlength='255' value='".escape($queue_outbound_caller_id_name)."'>\n";
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_name' maxlength='255' value='".escape($queue_outbound_caller_id_name ?? '')."'>\n";
echo "<br />\n";
echo $text['description-outbound_caller_id_name']."\n";
echo "</td>\n";
@@ -1141,7 +1160,7 @@
echo " ".$text['label-outbound_caller_id_number']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_number' maxlength='255' value='".escape($queue_outbound_caller_id_number)."'>\n";
echo " <input class='formfld' type='text' name='queue_outbound_caller_id_number' maxlength='255' value='".escape($queue_outbound_caller_id_number ?? '')."'>\n";
echo "<br />\n";
echo $text['description-outbound_caller_id_number']."\n";
echo "</td>\n";
@@ -1155,21 +1174,11 @@
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='queue_announce_position'>\n";
if ($queue_announce_position == "false") {
echo " <option value='false' selected='selected' >".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
if ($queue_announce_position == "true") {
echo " <option value='true' selected='selected' >".$text['option-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
}
echo " <option value='false'>".$text['option-false']."</option>\n";
echo " <option value='true' ".(!empty($queue_announce_position) && $queue_announce_position == "true" ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-queue_announce_position']."\n";
echo ($text['description-queue_announce_position'] ?? '')."\n";
echo "</td>\n";
echo "</tr>\n";
}
@@ -1191,8 +1200,8 @@
$script .= " tb.name=obj.name;\n";
$script .= " tb.className='formfld';\n";
$script .= " tb.setAttribute('id', '".$destination_id."');\n";
$script .= " tb.setAttribute('style', '".$select_style."');\n";
if ($on_change != '') {
$script .= " tb.setAttribute('style', '".!empty($select_style)."');\n";
if (!empty($on_change)) {
$script .= " tb.setAttribute('onchange', \"".$on_change."\");\n";
$script .= " tb.setAttribute('onkeyup', \"".$on_change."\");\n";
}
@@ -1216,7 +1225,7 @@
$script .= " obj[0].parentNode.removeChild(obj[1]);\n";
$script .= " obj[0].parentNode.removeChild(obj[2]);\n";
$script .= " document.getElementById('btn_select_to_input_".$destination_id."').style.visibility = 'visible';\n";
if ($on_change != '') {
if (!empty($on_change)) {
$script .= " ".$on_change.";\n";
}
$script .= "}\n";
@@ -1229,16 +1238,16 @@
//recordings
$tmp_selected = false;
if (is_array($recordings)) {
if (!empty($recordings)) {
echo "<optgroup label='Recordings'>\n";
foreach ($recordings as &$row) {
$recording_name = $row["recording_name"];
$recording_filename = $row["recording_filename"];
if ($queue_announce_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($queue_announce_sound) > 0) {
if (!empty($queue_announce_sound) && $queue_announce_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename) {
$tmp_selected = true;
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
}
else if ($queue_announce_sound == $recording_filename && strlen($queue_announce_sound) > 0) {
else if (!empty($queue_announce_sound) && $queue_announce_sound == $recording_filename) {
$tmp_selected = true;
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
}
@@ -1249,7 +1258,7 @@
echo "</optgroup>\n";
}
if (!$tmp_selected && strlen($queue_announce_sound) > 0) {
if (!$tmp_selected && !empty($queue_announce_sound)) {
echo "<optgroup label='Selected'>\n";
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$queue_announce_sound)) {
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($queue_announce_sound)."' selected='selected'>".escape($queue_announce_sound)."</option>\n";
@@ -1292,13 +1301,26 @@
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-exit_keys']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_cc_exit_keys' value='".escape($queue_cc_exit_keys)."'>\n";
echo "<br />\n";
echo $text['description-exit_keys']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_cc_exit_keys' value='".escape($queue_cc_exit_keys)."'>\n";
echo "<br />\n";
echo $text['description-exit_keys']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('call_center_email_address')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-queue_email_address']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='queue_email_address' maxlength='255' value='".escape($queue_email_address ?? '')."'>\n";
echo "<br />\n";
echo $text['description-queue_email_address']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
+35 -30
View File
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,15 +42,21 @@
$language = new text;
$text = $language->get();
//set additional variables
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get posted data
if (is_array($_POST['call_center_queues'])) {
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_center_queues = $_POST['call_center_queues'];
}
//process the http post data by action
if ($action != '' && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
if (!empty($action) && is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
switch ($action) {
case 'copy':
if (permission_exists('call_center_queue_add')) {
@@ -72,12 +77,12 @@
}
//get http variables and set as php variables
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$search = strtolower($_GET["search"] ?? '');
if (!empty($search)) {
$sql_search = " (";
$sql_search .= "lower(queue_name) like :search ";
$sql_search .= "or lower(queue_description) like :search ";
@@ -88,34 +93,34 @@
//get total call center queues count from the database
$sql = "select count(*) from v_call_center_queues ";
$sql .= "where true ";
if ($_GET['show'] != "all" || !permission_exists('call_center_all')) {
if ($show != "all" || !permission_exists('call_center_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($sql_search)) {
if (!empty($sql_search)) {
$sql .= "and ".$sql_search;
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".urlencode($search);
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if ($show == "all" && permission_exists('call_center_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)', '*', $sql);
$sql = str_replace('count(*)', '*', $sql ?? '');
$sql .= order_by($order_by, $order, 'queue_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$result = $database->select($sql, $parameters, 'all');
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -140,21 +145,21 @@
echo button::create(['type'=>'button','label'=>$text['button-wallboard'],'icon'=>'th','link'=>PROJECT_PATH.'/app/call_center_wallboard/call_center_wallboard.php']);
}
$margin_left = permission_exists('call_center_agent_view') || permission_exists('call_center_wallboard') ? 'margin-left: 15px;' : null;
if (permission_exists('call_center_queue_add') && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
if (permission_exists('call_center_queue_add') && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','style'=>$margin_left,'link'=>'call_center_queue_edit.php']);
unset($margin_left);
}
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none; '.$margin_left,'onclick'=>"modal_open('modal-copy','btn_copy');"]);
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none; '.!empty($margin_left),'onclick'=>"modal_open('modal-copy','btn_copy');"]);
unset($margin_left);
}
if (permission_exists('call_center_queue_delete') && $result) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; '.$margin_left,'onclick'=>"modal_open('modal-delete','btn_delete');"]);
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; '.!empty($margin_left),'onclick'=>"modal_open('modal-delete','btn_delete');"]);
unset($margin_left);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_center_all')) {
if ($_GET['show'] == 'all') {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
@@ -172,7 +177,7 @@
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric']) || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
if (permission_exists('call_center_queue_add') && $result && (!is_numeric($_SESSION['limit']['call_center_queues']['numeric'] ?? '') || $num_rows <= $_SESSION['limit']['call_center_queues']['numeric'])) {
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
}
if (permission_exists('call_center_queue_delete') && $result) {
@@ -190,10 +195,10 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_center_queue_add') || permission_exists('call_center_queue_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($result ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($result) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if ($show == "all" && permission_exists('call_center_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
}
echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order);
@@ -212,12 +217,12 @@
//echo th_order_by('queue_abandoned_resume_allowed', $text['label-abandoned_resume_allowed'], $order_by, $order);
//echo th_order_by('queue_tier_rule_wait_multiply_level', $text['label-tier_rule_wait_multiply_level'], $order_by, $order);
echo th_order_by('queue_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('call_center_queue_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($result)) {
if (!empty($result)) {
$x = 0;
foreach($result as $row) {
if (permission_exists('call_center_queue_edit')) {
@@ -230,8 +235,8 @@
echo " <input type='hidden' name='call_center_queues[$x][uuid]' value='".escape($row['call_center_queue_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
if ($show == "all" && permission_exists('call_center_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
@@ -262,7 +267,7 @@
//echo " <td>".escape($row[queue_abandoned_resume_allowed])."&nbsp;</td>\n";
//echo " <td>".escape($row[queue_tier_rule_wait_multiply_level])."&nbsp;</td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['queue_description'])."</td>\n";
if (permission_exists('call_center_queue_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_center_queue_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+5 -6
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -42,7 +41,7 @@
$cmd = $_GET['cmd'];
//pre-populate the form
if (is_array($_GET) && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && is_array($_GET) && is_uuid($_GET["id"]) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
$call_center_queue_uuid = $_GET["id"];
$sql = "select queue_extension from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -86,4 +85,4 @@
$_SESSION["message"] = $response;
header("Location: call_center_queues.php?savemsg=".urlencode($response));
?>
?>
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2015 - 2021
Copyright (C) 2015 - 2023
All Rights Reserved.
Contributor(s):
@@ -62,16 +62,6 @@
$this->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
}
/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* Add a dialplan for call center
* @var string $domain_uuid the multi-tenant id
@@ -156,7 +146,7 @@
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++;
if (strlen($this->queue_cid_prefix) > 0) {
if (!empty($this->queue_cid_prefix)) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
@@ -166,7 +156,7 @@
$y++;
}
if (strlen($this->queue_greeting) > 0) {
if (!empty($this->queue_greeting)) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "sleep";
@@ -176,7 +166,7 @@
$y++;
}
if (strlen($this->queue_greeting) > 0) {
if (!empty($this->queue_greeting)) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "playback";
@@ -186,7 +176,7 @@
$y++;
}
if (strlen($this->queue_cc_exit_keys) > 0) {
if (!empty($this->queue_cc_exit_keys)) {
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
@@ -204,7 +194,7 @@
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
$y++;
if (strlen($this->queue_timeout_action) > 0) {
if (!empty($this->queue_timeout_action)) {
$action_array = explode(":",$this->queue_timeout_action);
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
@@ -304,8 +294,8 @@
//filter out unchecked, build where clause for below
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = $record['uuid'];
}
}
@@ -313,7 +303,7 @@
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, dialplan_uuid, queue_name, queue_extension from v_".$this->table." ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$sql .= "and ".$this->uuid_prefix."uuid in ('".implode("','", $uuids)."') ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
@@ -353,7 +343,7 @@
//delete the queue in the switch
if ($fp) {
foreach ($uuids as $uuid) {
$cmd = "api callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION["domin_name"];
$cmd = "api callcenter_config queue unload ".$call_center_queues[$uuid]['queue_extension']."@".$_SESSION["domain_name"];
$response = event_socket_request($fp, $cmd);
}
}
@@ -427,7 +417,7 @@
//filter out unchecked
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = $record['uuid'];
}
}
@@ -513,8 +503,8 @@
//get checked records
foreach ($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = $record['uuid'];
}
}
@@ -523,7 +513,7 @@
//primary table
$sql = "select * from v_".$this->table." ";
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$sql .= "where ".$this->uuid_prefix."uuid in ('".implode("','", $uuids)."') ";
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
@@ -637,4 +627,4 @@ $c->queue_cc_exit_keys = "";
$c->dialplan();
*/
?>
?>
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -46,20 +45,24 @@
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//connect to the database
if (!isset($database)) {
$database = new database;
}
//setup the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//get the http post values and set them as php variables
if (count($_POST) > 0) {
foreach ($_POST['agents'] as $row) {
if (strlen($row['agent_status']) > 0) {
if (!empty($row['agent_status'])) {
//agent set status
if ($fp) {
// update the database
$array['call_center_agents'][0]['call_center_agent_uuid'] = $row['id'];
$array['call_center_agents'][0]['domain_uuid'] = $_SESSION['user']['domain_uuid'];
$array['call_center_agents'][0]['agent_status'] = $row['agent_status'];
$database = new database;
$database->app_name = 'call_centers_dashboard';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->save($array);
@@ -100,7 +103,6 @@
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by queue_extension asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$call_center_queues = $database->select($sql, $parameters, 'all');
$num_rows = !is_array($call_center_queues) ? 0 : @sizeof($call_center_queues);
unset($sql, $parameters);
@@ -111,7 +113,6 @@
$sql .= "and domain_uuid = :domain_uuid";
$parameters['user_uuid'] = $_SESSION['user_uuid'];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$agents = $database->select($sql, $parameters, 'all');
if (count($agents) > 0) {
$agent = $agents[0];
@@ -0,0 +1,121 @@
<?php
//check the permission
if (defined('STDIN')) {
require_once dirname(__DIR__, 4) . "/resources/require.php";
}
else {
exit;
}
//increase limits
set_time_limit(300);
ini_set('max_execution_time',300); //5 minutes
ini_set('memory_limit', '256M');
//save the arguments to variables
$script_name = $argv[0];
if (!empty($argv[1])) {
parse_str($argv[1], $_GET);
}
//get the primary key
if (Is_array($_GET)) {
$hostname = urldecode($_GET['hostname']);
$debug = $_GET['debug'];
$sleep_seconds = $_GET['sleep'];
}
else {
//invalid uuid
exit;
}
//connect to event socket
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//get the agent list from event socket
$switch_cmd = 'callcenter_config agent list';
$event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
$agent_list = csv_to_named_array($event_socket_str, '|');
//get the agents from the database
$sql = "select a.*, d.domain_name \n";
$sql .= "from v_call_center_agents as a, v_domains as d \n";
$sql .= "where a.domain_uuid = d.domain_uuid \n";
$sql .= "order by agent_name asc \n";
//echo $sql;
$database = new database;
$agents = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//view_array($results);
foreach($agents as $row) {
//update the agent status
if (is_array($agent_list)) {
foreach ($agent_list as $r) {
if ($r['name'] == $row['call_center_agent_uuid']) {
$agent_status = $r['status'];
}
}
}
//answer_state options: confirmed, early, and terminated
if ($agent_status == 'Available') {
$answer_state = 'confirmed';
}
else {
$answer_state = 'terminated';
}
//build the event
if ($fp) {
$event = "sendevent PRESENCE_IN\n";
$event .= "proto: agent\n";
$event .= "from: ".$row['agent_name']."@".$row['domain_name']."\n";
$event .= "login: ".$row['agent_name']."@".$row['domain_name']."\n";
$event .= "status: Active (1 waiting)\n";
$event .= "rpid: unknown\n";
$event .= "event_type: presence\n";
$event .= "alt_event_type: dialog\n";
$event .= "event_count: 1\n";
$event .= "unique-id: ".uuid()."\n";
$event .= "Presence-Call-Direction: outbound\n";
$event .= "answer-state: ".$answer_state."\n";
$event = "sendevent PRESENCE_IN\n";
$event .= "proto: agent\n";
$event .= "from: ".$row['agent_id']."@".$row['domain_name']."\n";
$event .= "login: ".$row['agent_id']."@".$row['domain_name']."\n";
$event .= "status: Active (1 waiting)\n";
$event .= "rpid: unknown\n";
$event .= "event_type: presence\n";
$event .= "alt_event_type: dialog\n";
$event .= "event_count: 1\n";
$event .= "unique-id: ".uuid()."\n";
$event .= "Presence-Call-Direction: outbound\n";
$event .= "answer-state: ".$answer_state."\n";
}
//send message to the console
if (isset($debug)) {
echo "\n";
echo "[presence][call_center] agent+".$row['agent_name']."@".$row['domain_name']." agent_status ".$agent_status." answer_state ".$answer_state."\n";
}
//send the event
$result = event_socket_request($fp, $event);
if (isset($debug)) {
print_r($result, false);
}
}
//close event socket connection
fclose($fp);
/*
* * * * * cd /var/www/fusionpbx && php /var/www/fusionpbx/app/call_centers/resources/jobs/call_center_agents.php
*/
?>
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+24
View File
@@ -197,5 +197,29 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
?>
File diff suppressed because it is too large Load Diff
+12 -6
View File
@@ -3,29 +3,35 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Flows";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Flows";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "اتصل بالتدفقات";
$apps[$x]['menu'][$y]['title']['de-at'] = "Anruf Steuerung";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Call Flows";
$apps[$x]['menu'][$y]['title']['de-de'] = "Anruf Steuerung";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Flujo de Llamada";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Call Flows";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Circulation d'Appel";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "cinématiques d'Appel";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "Call Flows";
$apps[$x]['menu'][$y]['title']['it-it'] = "Deviatori di Chiamata";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep besturing";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przepływ rozmów";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Fluxo de chamadas";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Fluxos de chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Fluxuri de apeluri";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переключатель вызовов";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Samtalsflöden";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Потоки дзвінків";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "通话流程";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールフロー";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 흐름";
$apps[$x]['menu'][$y]['uuid'] = "b0939384-7055-44e8-8b4c-9f72293e1878";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_flows/call_flows.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$y++;
?>
+104 -68
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Lewis Hallam <lewishallam80@gmail.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
//check permissions
require_once "resources/check_auth.php";
@@ -43,8 +42,20 @@
$language = new text;
$text = $language->get();
//set the defaults
$call_flow_sound = '';
$call_flow_alternate_sound = '';
$call_flow_name = '';
$call_flow_extension = '';
$call_flow_feature_code = '';
$call_flow_pin_number = '';
$call_flow_label = '';
$call_flow_alternate_label = '';
$call_flow_description = '';
$call_flow_status = '';
//action add or update
if (is_uuid($_REQUEST["id"])) {
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
$call_flow_uuid = $_REQUEST["id"];
}
@@ -56,11 +67,11 @@
$destination = new destinations;
//get http post variables and set them to php variables
if (is_array($_POST)) {
if (!empty($_POST)) {
//set the variables from the http values
$call_flow_uuid = $_POST["call_flow_uuid"];
$dialplan_uuid = $_POST["dialplan_uuid"];
$call_flow_uuid = $_POST["call_flow_uuid"] ?? null;
$dialplan_uuid = $_POST["dialplan_uuid"] ?? null;
$call_flow_name = $_POST["call_flow_name"];
$call_flow_extension = $_POST["call_flow_extension"];
$call_flow_feature_code = $_POST["call_flow_feature_code"];
@@ -73,7 +84,7 @@
$call_flow_alternate_sound = $_POST["call_flow_alternate_sound"];
$call_flow_alternate_destination = $_POST["call_flow_alternate_destination"];
$call_flow_context = $_POST["call_flow_context"];
$call_flow_enabled = $_POST["call_flow_enabled"];
$call_flow_enabled = $_POST["call_flow_enabled"] ?? 'false';
$call_flow_description = $_POST["call_flow_description"];
//seperate the action and the param
@@ -88,7 +99,7 @@
}
//process the user data and save it to the database
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//get the uuid from the POST
if ($action == "update") {
@@ -105,25 +116,25 @@
//check for all required data
$msg = '';
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
//if (strlen($call_flow_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_uuid']."<br>\n"; }
//if (strlen($dialplan_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-dialplan_uuid']."<br>\n"; }
//if (strlen($call_flow_name) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_name']."<br>\n"; }
if (strlen($call_flow_extension) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_extension']."<br>\n"; }
if (strlen($call_flow_feature_code) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_feature_code']."<br>\n"; }
//if (strlen($call_flow_context) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_context']."<br>\n"; }
//if (strlen($call_flow_status) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_status']."<br>\n"; }
//if (strlen($call_flow_pin_number) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_pin_number']."<br>\n"; }
//if (strlen($call_flow_label) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_label']."<br>\n"; }
//if (strlen($call_flow_sound) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_sound']."<br>\n"; }
if (strlen($call_flow_app) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_app']."<br>\n"; }
if (strlen($call_flow_data) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_data']."<br>\n"; }
//if (strlen($call_flow_alternate_label) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_label']."<br>\n"; }
//if (strlen($call_flow_alternate_sound) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_sound']."<br>\n"; }
//if (strlen($call_flow_alternate_app) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_app']."<br>\n"; }
//if (strlen($call_flow_alternate_data) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_data']."<br>\n"; }
//if (strlen($call_flow_description) == 0) { $msg .= $text['message-required']." ".$text['label-call_flow_description']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
//if (empty($call_flow_uuid)) { $msg .= $text['message-required']." ".$text['label-call_flow_uuid']."<br>\n"; }
//if (empty($dialplan_uuid)) { $msg .= $text['message-required']." ".$text['label-dialplan_uuid']."<br>\n"; }
//if (empty($call_flow_name)) { $msg .= $text['message-required']." ".$text['label-call_flow_name']."<br>\n"; }
if (empty($call_flow_extension)) { $msg .= $text['message-required']." ".$text['label-call_flow_extension']."<br>\n"; }
if (empty($call_flow_feature_code)) { $msg .= $text['message-required']." ".$text['label-call_flow_feature_code']."<br>\n"; }
//if (empty($call_flow_context)) { $msg .= $text['message-required']." ".$text['label-call_flow_context']."<br>\n"; }
//if (empty($call_flow_status)) { $msg .= $text['message-required']." ".$text['label-call_flow_status']."<br>\n"; }
//if (empty($call_flow_pin_number)) { $msg .= $text['message-required']." ".$text['label-call_flow_pin_number']."<br>\n"; }
//if (empty($call_flow_label)) { $msg .= $text['message-required']." ".$text['label-call_flow_label']."<br>\n"; }
//if (empty($call_flow_sound)) { $msg .= $text['message-required']." ".$text['label-call_flow_sound']."<br>\n"; }
if (empty($call_flow_app)) { $msg .= $text['message-required']." ".($text['label-call_flow_app'] ?? '')."<br>\n"; }
if (empty($call_flow_data)) { $msg .= $text['message-required']." ".($text['label-call_flow_data'] ?? '')."<br>\n"; }
//if (empty($call_flow_alternate_label)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_label']."<br>\n"; }
//if (empty($call_flow_alternate_sound)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_sound']."<br>\n"; }
//if (empty($call_flow_alternate_app)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_app']."<br>\n"; }
//if (empty($call_flow_alternate_data)) { $msg .= $text['message-required']." ".$text['label-call_flow_alternate_data']."<br>\n"; }
//if (empty($call_flow_description)) { $msg .= $text['message-required']." ".$text['label-call_flow_description']."<br>\n"; }
if (!empty($msg) && empty($_POST["persistformvar"])) {
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -137,12 +148,12 @@
}
//add the call_flow_uuid
if (!is_uuid($call_flow_uuid)) {
if (empty($call_flow_uuid)) {
$call_flow_uuid = uuid();
}
//add the dialplan_uuid
if (!is_uuid($dialplan_uuid)) {
if (empty($dialplan_uuid)) {
$dialplan_uuid = uuid();
}
@@ -169,16 +180,16 @@
$destination_feature = str_replace("+", "\+", $destination_feature);
//build the xml dialplan
$dialplan_xml = "<extension name=\"".$call_flow_name."\" continue=\"\" uuid=\"".$dialplan_uuid."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$destination_feature."$\" break=\"on-true\">\n";
$dialplan_xml = "<extension name=\"".xml::sanitize($call_flow_name)."\" continue=\"\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($destination_feature)."$\" break=\"on-true\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"sleep\" data=\"200\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"feature_code=true\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".$call_flow_uuid."\"/>\n";
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".xml::sanitize($call_flow_uuid)."\"/>\n";
$dialplan_xml .= " <action application=\"lua\" data=\"call_flow.lua\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$destination_extension."$\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".$call_flow_uuid."\"/>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($destination_extension)."$\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"call_flow_uuid=".xml::sanitize($call_flow_uuid)."\"/>\n";
$dialplan_xml .= " <action application=\"lua\" data=\"call_flow.lua\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";
@@ -232,7 +243,7 @@
$database = new database;
$database->app_name = 'call_flows';
$database->app_uuid = 'b1b70f85-6b42-429b-8c5a-60c8b02b7d14';
if (strlen($call_flow_uuid) > 0) {
if (!empty($call_flow_uuid)) {
$database->uuid($call_flow_uuid);
}
$database->save($array);
@@ -242,6 +253,31 @@
$p->delete("dialplan_add", "temp");
$p->delete("dialplan_edit", "temp");
// Update subscribed endpoints
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
//send the event
$event = "sendevent PRESENCE_IN\n";
$event .= "proto: flow\n";
$event .= "event_type: presence\n";
$event .= "alt_event_type: dialog\n";
$event .= "Presence-Call-Direction: outbound\n";
$event .= "state: Active (1 waiting)\n";
$event .= "from: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
$event .= "login: flow+".$call_flow_feature_code."@".$_SESSION['domain_name']."\n";
$event .= "unique-id: ".$call_flow_uuid."\n";
if ($call_flow_status == "true") {
$event .= "answer-state: confirmed\n";
} else {
$event .= "answer-state: terminated\n";
}
event_socket_request($fp, $event);
//echo $event."<br />";
fclose($fp);
}
//debug info
//echo "<pre>";
//print_r($message);
@@ -271,10 +307,10 @@
header("Location: call_flows.php");
return;
}
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
} //(is_array($_POST) && empty($_POST["persistformvar"]))
//pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
if (!empty($_GET) && empty($_POST["persistformvar"])) {
$call_flow_uuid = $_GET["id"];
$sql = "select * from v_call_flows ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -324,10 +360,13 @@
}
//set the context for users that are not in the superadmin group
if (strlen($call_flow_context) == 0) {
if (empty($call_flow_context)) {
$call_flow_context = $_SESSION['domain_name'];
}
//set the defaults
if (empty($call_flow_enabled)) { $call_flow_enabled = 'true'; }
//get the recordings
$sql = "select recording_name, recording_filename from v_recordings ";
$sql .= "where domain_uuid = :domain_uuid ";
@@ -389,16 +428,16 @@
}
//recordings
$tmp_selected = false;
if (count($recordings) > 0) {
if (!empty($recordings)) {
echo "<optgroup label=".$text['recordings'].">\n";
foreach ($recordings as &$row) {
$recording_name = $row["recording_name"];
$recording_filename = $row["recording_filename"];
if ($var == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($var) > 0) {
if ($var == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && !empty($var)) {
$tmp_selected = true;
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
}
else if ($var == $recording_filename && strlen($var) > 0) {
else if ($var == $recording_filename && !empty($var)) {
$tmp_selected = true;
echo " <option value='".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
}
@@ -414,7 +453,7 @@
$database = new database;
$result = $database->select($sql, $parameters, 'all');
unset($parameters, $sql);
if (is_array($result)) {
if (!empty($result)) {
echo "<optgroup label='Phrases'>\n";
foreach ($result as &$row) {
if ($var == "phrase:".$row["phrase_uuid"]) {
@@ -431,10 +470,10 @@
if ($load_sound) {
$file = new file;
$sound_files = $file->sounds();
if (is_array($sound_files)) {
if (!empty($sound_files)) {
echo "<optgroup label=".$text["sounds"].">\n";
foreach ($sound_files as $value) {
if (strlen($value) > 0) {
if (!empty($value)) {
if (substr($var, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") {
$var = substr($var, 71);
}
@@ -452,7 +491,7 @@
}
//select
if (if_group("superadmin")) {
if (!$tmp_selected && strlen($var) > 0) {
if (!$tmp_selected && !empty($var)) {
echo "<optgroup label='Selected'>\n";
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$var)) {
echo " <option value='".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($var)."' selected='selected'>".escape($var)."</option>\n";
@@ -537,7 +576,7 @@
echo " <select class='formfld' name='call_flow_status'>\n";
echo " <option value=''></option>\n";
if ($call_flow_status == "true") {
if (strlen($call_flow_label) > 0) {
if (!empty($call_flow_label)) {
echo " <option value='true' selected='selected'>".escape($call_flow_label)."</option>\n";
}
else {
@@ -545,7 +584,7 @@
}
}
else {
if (strlen($call_flow_label) > 0) {
if (!empty($call_flow_label)) {
echo " <option value='true'>".escape($call_flow_label)."</option>\n";
}
else {
@@ -553,7 +592,7 @@
}
}
if ($call_flow_status == "false") {
if (strlen($call_flow_alternate_label) > 0) {
if (!empty($call_flow_alternate_label)) {
echo " <option value='false' selected='selected'>".escape($call_flow_alternate_label)."</option>\n";
}
else {
@@ -561,7 +600,7 @@
}
}
else {
if (strlen($call_flow_alternate_label) > 0) {
if (!empty($call_flow_alternate_label)) {
echo " <option value='false'>".escape($call_flow_alternate_label)."</option>\n";
}
else {
@@ -592,7 +631,7 @@
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_label' maxlength='255' value=\"".escape($call_flow_label)."\">\n";
echo "<br />\n";
echo $text['description-call_flow_label']."\n";
echo !empty($text['description-call_flow_label'])."\n";
echo "</td>\n";
echo "</tr>\n";
@@ -616,9 +655,9 @@
echo " ".$text['label-call_flow_destination']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$select_value = '';
//set the selected value
if (strlen($call_flow_app.$call_flow_data) > 0) {
$select_value = '';
if (!empty($call_flow_app) && !empty($call_flow_data)) {
$select_value = $call_flow_app.':'.$call_flow_data;
}
//show the destination list
@@ -661,7 +700,7 @@
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$select_value = '';
if (strlen($call_flow_alternate_app.$call_flow_alternate_data) > 0) {
if (!empty($call_flow_alternate_app) && !empty($call_flow_alternate_data)) {
$select_value = $call_flow_alternate_app.':'.$call_flow_alternate_data;
}
echo $destination->select('dialplan', 'call_flow_alternate_destination', $select_value);
@@ -689,21 +728,18 @@
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td width=\"70%\" class='vtable' align='left'>\n";
echo " <select class='formfld' name='call_flow_enabled'>\n";
if ($call_flow_enabled == "true") {
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='call_flow_enabled' name='call_flow_enabled' value='true' ".($call_flow_enabled == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span>\n";
echo " </label>\n";
}
else {
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <select class='formfld' id='call_flow_enabled' name='call_flow_enabled'>\n";
echo " <option value='true' ".($call_flow_enabled == 'true' ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
echo " <option value='false' ".($call_flow_enabled == 'false' ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
}
if ($call_flow_enabled == "false") {
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['option-false']."</option>\n";
}
echo " </select>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-call_flow_description']."\n";
@@ -711,7 +747,7 @@
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"".escape($call_flow_description)."\">\n";
echo "<br />\n";
echo $text['description-call_flow_description']."\n";
echo !empty($text['description-call_flow_description'])."\n";
echo "</td>\n";
echo "</tr>\n";
+35 -28
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2020
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/paging.php";
require_once "resources/check_auth.php";
@@ -43,16 +42,24 @@
$language = new text;
$text = $language->get();
//set additional variables
$show = $_GET["show"] ?? '';
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get search
$search = $_REQUEST['search'] ?? null;
//get posted data
if (is_array($_POST['call_flows'])) {
if (!empty($_POST['call_flows'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_flows = $_POST['call_flows'];
$toggle_field = $_POST['toggle_field'];
}
//process the http post data by action
if ($action != '' && is_array($call_flows) && @sizeof($call_flows) != 0) {
if (!empty($action) && !empty($call_flows)) {
switch ($action) {
case 'copy':
if (permission_exists('call_flow_add')) {
@@ -80,12 +87,12 @@
}
//get variables used to control the order
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search term
$search = strtolower($_GET["search"]);
if (strlen($search) > 0) {
$search = strtolower($search ?? '');
if (!empty($search)) {
$sql_search = "and (";
$sql_search .= "lower(call_flow_name) like :search ";
$sql_search .= "or lower(call_flow_extension) like :search ";
@@ -102,32 +109,32 @@
//prepare to page the results
$sql = "select count(*) from v_call_flows ";
$sql .= "where true ";
if ($_GET['show'] != "all" || !permission_exists('call_flow_all')) {
if ($show != "all" || !permission_exists('call_flow_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
$sql .= $sql_search;
$sql .= $sql_search ?? '';
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".urlencode($search);
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
if ($show == "all" && permission_exists('call_flow_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)', '*', $sql);
$sql = str_replace('count(*)', '*', $sql ?? '');
$sql .= order_by($order_by, $order, 'call_flow_name', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$call_flows = $database->select($sql, $parameters, 'all');
$call_flows = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//create token
@@ -171,7 +178,7 @@
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('call_flow_all')) {
if ($_GET['show'] == 'all') {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
@@ -211,10 +218,10 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit') || permission_exists('call_flow_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($call_flows ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($call_flows) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
if ($show == "all" && permission_exists('call_flow_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
}
echo th_order_by('call_flow_name', $text['label-call_flow_name'], $order_by, $order);
@@ -226,12 +233,12 @@
}
echo th_order_by('call_flow_enabled', $text['label-enabled'], $order_by, $order, null, "class='center'");
echo th_order_by('call_flow_description', $text['label-call_flow_description'], $order_by, $order, null, "class='hide-sm-dn'");
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($call_flows)) {
if (!empty($call_flows)) {
$x = 0;
foreach ($call_flows as $row) {
if (permission_exists('call_flow_edit')) {
@@ -244,8 +251,8 @@
echo " <input type='hidden' name='call_flows[$x][uuid]' value='".escape($row['call_flow_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_flow_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
if ($show == "all" && permission_exists('call_flow_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
@@ -278,7 +285,7 @@
echo escape($row['call_flow_enabled']);
}
echo " <td class='description overflow hide-sm-dn'>".escape($row['call_flow_description'])."&nbsp;</td>\n";
if (permission_exists('call_flow_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('call_flow_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
+37 -14
View File
@@ -60,16 +60,6 @@ if (!class_exists('call_flows')) {
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete records
*/
@@ -197,17 +187,20 @@ if (!class_exists('call_flows')) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, dialplan_uuid, call_flow_context from v_".$this->table." ";
if (!empty($uuids)) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as toggle, ";
$sql .= "dialplan_uuid, call_flow_feature_code, call_flow_context from v_".$this->table." ";
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
if (!empty($rows)) {
foreach ($rows as $row) {
$call_flows[$row['uuid']]['state'] = $row['toggle'];
$call_flows[$row['uuid']]['dialplan_uuid'] = $row['dialplan_uuid'];
$call_flows[$row['uuid']]['call_flow_feature_code'] = $row['call_flow_feature_code'];
$call_flow_contexts[] = $row['call_flow_context'];
}
}
@@ -263,7 +256,37 @@ if (!class_exists('call_flows')) {
//set message
message::add($text['message-toggle']);
}
unset($records, $call_flows);
unset($records);
//toggle the presence
if ($this->toggle_field != 'call_flow_enabled') {
foreach($call_flows as $uuid => $row) {
//prepare the event
$cmd = "sendevent PRESENCE_IN\n";
$cmd .= "proto: flow\n";
$cmd .= "login: ".$row['call_flow_feature_code']."@".$_SESSION['domain_name']."\n";
$cmd .= "from: ".$row['call_flow_feature_code']."@".$_SESSION['domain_name']."\n";
$cmd .= "status: Active (1 waiting)\n";
$cmd .= "rpid: unknown\n";
$cmd .= "event_type: presence\n";
$cmd .= "alt_event_type: dialog\n";
$cmd .= "event_count: 1\n";
$cmd .= "unique-id: ".uuid()."\n";
$cmd .= "Presence-Call-Direction: outbound\n";
if ($call_flow['state'] == 'true') {
$cmd .= "answer-state: confirmed\n";
}
else {
$cmd .= "answer-state: terminated\n";
}
//send the event
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$switch_result = event_socket_request($fp, $cmd);
}
}
unset($call_flows);
}
}
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+48
View File
@@ -80,5 +80,53 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_order'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default Follow Me Timeout value.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ed901e23-1abb-454c-b0d3-e986efed9f56";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_color_call_forward";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#2a9df4";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b65593fa-fe16-4380-936c-16d0d2e9bf48";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_color_follow_me";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#03c04a";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c21c0ab6-5d23-4079-ba4d-439547f81978";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_color_do_not_disturb";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#ea4c46";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d5dc5bcb-65ff-46a6-9d1a-c83b19c3782e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_color_active";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#d4d4d4";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "add25bdb-c0a5-44e7-adf0-87dea41955e7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_border_color";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "rgba(0,0,0,0)";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3b2384d4-be62-44a1-96dc-27bb470f9473";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "dashboard";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "call_forward_chart_border_width";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
?>
File diff suppressed because it is too large Load Diff
+9 -4
View File
@@ -3,7 +3,7 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Forward";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Forward";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "نداء إلى الأمام";
$apps[$x]['menu'][$y]['title']['de-at'] = "Rufumleitung";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Rufumleitung";
$apps[$x]['menu'][$y]['title']['de-de'] = "Rufumleitung";
@@ -11,23 +11,28 @@
$apps[$x]['menu'][$y]['title']['es-mx'] = "Reenvio de Llamadas";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Renvoi d'appel";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Renvoi d'appel";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "העבר שיחה";
$apps[$x]['menu'][$y]['title']['it-it'] = "Inoltro";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Oproep doorsturen";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Przekierowanie";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Encaminhamento de chamadas";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Encaminhamento de Chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Redirectionare apel";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Переадресация";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Vidarekoppling";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Переадресація";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "呼叫转移";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コールフォワード";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "착신 전환";
$apps[$x]['menu'][$y]['uuid'] = "4e4df00b-aafb-45a8-82c1-cdabc921889c";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_forward/call_forward.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "user";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
+131 -124
View File
@@ -1,40 +1,42 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
/*
FusionPBX
Version: MPL 1.1
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
The Original Code is FusionPBX
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021
the Initial Developer. All Rights Reserved.
The Original Code is FusionPBX
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021
the Initial Developer. All Rights Reserved.
//includes
include "root.php";
require_once "resources/require.php";
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//set default
$is_included = false;
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
//check permissions
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
else {
} else {
echo "access denied";
exit;
}
@@ -43,15 +45,13 @@
$language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
//get posted data
if (is_array($_POST['extensions'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$extensions = $_POST['extensions'];
}
//get posted data and set defaults
$action = $_POST['action'] ?? '';
$search = $_POST['search'] ?? '';
$extensions = $_POST['extensions'] ?? [];
//process the http post data by action
if ($action != '' && is_array($extensions) && @sizeof($extensions) != 0) {
if (!empty($action) && count($extensions) > 0) {
switch ($action) {
case 'toggle_call_forward':
if (permission_exists('call_forward')) {
@@ -73,145 +73,154 @@
break;
}
header('Location: call_forward.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: call_forward.php' . ($search != '' ? '?search=' . urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//get the search
$search = strtolower($_GET["search"]);
$search = strtolower($_GET["search"] ?? '');
//set the show variable
$show = $_GET['show'] ?? '';
//define select count query
$sql = "select count(*) from v_extensions ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
if ($show === "all" && permission_exists('call_forward_all')) {
$sql .= "where true ";
}
else {
} else {
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (strlen($search) > 0) {
if (!empty($search)) {
$sql .= "and ( ";
$sql .= "extension like :search ";
$sql .= "or lower(description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
$parameters['search'] = '%' . $search . '%';
}
$sql .= "and enabled = 'true' ";
if (!permission_exists('extension_edit')) {
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
if (!empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = '".$row['user']."' ";
foreach ($_SESSION['user']['extension'] as $row) {
if ($x > 0) {
$sql .= "or ";
}
$sql .= "extension = '" . $row['user'] . "' ";
$x++;
}
$sql .= ")";
}
else {
} else {
//used to hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$sql .= $sql_search;
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? null, 'column');
unset($parameters);
//prepare the paging
if ($is_included) {
$rows_per_page = 10;
$rows_per_page = !empty($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50;
if ($search) {
$params[] = "search=" . $search;
}
else {
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
if ($order_by) {
$params[] = "order_by=" . $order_by;
}
$params[] = "app_uuid=".$app_uuid;
if ($search) { $params[] = "search=".$search; }
if ($order_by) { $params[] = "order_by=".$order_by; }
if ($order) { $params[] = "order=".$order; }
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
$params[] .= "show=all";
if ($order) {
$params[] = "order=" . $order;
}
$param = $params ? implode('&', $params) : null;
if ($show == "all" && permission_exists('call_forward_all')) {
$params[] = "show=all";
}
$param = !empty($params) ? implode('&', $params) : '';
unset($params);
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
$page = $_GET['page'] ?? '';
if (empty($page)) {
$page = 0;
$_GET['page'] = 0;
}
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_extensions ";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
if ($show == "all" && permission_exists('call_forward_all')) {
$sql .= "where true ";
}
else {
} else {
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (strlen($search) > 0) {
if (!empty($search)) {
$sql .= "and ( ";
$sql .= "extension like :search ";
$sql .= "or lower(description) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
$parameters['search'] = '%' . $search . '%';
}
$sql .= "and enabled = 'true' ";
if (!permission_exists('extension_edit')) {
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
if (!empty($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = '".$row['user']."' ";
foreach ($_SESSION['user']['extension'] as $row) {
if ($x > 0) {
$sql .= "or ";
}
$sql .= "extension = '" . $row['user'] . "' ";
$x++;
}
$sql .= ")";
}
else {
} else {
//used to hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$sql .= $sql_search;
$sql .= order_by($order_by, $order, 'extension', 'asc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$extensions = $database->select($sql, $parameters, 'all');
$extensions = $database->select($sql, $parameters ?? null, 'all');
unset($parameters);
//if there are no extensions then set to empty array
if($extensions === false) {
$extensions = [];
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//include header
if (!$is_included) {
$document['title'] = $text['title-call_forward'];
$document['title'] = $text['title-call_forward'];
}
require_once "resources/header.php";
//show the content
if ($is_included) {
echo "<div class='action_bar sub'>\n";
echo " <div class='heading'><b>".$text['header-call_forward']."</b></div>\n";
echo " <div class='heading'><b>" . $text['header-call_forward'] . "</b></div>\n";
echo " <div class='actions'>\n";
if ($num_rows > 10) {
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/call_forward/call_forward.php']);
echo button::create(['type' => 'button', 'label' => $text['button-view_all'], 'icon' => 'project-diagram', 'collapse' => false, 'link' => PROJECT_PATH . '/app/call_forward/call_forward.php']);
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
}
else {
} else {
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['header-call_forward']." (".$num_rows.")</b></div>\n";
echo " <div class='heading'><b>" . $text['header-call_forward'] . " (" . $num_rows . ")</b></div>\n";
echo " <div class='actions'>\n";
if ($extensions) {
if (count($extensions) > 0) {
if (permission_exists('call_forward')) {
echo button::create(['type' => 'button', 'label' => $text['label-call_forward'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_cfwd', 'onclick' => "list_action_set('toggle_call_forward'); modal_open('modal-toggle','btn_toggle');"]);
}
@@ -222,87 +231,87 @@
echo button::create(['type' => 'button', 'label' => $text['label-dnd'], 'icon' => $_SESSION['theme']['button_icon_toggle'], 'collapse' => false, 'name' => 'btn_toggle_dnd', 'onclick' => "list_action_set('toggle_do_not_disturb'); modal_open('modal-toggle','btn_toggle');"]);
}
}
if ($_GET['show'] !== 'all' && permission_exists('call_forward_all')) {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all'.($params ? '&'.implode('&', $params) : null)]);
if ($show !== 'all' && permission_exists('call_forward_all')) {
echo button::create(['type' => 'button', 'label' => $text['button-show_all'], 'icon' => $_SESSION['theme']['button_icon_all'], 'link' => '?show=all' . $param]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
echo "<form id='form_search' class='inline' method='get'>\n";
if ($show == 'all' && permission_exists('call_forward_all')) {
echo " <input type='hidden' name='show' value='all'>";
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search']);
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"" . escape($search) . "\" placeholder=\"" . $text['label-search'] . "\" onkeydown=''>";
echo button::create(['label' => $text['button-search'], 'icon' => $_SESSION['theme']['button_icon_search'], 'type' => 'submit', 'id' => 'btn_search']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_forward.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
if (!empty($paging_controls_mini)) {
echo "<span style='margin-left: 15px;'>" . $paging_controls_mini . "</span>";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if ($extensions) {
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_form_submit('form_list');"])]);
if (count($extensions) > 0) {
echo modal::create(['id' => 'modal-toggle', 'type' => 'toggle', 'actions' => button::create(['type' => 'button', 'label' => $text['button-continue'], 'icon' => 'check', 'id' => 'btn_toggle', 'style' => 'float: right; margin-left: 15px;', 'collapse' => 'never', 'onclick' => "modal_close(); list_form_submit('form_list');"])]);
}
echo $text['description-call_routing']."\n";
echo $text['description-call_routing'] . "\n";
echo "<br /><br />\n";
echo "<form id='form_list' method='post'>\n";
if ($_GET['show'] == 'all' && permission_exists('call_forward_all')) {
if ($show == 'all' && permission_exists('call_forward_all')) {
echo " <input type='hidden' name='show' value='all'>";
}
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<input type='hidden' name='search' value=\"" . escape($search) . "\">\n";
}
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (!$is_included) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($extensions ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' " . (empty($extensions) ?: "style='visibility: hidden;'") . ">\n";
echo " </th>\n";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
echo "<th>".$text['label-domain']."</th>\n";
if ($show == "all" && permission_exists('call_forward_all')) {
echo "<th>" . $text['label-domain'] . "</th>\n";
}
}
echo " <th>".$text['label-extension']."</th>\n";
echo " <th>" . $text['label-extension'] . "</th>\n";
if (permission_exists('call_forward')) {
echo " <th>".$text['label-call_forward']."</th>\n";
echo " <th>" . $text['label-call_forward'] . "</th>\n";
}
if (permission_exists('follow_me')) {
echo " <th>".$text['label-follow_me']."</th>\n";
echo " <th>" . $text['label-follow_me'] . "</th>\n";
}
if (permission_exists('do_not_disturb')) {
echo " <th>".$text['label-dnd']."</th>\n";
echo " <th>" . $text['label-dnd'] . "</th>\n";
}
echo " <th class='".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".$text['label-description']."</th>\n";
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <th class='" . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . $text['label-description'] . "</th>\n";
$list_row_edit_button = $_SESSION['theme']['list_row_edit_button']['boolean'] ?? 'false';
if ( $list_row_edit_button === 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($extensions)) {
if (!empty($extensions)) {
$x = 0;
foreach($extensions as $row) {
$list_row_url = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']);
echo "<tr class='list-row' href='".$list_row_url."'>\n";
foreach ($extensions as $row) {
$list_row_url = PROJECT_PATH . "/app/call_forward/call_forward_edit.php?id=" . $row['extension_uuid'] . "&return_url=" . urlencode($_SERVER['REQUEST_URI']);
echo "<tr class='list-row' href='" . $list_row_url . "'>\n";
if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='extensions[$x][uuid]' value='".escape($row['extension_uuid'])."' />\n";
echo " <input type='checkbox' name='extensions[$x][checked]' id='checkbox_" . $x . "' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='extensions[$x][uuid]' value='" . escape($row['extension_uuid']) . "' />\n";
echo " </td>\n";
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
if ($show == "all" && permission_exists('call_forward_all')) {
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
} else {
$domain = $text['label-global'];
}
echo " <td>".escape($domain)."</td>\n";
echo " <td>" . escape($domain) . "</td>\n";
}
}
echo " <td><a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
echo " <td><a href='" . $list_row_url . "' title=\"" . $text['button-edit'] . "\">" . escape($row['extension']) . "</a></td>\n";
if (permission_exists('call_forward')) {
//-- inline toggle -----------------
//$button_label = $row['forward_all_enabled'] == 'true' ? ($row['forward_all_destination'] != '' ? escape(format_phone($row['forward_all_destination'])) : '('.$text['label-invalid'].')') : null;
@@ -345,7 +354,6 @@
//}
//unset($button_label);
//----------------------------------
//get destination count
$follow_me_destination_count = 0;
if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
@@ -355,11 +363,11 @@
$parameters['follow_me_uuid'] = $row['follow_me_uuid'];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$follow_me_destination_count = $database->select($sql, $parameters, 'column');
$follow_me_destination_count = $database->select($sql, $parameters ?? null, 'column');
unset($sql, $parameters);
}
echo " <td>\n";
echo $follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : '&nbsp;';
echo $follow_me_destination_count ? $text['label-enabled'] . ' (' . $follow_me_destination_count . ')' : '&nbsp;';
echo " </td>\n";
}
if (permission_exists('do_not_disturb')) {
@@ -379,10 +387,10 @@
echo $row['do_not_disturb'] == 'true' ? $text['label-enabled'] : '&nbsp;';
echo " </td>\n";
}
echo " <td class='description overflow ".($is_included ? 'hide-md-dn' : 'hide-sm-dn')."'>".escape($row['description'])."&nbsp;</td>\n";
if ($_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='description overflow " . ($is_included ? 'hide-md-dn' : 'hide-sm-dn') . "'>" . escape($row['description']) . "&nbsp;</td>\n";
if ($list_row_edit_button === 'true') {
echo " <td class='action-button'>";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo button::create(['type' => 'button', 'title' => $text['button-edit'], 'icon' => $_SESSION['theme']['button_icon_edit'], 'link' => $list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";
@@ -395,13 +403,12 @@
if (!$is_included) {
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<div align='center'>" . $paging_controls . "</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "<input type='hidden' name='" . $token['name'] . "' value='" . $token['hash'] . "'>\n";
echo "</form>\n";
require_once "resources/footer.php";
}
?>
+116 -62
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2021
Portions created by the Initial Developer are Copyright (C) 2008-2022
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -25,9 +25,8 @@
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -45,7 +44,7 @@
//define the destination_select function
function destination_select($select_name, $select_value, $select_default) {
if (strlen($select_value) == 0) { $select_value = $select_default; }
if (empty($select_value)) { $select_value = $select_default; }
echo " <select class='formfld' style='width: 55px;' name='$select_name'>\n";
$i = 0;
while($i <= 100) {
@@ -83,7 +82,7 @@
$parameters['extension_uuid'] = $extension_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && sizeof($row) != 0) {
if (!empty($row)) {
$extension = $row["extension"];
$number_alias = $row["number_alias"];
$accountcode = $row["accountcode"];
@@ -91,7 +90,7 @@
$effective_caller_id_number = $row["effective_caller_id_number"];
$outbound_caller_id_name = $row["outbound_caller_id_name"];
$outbound_caller_id_number = $row["outbound_caller_id_number"];
$do_not_disturb = $row["do_not_disturb"] != '' ? $row["do_not_disturb"] : 'false';
$do_not_disturb = !empty($row["do_not_disturb"]) ? $row["do_not_disturb"] : 'false';
$forward_all_destination = $row["forward_all_destination"];
$forward_all_enabled = $row["forward_all_enabled"];
$forward_busy_destination = $row["forward_busy_destination"];
@@ -109,10 +108,10 @@
unset($sql, $parameters, $row);
//process post vars
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (!empty($_POST) && empty($_POST["persistformvar"])) {
//get http post variables and set them to php variables
if (count($_POST) > 0) {
if (!empty($_POST)) {
$forward_all_enabled = $_POST["forward_all_enabled"];
$forward_all_destination = $_POST["forward_all_destination"];
$forward_busy_enabled = $_POST["forward_busy_enabled"];
@@ -122,8 +121,8 @@
$forward_user_not_registered_enabled = $_POST["forward_user_not_registered_enabled"];
$forward_user_not_registered_destination = $_POST["forward_user_not_registered_destination"];
$cid_name_prefix = $_POST["cid_name_prefix"];
$cid_number_prefix = $_POST["cid_number_prefix"];
$cid_name_prefix = $_POST["cid_name_prefix"] ?? '';
$cid_number_prefix = $_POST["cid_number_prefix"] ?? '';
$follow_me_enabled = $_POST["follow_me_enabled"];
$follow_me_ignore_busy = $_POST["follow_me_ignore_busy"];
@@ -135,7 +134,7 @@
$destinations[$n]['delay'] = $field['delay'];
$destinations[$n]['prompt'] = $field['prompt'];
$destinations[$n]['timeout'] = $field['timeout'];
if ($field['destination'] != '') {
if (!empty($field['destination'])) {
$destination_found = true;
}
$n++;
@@ -152,8 +151,8 @@
}
//check for all required data
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
$document['title'] = $text['title-call_routing'];
if (!empty($msg) && empty($_POST["persistformvar"])) {
$document['title'] = $text['title-call_forward'];
require_once "resources/header.php";
require_once "resources/persist_form_var.php";
echo "<div align='center'>\n";
@@ -231,7 +230,7 @@
$d = 0;
$destination_found = false;
foreach ($destinations as $field) {
if ($field['destination'] != '') {
if (!empty($field['destination'])) {
//sanitize the destination
$field['destination'] = preg_replace('#[^\*0-9]#', '', $field['destination']);
@@ -259,22 +258,21 @@
//save the data
$database = new database;
$database->app_name = 'call_routing';
$database->app_name = 'call_forward';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//$message = $database->message;
//remove the temporary permission
$p->delete("extension_edit", "temp");
//delete empty destination records
if (is_array($follow_me_delete_uuids) && sizeof($follow_me_delete_uuids) > 0) {
if (!empty($follow_me_delete_uuids)) {
foreach ($follow_me_delete_uuids as $follow_me_delete_uuid) {
$array['follow_me_destinations'][]['follow_me_destination_uuid'] = $follow_me_delete_uuid;
}
$database = new database;
$database->app_name = 'call_routing';
$database->app_name = 'call_forward';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->delete($array);
unset($array);
@@ -348,7 +346,7 @@
*/
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
$ring_count = ceil($call_timeout / 6);
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@@ -383,8 +381,55 @@
unset($feature_event_notify);
}
//send presence event
if (permission_exists('do_not_disturb')) {
if ($dnd_enabled == 'true') {
//build the event
$cmd = "sendevent PRESENCE_IN\n";
$cmd .= "proto: sip\n";
$cmd .= "login: ".$extension."@".$_SESSION['domain_name']."\n";
$cmd .= "from: ".$extension."@".$_SESSION['domain_name']."\n";
$cmd .= "status: Active (1 waiting)\n";
$cmd .= "rpid: unknown\n";
$cmd .= "event_type: presence\n";
$cmd .= "alt_event_type: dialog\n";
$cmd .= "event_count: 1\n";
$cmd .= "unique-id: ".uuid()."\n";
$cmd .= "Presence-Call-Direction: outbound\n";
$cmd .= "answer-state: confirmed\n";
//send the event
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$switch_result = event_socket_request($fp, $cmd);
unset($fp);
}
else {
$presence = new presence;
if (!$presence->active($extension."@".$_SESSION['domain_name'])) {
//build the event
$cmd = "sendevent PRESENCE_IN\n";
$cmd .= "proto: sip\n";
$cmd .= "login: ".$extension."@".$_SESSION['domain_name']."\n";
$cmd .= "from: ".$extension."@".$_SESSION['domain_name']."\n";
$cmd .= "status: Active (1 waiting)\n";
$cmd .= "rpid: unknown\n";
$cmd .= "event_type: presence\n";
$cmd .= "alt_event_type: dialog\n";
$cmd .= "event_count: 1\n";
$cmd .= "unique-id: ".uuid()."\n";
$cmd .= "Presence-Call-Direction: outbound\n";
$cmd .= "answer-state: terminated\n";
//send the event
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$switch_result = event_socket_request($fp, $cmd);
unset($fp);
}
}
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
@@ -394,7 +439,7 @@
//clear the cache
$cache = new cache;
$cache->delete("directory:".$extension."@".$_SESSION['domain_name']);
if (strlen($number_alias) > 0) {
if (!empty($number_alias)) {
$cache->delete("directory:".$number_alias."@".$_SESSION['domain_name']);
}
@@ -403,11 +448,11 @@
}
//show the header
$document['title'] = $text['title-call_routing'];
$document['title'] = $text['title-call_forward'];
require_once "resources/header.php";
//pre-populate the form
if (is_uuid($follow_me_uuid)) {
if (!empty($follow_me_uuid) && is_uuid($follow_me_uuid)) {
$sql = "select * from v_follow_me ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and follow_me_uuid = :follow_me_uuid ";
@@ -417,7 +462,7 @@
$row = $database->select($sql, $parameters, 'row');
unset($sql, $parameters);
if (is_array($row) && sizeof($row) != 0) {
if (!empty($row)) {
$cid_name_prefix = $row["cid_name_prefix"];
$cid_number_prefix = $row["cid_number_prefix"];
$follow_me_enabled = $row["follow_me_enabled"];
@@ -442,6 +487,15 @@
unset($sql, $parameters, $result, $row);
}
}
//add the pre-defined follow me destinations
for ($n = 0; $n <= (((!empty($_SESSION['follow_me']['max_destinations']['numeric'])) ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
if (empty($destinations[$n]['uuid'])) { $destinations[$n]['uuid'] = null; }
if (empty($destinations[$n]['destination'])) { $destinations[$n]['destination'] = null; }
if (empty($destinations[$n]['delay'])) { $destinations[$n]['delay'] = null; }
if (empty($destinations[$n]['prompt'])) { $destinations[$n]['prompt'] = null; }
if (empty($destinations[$n]['timeout'])) { $destinations[$n]['timeout'] = 30; }
}
//get the extensions array - used with autocomplete
$sql = "select * from v_extensions ";
@@ -453,36 +507,35 @@
unset($sql, $parameters, $row);
//set the default
if (!isset($dnd_enabled)) {
if (empty($dnd_enabled)) {
//set the value from the database
$dnd_enabled = $do_not_disturb;
}
//prepare the autocomplete
if($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
echo "<script type=\"text/javascript\">\n";
echo "\$(function() {\n";
echo " var extensions = [\n";
foreach ($extensions as &$row) {
if (strlen($number_alias) == 0) {
echo " \"".escape($row["extension"])."\",\n";
if(!empty($_SESSION['follow_me']['follow_me_autocomplete']['boolean']) && $_SESSION['follow_me']['follow_me_autocomplete']['boolean'] == 'true') {
echo "<link rel=\"stylesheet\" href=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.css\" />\n";
echo "<script src=\"".PROJECT_PATH."/resources/jquery/jquery-ui.min.js\"></script>\n";
echo "<script type=\"text/javascript\">\n";
echo "\$(function() {\n";
echo " var extensions = [\n";
foreach ($extensions as &$row) {
if (empty($number_alias)) {
echo " \"".escape($row["extension"])."\",\n";
}
else {
echo " \"".escape($row["number_alias"])."\",\n";
}
}
else {
echo " \"".escape($row["number_alias"])."\",\n";
echo " ];\n";
for ($n = 0; $n <= (((!empty($_SESSION['follow_me']['max_destinations']['numeric'])) ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
echo " \$(\"#destination_".$n."\").autocomplete({\n";
echo " source: extensions\n";
echo " });\n";
}
}
echo " ];\n";
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
echo " \$(\"#destination_".$n."\").autocomplete({\n";
echo " source: extensions\n";
echo " });\n";
}
echo "});\n";
echo "</script>\n";
echo "});\n";
echo "</script>\n";
}
//create token
@@ -511,10 +564,10 @@
echo " <strong>".$text['label-call_forward']."</strong>\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
$on_click .= "$('#tr_follow_me_settings').slideUp('fast'); ";
$on_click = "$('#tr_follow_me_settings').slideUp('fast'); ";
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
$on_click .= "document.getElementById('forward_all_destination').focus(); ";
$on_click2 .= "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
$on_click2 = "(document.getElementById('follow_me_enabled').checked) ? $('#tr_follow_me_settings').slideDown('fast') : '' ";
echo " <label for='forward_all_disabled'><input type='radio' name='forward_all_enabled' id='forward_all_disabled' onclick=\"$on_click2\" value='false' ".(($forward_all_enabled == "false" || $forward_all_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='forward_all_enabled'><input type='radio' name='forward_all_enabled' id='forward_all_enabled' onclick=\"$on_click\" value='true' ".(($forward_all_enabled == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
unset($on_click);
@@ -580,14 +633,14 @@
echo "<td class='vtable' align='left'>\n";
$on_click = "document.getElementById('forward_all_disabled').checked=true; ";
$on_click .= "document.getElementById('dnd_disabled').checked=true; ";
echo " <label for='follow_me_disabled'><input type='radio' name='follow_me_enabled' id='follow_me_disabled' onclick=\"$('#tr_follow_me_settings').slideUp('fast');\" value='false' ".(($follow_me_enabled == "false" || $follow_me_enabled == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_enabled'><input type='radio' name='follow_me_enabled' id='follow_me_enabled' onclick=\"$('#tr_follow_me_settings').slideDown('fast'); $on_click\" value='true' ".(($follow_me_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
echo " <label for='follow_me_disabled'><input type='radio' name='follow_me_enabled' id='follow_me_disabled' onclick=\"$('#tr_follow_me_settings').slideUp('fast');\" value='false' ".((!empty($follow_me_enabled) && $follow_me_enabled == "false" || empty($follow_me_enabled)) ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_enabled'><input type='radio' name='follow_me_enabled' id='follow_me_enabled' onclick=\"$('#tr_follow_me_settings').slideDown('fast'); $on_click\" value='true' ".((!empty($follow_me_enabled) && $follow_me_enabled == "true") ? "checked='checked'" : null)."/> ".$text['label-enabled']."</label> \n";
unset($on_click);
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
if ($follow_me_enabled == "true" && $dnd_enabled != "true" && $forward_all_enabled != "true") { $style = ''; } else { $style = 'display: none;'; }
if (!empty($follow_me_enabled) && $follow_me_enabled == "true" && $dnd_enabled != "true" && $forward_all_enabled != "true") { $style = ''; } else { $style = 'display: none;'; }
echo "<div id='tr_follow_me_settings' style='$style'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
@@ -608,21 +661,22 @@
echo " </tr>\n";
//output destinations
for ($n = 0; $n <= ((($_SESSION['follow_me']['max_destinations']['numeric'] != '') ? $_SESSION['follow_me']['max_destinations']['numeric'] : 5) - 1); $n++) {
echo " <input type='hidden' name='destinations[".$n."][uuid]' value='".(($destinations[$n]['uuid'] != '') ? $destinations[$n]['uuid'] : uuid())."'>\n";
$on_click = "";
foreach ($destinations as $n => $destination) {
echo " <input type='hidden' name='destinations[".$n."][uuid]' value='".((!empty($destination['uuid'])) ? $destination['uuid'] : uuid())."'>\n";
echo " <tr>\n";
echo " <td><input class='formfld' style='min-width: 135px;' type='text' name='destinations[".$n."][destination]' id='destination_".$n."' maxlength='255' value=\"".escape($destinations[$n]['destination'])."\"></td>\n";
echo " <td><input class='formfld' style='min-width: 135px;' type='text' name='destinations[".$n."][destination]' id='destination_".$n."' maxlength='255' value=\"".escape($destination['destination'])."\"></td>\n";
echo " <td>\n";
destination_select('destinations['.$n.'][delay]', $destinations[$n]['delay'], '0');
destination_select('destinations['.$n.'][delay]', $destination['delay'], '0');
echo " </td>\n";
echo " <td>\n";
destination_select('destinations['.$n.'][timeout]', $destinations[$n]['timeout'], (($_SESSION['follow_me']['timeout']['numeric'] != '') ? $_SESSION['follow_me']['timeout']['numeric'] : 30));
destination_select('destinations['.$n.'][timeout]', $destination['timeout'], ((!empty($_SESSION['follow_me']['timeout']['numeric'])) ? $_SESSION['follow_me']['timeout']['numeric'] : 30));
echo " </td>\n";
if (permission_exists('follow_me_prompt')) {
echo " <td>\n";
echo " <select class='formfld' style='width: 90px;' name='destinations[".$n."][prompt]'>\n";
echo " <option value=''></option>\n";
echo " <option value='1' ".(($destinations[$n]['prompt'])?"selected='selected'":null).">".$text['label-destination_prompt_confirm']."</option>\n";
echo " <option value='1' ".(($destination['prompt']) ? "selected='selected'" : null).">".$text['label-destination_prompt_confirm']."</option>\n";
//echo " <option value='2'>".$text['label-destination_prompt_announce]."</option>\n";
echo " </select>\n";
echo " </td>\n";
@@ -640,8 +694,8 @@
echo $text['label-ignore_busy'];
echo " </td>\n";
echo " <td class='vtable' align='left'>\n";
echo " <label for='follow_me_ignore_busy_false'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_false' value='false' onclick=\"\" ".(($follow_me_ignore_busy == "false" || $follow_me_ignore_busy == "") ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_ignore_busy_true'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_true' value='true' onclick=\"$on_click\" ".(($follow_me_ignore_busy == "true") ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
echo " <label for='follow_me_ignore_busy_false'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_false' value='false' onclick=\"\" ".(empty($follow_me_ignore_busy) || $follow_me_ignore_busy == "false" ? "checked='checked'" : null)." /> ".$text['label-disabled']."</label> \n";
echo " <label for='follow_me_ignore_busy_true'><input type='radio' name='follow_me_ignore_busy' id='follow_me_ignore_busy_true' value='true' onclick=\"".$on_click."\" ".(!empty($follow_me_ignore_busy) && $follow_me_ignore_busy == "true" ? "checked='checked'" : null)." /> ".$text['label-enabled']."</label> \n";
echo " <br />\n";
echo $text['description-ignore_busy']."\n";
echo " </td>\n";
@@ -696,7 +750,7 @@
echo "</table>";
echo "<br /><br />";
if ($action == "update") {
if (!empty($action) && $action == "update") {
echo "<input type='hidden' name='id' value='".escape($extension_uuid)."'>\n";
}
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
@@ -1,279 +1,277 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
/*
FusionPBX
Version: MPL 1.1
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
The Original Code is FusionPBX
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2016
All Rights Reserved.
The Original Code is FusionPBX
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Errol Samuels <voiptology@gmail.com>
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2023
All Rights Reserved.
*/
include "root.php";
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
Errol Samuels <voiptology@gmail.com>
*/
//define the call_forward class
class call_forward {
// set class constants
const APP_NAME = 'calls';
const APP_UUID = '19806921-e8ed-dcff-b325-dd3e5da4959d';
const PERMISSION = 'call_forward';
const LIST_PAGE = 'calls.php';
const TABLE = 'extensions';
const UUID_PREFIX = 'extension_';
const TOGGLE_FIELD = 'forward_all_enabled';
const TOGGLE_VALUES = ['true', 'false'];
public $debug;
public $domain_uuid;
public $domain_name;
public $extension_uuid;
private $extension;
private $number_alias;
public $forward_all_destination;
public $forward_all_enabled;
private $toll_allow;
public $accountcode;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
public function set() {
//determine whether to update the dial string
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and extension_uuid = :extension_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$parameters['extension_uuid'] = $this->extension_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$this->extension = $row["extension"];
$this->number_alias = $row["number_alias"];
$this->accountcode = $row["accountcode"];
$this->toll_allow = $row["toll_allow"];
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
}
unset($sql, $parameters, $row);
//build extension update array
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
$array['extensions'][0]['forward_all_destination'] = strlen($this->forward_all_destination) != 0 ? $this->forward_all_destination : null;
if (strlen($this->forward_all_destination) == 0 || $this->forward_all_enabled == "false") {
$array['extensions'][0]['forward_all_enabled'] = 'false';
}
else {
$array['extensions'][0]['forward_all_enabled'] = 'true';
}
//grant temporary permissions
$p = new permissions;
$p->add('extension_add', 'temp');
//execute update
$database = new database;
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_add', 'temp');
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$this->extension."@".$this->domain_name);
if(strlen($this->number_alias) > 0){
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
}
}
/**
* declare private variables
*/
private $app_name;
private $app_uuid;
private $permission;
private $list_page;
private $table;
private $uuid_prefix;
private $toggle_field;
private $toggle_values;
private $extension;
private $number_alias;
private $toll_allow;
/**
* toggle records
*/
public function toggle($records) {
public function set() {
//create the database connection
$database = new database;
//assign private variables
$this->app_name = 'calls';
$this->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$this->permission = 'call_forward';
$this->list_page = 'calls.php';
$this->table = 'extensions';
$this->uuid_prefix = 'extension_';
$this->toggle_field = 'forward_all_enabled';
$this->toggle_values = ['true','false'];
if (permission_exists($this->permission)) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: '.$this->list_page);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, extension, number_alias, ";
$sql .= "call_timeout, do_not_disturb, ";
$sql .= "forward_all_enabled, forward_all_destination, ";
$sql .= "forward_busy_enabled, forward_busy_destination, ";
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
$sql .= $this->toggle_field." as toggle, follow_me_uuid ";
$sql .= "from v_".$this->table." ";
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$sql .= "and ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$extensions[$row['uuid']]['extension'] = $row['extension'];
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
$extensions[$row['uuid']]['state'] = $row['toggle'];
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach ($extensions as $uuid => $extension) {
//check destination
$destination_exists = $extension['forward_all_destination'] != '' ? true : false;
//determine new state
$new_state = $extension['state'] == $this->toggle_values[1] && $destination_exists ? $this->toggle_values[0] : $this->toggle_values[1];
//toggle feature
if ($new_state != $extension['state']) {
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $new_state;
}
//disable other features
if ($new_state == $this->toggle_values[0]) { //true
$array[$this->table][$x]['do_not_disturb'] = $this->toggle_values[1]; //false
$array[$this->table][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
if (is_uuid($extension['follow_me_uuid'])) {
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
$array['follow_me'][$x]['follow_me_enabled'] = $this->toggle_values[1]; //false
}
}
//increment counter
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension['extension'];
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
foreach ($extensions as $uuid => $extension) {
$cache->delete("directory:".$extension['extension']."@".$_SESSION['domain_name']);
if ($extension['number_alias'] != '') {
$cache->delete("directory:".$extension['number_alias']."@".$_SESSION['domain_name']);
}
}
//set message
message::add($text['message-toggle']);
}
unset($records, $extensions, $extension);
}
//determine whether to update the dial string
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and extension_uuid = :extension_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$parameters['extension_uuid'] = $this->extension_uuid;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$this->extension = $row["extension"];
$this->number_alias = $row["number_alias"];
$this->accountcode = $row["accountcode"];
$this->toll_allow = $row["toll_allow"];
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
}
unset($sql, $parameters, $row);
//build extension update array
$array['extensions'][0]['extension_uuid'] = $this->extension_uuid;
$array['extensions'][0]['forward_all_destination'] = strlen($this->forward_all_destination) != 0 ? $this->forward_all_destination : null;
if (empty($this->forward_all_destination) || $this->forward_all_enabled == "false") {
$array['extensions'][0]['forward_all_enabled'] = 'false';
} else {
$array['extensions'][0]['forward_all_enabled'] = 'true';
}
} //function
//grant temporary permissions
$p = new permissions;
$p->add('extension_add', 'temp');
}// class
//execute update
$database->app_name = 'calls';
$database->app_uuid = '19806921-e8ed-dcff-b325-dd3e5da4959d';
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_add', 'temp');
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:" . $this->extension . "@" . $this->domain_name);
if (!empty($this->number_alias)) {
$cache->delete("directory:" . $this->number_alias . "@" . $this->domain_name);
}
}
/**
* Toggle an array of call_forward records
* @param array $records array of records to toggle
*/
public function toggle(array $records) {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'], 'negative');
header('Location: ' . self::LIST_PAGE);
exit;
}
//validate there are records to process
if (count($records) < 1) return;
//check we have permission for this action
if (permission_exists(self::PERMISSION)) {
//create the database connection
$database = new database;
//add multi-lingual support
$language = new text;
$text = $language->get();
// initialize an empty array
$uuids = [];
$extensions = [];
//get current toggle state
foreach ($records as $x => $record) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'" . $record['uuid'] . "'";
}
}
//toggle the checked records
if (count($uuids) > 0) {
$sql = "select " . self::UUID_PREFIX . "uuid as uuid, extension, number_alias, ";
$sql .= "call_timeout, do_not_disturb, ";
$sql .= "forward_all_enabled, forward_all_destination, ";
$sql .= "forward_busy_enabled, forward_busy_destination, ";
$sql .= "forward_no_answer_enabled, forward_no_answer_destination, ";
$sql .= self::TOGGLE_FIELD . " as toggle, follow_me_uuid ";
$sql .= "from v_" . self::TABLE . " ";
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$sql .= "and " . self::UUID_PREFIX . "uuid in (" . implode(', ', $uuids) . ") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$rows = $database->select($sql, $parameters, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$extensions[$row['uuid']]['extension'] = $row['extension'];
$extensions[$row['uuid']]['number_alias'] = $row['number_alias'];
$extensions[$row['uuid']]['call_timeout'] = $row['call_timeout'];
$extensions[$row['uuid']]['do_not_disturb'] = $row['do_not_disturb'];
$extensions[$row['uuid']]['forward_all_enabled'] = $row['forward_all_enabled'];
$extensions[$row['uuid']]['forward_all_destination'] = $row['forward_all_destination'];
$extensions[$row['uuid']]['forward_busy_enabled'] = $row['forward_busy_enabled'];
$extensions[$row['uuid']]['forward_busy_destination'] = $row['forward_busy_destination'];
$extensions[$row['uuid']]['forward_no_answer_enabled'] = $row['forward_no_answer_enabled'];
$extensions[$row['uuid']]['forward_no_answer_destination'] = $row['forward_no_answer_destination'];
$extensions[$row['uuid']]['state'] = $row['toggle'];
$extensions[$row['uuid']]['follow_me_uuid'] = $row['follow_me_uuid'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach ($extensions as $uuid => $extension) {
//check destination
$destination_exists = $extension['forward_all_destination'] != '' ? true : false;
//determine new state
$new_state = $extension['state'] == self::TOGGLE_VALUES[1] && $destination_exists ? self::TOGGLE_VALUES[0] : self::TOGGLE_VALUES[1];
//toggle feature
if ($new_state != $extension['state']) {
$array[self::TABLE][$x][self::UUID_PREFIX . 'uuid'] = $uuid;
$array[self::TABLE][$x][self::TOGGLE_FIELD] = $new_state;
}
//disable other features
if ($new_state == self::TOGGLE_VALUES[0]) { //true
$array[self::TABLE][$x]['do_not_disturb'] = self::TOGGLE_VALUES[1]; //false
$array[self::TABLE][$x]['follow_me_enabled'] = self::TOGGLE_VALUES[1]; //false
if (is_uuid($extension['follow_me_uuid'])) {
$array['follow_me'][$x]['follow_me_uuid'] = $extension['follow_me_uuid'];
$array['follow_me'][$x]['follow_me_enabled'] = self::TOGGLE_VALUES[1]; //false
}
}
//increment counter
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//grant temporary permissions
$p = new permissions;
$p->add('extension_edit', 'temp');
//save the array
$database->app_name = self::APP_NAME;
$database->app_uuid = self::APP_UUID;
$database->save($array);
unset($array);
//revoke temporary permissions
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
$feature_event_notify->extension = $extension['extension'];
$feature_event_notify->do_not_disturb = $extension['do_not_disturb'];
$feature_event_notify->ring_count = ceil($extension['call_timeout'] / 6);
$feature_event_notify->forward_all_enabled = $extension['forward_all_enabled'];
$feature_event_notify->forward_busy_enabled = $extension['forward_busy_enabled'];
$feature_event_notify->forward_no_answer_enabled = $extension['forward_no_answer_enabled'];
//workarounds: send 0 as freeswitch doesn't send NOTIFY when destination values are nil
$feature_event_notify->forward_all_destination = $extension['forward_all_destination'] != '' ? $extension['forward_all_destination'] : '0';
$feature_event_notify->forward_busy_destination = $extension['forward_busy_destination'] != '' ? $extension['forward_busy_destination'] : '0';
$feature_event_notify->forward_no_answer_destination = $extension['forward_no_answer_destination'] != '' ? $extension['forward_no_answer_destination'] : '0';
$feature_event_notify->send_notify();
unset($feature_event_notify);
}
}
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//clear the cache
$cache = new cache;
foreach ($extensions as $uuid => $extension) {
$cache->delete("directory:" . $extension['extension'] . "@" . $_SESSION['domain_name']);
if ($extension['number_alias'] != '') {
$cache->delete("directory:" . $extension['number_alias'] . "@" . $_SESSION['domain_name']);
}
}
//set message
message::add($text['message-toggle']);
}
unset($records, $extensions, $extension);
}
}
//function
}
// class
?>
@@ -17,13 +17,12 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2016
Copyright (C) 2010 - 2023
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
//define the dnd class
class do_not_disturb {
@@ -80,8 +79,8 @@ include "root.php";
if (is_uuid($this->extension_uuid)) {
$this->extension_uuid = $row["extension_uuid"];
}
if (strlen($this->extension) == 0) {
if (strlen($row["number_alias"]) == 0) {
if (empty($this->extension)) {
if (empty($row["number_alias"])) {
$this->extension = $row["extension"];
}
else {
@@ -112,7 +111,7 @@ include "root.php";
//delete extension from the cache
$cache = new cache;
$cache->delete("directory:".$this->extension."@".$this->domain_name);
if(strlen($this->number_alias) > 0){
if(!empty($this->number_alias)){
$cache->delete("directory:".$this->number_alias."@".$this->domain_name);
}
@@ -164,7 +163,7 @@ include "root.php";
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -241,7 +240,7 @@ include "root.php";
$p->delete('extension_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@@ -261,7 +260,7 @@ include "root.php";
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
@@ -24,7 +24,6 @@
Mark J Crane <markjcrane@fusionpbx.com>
KonradSC <konrd@yahoo.com>
*/
include "root.php";
//define the feature_event_notify class
class feature_event_notify {
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2010 - 2019
Copyright (C) 2010 - 2023
All Rights Reserved.
Contributor(s):
@@ -27,7 +27,6 @@
Riccardo Granchi <riccardo.granchi@nems.it>
Errol Samuels <voiptology@gmail.com>
*/
include "root.php";
//define the follow me class
class follow_me {
@@ -85,7 +84,7 @@ include "root.php";
$array['follow_me'][0]['follow_me_uuid'] = $this->follow_me_uuid;
$array['follow_me'][0]['domain_uuid'] = $this->domain_uuid;
$array['follow_me'][0]['cid_name_prefix'] = $this->cid_name_prefix;
if (strlen($this->cid_number_prefix) > 0) {
if (!empty($this->cid_number_prefix)) {
$array['follow_me'][0]['cid_number_prefix'] = $this->cid_number_prefix;
}
@@ -149,7 +148,7 @@ include "root.php";
//build follow me destinations insert array
$x = 0;
if (strlen($this->destination_data_1) > 0) {
if (!empty($this->destination_data_1)) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
@@ -161,7 +160,7 @@ include "root.php";
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_2) > 0) {
if (!empty($this->destination_data_2)) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
@@ -173,7 +172,7 @@ include "root.php";
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_3) > 0) {
if (!empty($this->destination_data_3)) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
@@ -185,7 +184,7 @@ include "root.php";
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_4) > 0) {
if (!empty($this->destination_data_4)) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
@@ -197,7 +196,7 @@ include "root.php";
$this->destination_order++;
$x++;
}
if (strlen($this->destination_data_5) > 0) {
if (!empty($this->destination_data_5)) {
$array['follow_me_destinations'][$x]['follow_me_destination_uuid'] = uuid();
$array['follow_me_destinations'][$x]['domain_uuid'] = $this->domain_uuid;
$array['follow_me_destinations'][$x]['follow_me_uuid'] = $this->follow_me_uuid;
@@ -308,7 +307,7 @@ include "root.php";
//get current toggle state
foreach($records as $x => $record) {
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -354,7 +353,7 @@ include "root.php";
$extension['state'] == $this->toggle_values[1] //false becoming true
&& is_uuid($extension['follow_me_uuid'])
) {
$sql .= "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
$sql = "select count(*) from v_follow_me_destinations where follow_me_uuid = :follow_me_uuid";
$parameters['follow_me_uuid'] = $extension['follow_me_uuid'];
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
@@ -406,7 +405,7 @@ include "root.php";
$p->delete('follow_me_edit', 'temp');
//send feature event notify to the phone
if ($_SESSION['device']['feature_sync']['boolean'] == "true") {
if (!empty($_SESSION['device']['feature_sync']['boolean']) && $_SESSION['device']['feature_sync']['boolean'] == "true") {
foreach ($extensions as $uuid => $extension) {
$feature_event_notify = new feature_event_notify;
$feature_event_notify->domain_name = $_SESSION['domain_name'];
@@ -426,7 +425,7 @@ include "root.php";
}
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
if (!empty($_SESSION['switch']['extensions']['dir']) && is_readable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
@@ -1,35 +1,10 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
//require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
//check permissions
require_once "resources/check_auth.php";
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
@@ -38,14 +13,224 @@
exit;
}
//connect to the database
if (!isset($database)) {
$database = new database;
}
//add multi-lingual support
$language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
//set a variable for the included code to know its included
$is_included = true;
//set the row style
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
//include the call forward
require_once "app/call_forward/call_forward.php";
//get data
$sql = "
select
extension_uuid,
extension,
forward_all_enabled,
forward_all_destination,
follow_me_enabled,
follow_me_uuid,
do_not_disturb
from
v_extensions ";
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('call_forward_all')) {
$sql .= "where true ";
}
else {
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
$sql .= "and enabled = 'true' ";
if (!permission_exists('extension_edit')) {
if (is_array($_SESSION['user']['extension']) && count($_SESSION['user']['extension']) > 0) {
$sql .= "and (";
$x = 0;
foreach($_SESSION['user']['extension'] as $row) {
if ($x > 0) { $sql .= "or "; }
$sql .= "extension = '".$row['user']."' ";
$x++;
}
$sql .= ")";
}
else {
//used to hide any results when a user has not been assigned an extension
$sql .= "and extension = 'disabled' ";
}
}
$sql .= order_by($order_by ?? null, $order ?? null, 'extension', 'asc');
$database = new database;
$extensions = $database->select($sql, $parameters, 'all');
unset($parameters);
?>
//determine keys and stats
unset($stats);
//set defaults
$stats['dnd'] = $stats['follow_me'] = $stats['call_forward'] = $stats['active'] = 0;
$show_stat = false;
if (is_array($extensions) && @sizeof($extensions) != 0) {
foreach ($extensions as $row) {
if (permission_exists('call_forward')) {
$stats['call_forward'] += $row['forward_all_enabled'] == 'true' && $row['forward_all_destination'] ? 1 : 0;
}
if (permission_exists('follow_me')) {
$stats['follow_me'] += $row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid']) ? 1 : 0;
}
if (permission_exists('do_not_disturb')) {
$stats['dnd'] += $row['do_not_disturb'] == 'true' ? 1 : 0;
}
}
$stats['active'] = @sizeof($extensions) - $stats['call_forward'] - $stats['follow_me'] - $stats['dnd'];
}
if (is_array($stats) && @sizeof($stats) != 0) {
$show_stat = true;
}
//begin widget
echo "<div class='hud_box'>\n";
//doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\">\n";
echo " <div style='width: 275px; height: 175px;'><canvas id='call_forward_chart'></canvas></div>\n";
echo "</div>\n";
echo "<script>\n";
echo " const call_forward_chart = new Chart(\n";
echo " document.getElementById('call_forward_chart').getContext('2d'),\n";
echo " {\n";
echo " type: 'doughnut',\n";
echo " data: {\n";
echo " labels: [\n";
if (permission_exists('do_not_disturb')) {
echo " '".$text['label-dnd'].": ".$stats['dnd']."',\n";
}
if (permission_exists('follow_me')) {
echo " '".$text['label-follow_me'].": ".$stats['follow_me']."',\n";
}
if (permission_exists('call_forward')) {
echo " '".$text['label-call_forward'].": ".$stats['call_forward']."',\n";
}
echo " '".$text['label-active'].": ".$stats['active']."',\n";
echo " ],\n";
echo " datasets: [{\n";
echo " data: [\n";
if (permission_exists('do_not_disturb')) {
echo " '".$stats['dnd']."',\n";
}
if (permission_exists('follow_me')) {
echo " '".$stats['follow_me']."',\n";
}
if (permission_exists('call_forward')) {
echo " '".$stats['call_forward']."',\n";
}
echo " '".$stats['active']."',\n";
echo " 0.00001,\n";
echo " ],\n";
echo " backgroundColor: [\n";
if (permission_exists('do_not_disturb')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_do_not_disturb']['text']."',\n";
}
if (permission_exists('follow_me')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_follow_me']['text']."',\n";
}
if (permission_exists('call_forward')) {
echo " '".$_SESSION['dashboard']['call_forward_chart_color_call_forward']['text']."',\n";
}
echo " '".$_SESSION['dashboard']['call_forward_chart_color_active']['text']."',\n";
echo " '".$_SESSION['dashboard']['call_forward_chart_color_active']['text']."',\n";
echo " ],\n";
echo " borderColor: '".$_SESSION['dashboard']['call_forward_chart_border_color']['text']."',\n";
echo " borderWidth: '".$_SESSION['dashboard']['call_forward_chart_border_width']['text']."',\n";
echo " cutout: chart_cutout,\n";
echo " }]\n";
echo " },\n";
echo " options: {\n";
echo " responsive: true,\n";
echo " maintainAspectRatio: false,\n";
echo " plugins: {\n";
echo " chart_counter: {\n";
echo " chart_text: '".$stats['call_forward']."'\n";
echo " },\n";
echo " legend: {\n";
echo " position: 'right',\n";
echo " reverse: true,\n";
echo " labels: {\n";
echo " usePointStyle: true,\n";
echo " pointStyle: 'rect'\n";
echo " }\n";
echo " },\n";
echo " title: {\n";
echo " display: true,\n";
echo " text: '".$text['header-call_forward']."'\n";
echo " }\n";
echo " }\n";
echo " },\n";
echo " plugins: [chart_counter],\n";
echo " }\n";
echo " );\n";
echo "</script>\n";
//details
echo "<div class='hud_details hud_box' id='hud_call_forward_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";
echo "<th class='hud_heading'>".$text['label-extension']."</th>\n";
if (permission_exists('call_forward')) {
echo " <th class='hud_heading' style='text-align: center;'>".$text['label-call_forward']."</th>\n";
}
if (permission_exists('follow_me')) {
echo " <th class='hud_heading' style='text-align: center;'>".$text['label-follow_me']."</th>\n";
}
if (permission_exists('do_not_disturb')) {
echo " <th class='hud_heading' style='text-align: center;'>".$text['label-dnd']."</th>\n";
}
echo "</tr>\n";
// data
if (is_array($extensions) && @sizeof($extensions) != 0) {
foreach ($extensions as $row) {
$tr_link = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid'];
echo "<tr href='".$tr_link."'>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text'><a href='".$tr_link."' title=\"".$text['button-edit']."\">".escape($row['extension'])."</a></td>\n";
if (permission_exists('call_forward')) {
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($row['forward_all_enabled'] == 'true' ? escape(format_phone($row['forward_all_destination'])) : '&nbsp;')."</td>\n";
}
if (permission_exists('follow_me')) {
//get destination count
$follow_me_destination_count = 0;
if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) {
$sql = "select count(*) from v_follow_me_destinations ";
$sql .= "where follow_me_uuid = :follow_me_uuid ";
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['follow_me_uuid'] = $row['follow_me_uuid'];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$follow_me_destination_count = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
}
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : '&nbsp;')."</td>\n";
}
if (permission_exists('do_not_disturb')) {
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".($row['do_not_disturb'] == 'true' ? $text['label-enabled'] : '&nbsp;')."</td>\n";
}
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
unset($extensions);
}
echo "</table>\n";
echo "</div>";
//$n++;
echo "<span class='hud_expander' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>\n";
echo "</div>\n";
?>
@@ -1,5 +1,6 @@
<?php
$x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_name'] = 'Call Forward';
$array['dashboard'][$x]['dashboard_path'] = 'app/call_forward/resources/dashboard/call_forward.php';
+84
View File
@@ -0,0 +1,84 @@
<?php
//check the permission
if (defined('STDIN')) {
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
}
else {
exit;
}
//increase limits
set_time_limit(0);
//ini_set('max_execution_time',1800); //30 minutes
//ini_set('memory_limit', '512M');
//save the arguments to variables
$script_name = $argv[0];
if (!empty($argv[1])) {
parse_str($argv[1], $_GET);
}
//get the primary key
if (Is_array($_GET)) {
$hostname = urldecode($_GET['hostname']);
$debug = $_GET['debug'];
$sleep_seconds = $_GET['sleep'];
}
else {
//invalid uuid
exit;
}
//connect to event socket
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
//get the list
$sql = "select domain_name, extension, user_context, do_not_disturb, description ";
$sql .= "from v_extensions as e, v_domains as d ";
$sql .= "where do_not_disturb = 'true' ";
$sql .= "and e.domain_uuid = d.domain_uuid ";
$sql .= "and enabled = 'true' ";
$database = new database;
$results = $database->select($sql, $parameters, 'all');
unset($parameters);
//view_array($results);
foreach($results as $row) {
//build the event
$cmd = "sendevent PRESENCE_IN\n";
$cmd .= "proto: sip\n";
$cmd .= "login: ".$row['extension']."@".$row['domain_name']."\n";
$cmd .= "from: ".$row['extension']."@".$row['domain_name']."\n";
$cmd .= "status: Active (1 waiting)\n";
$cmd .= "rpid: unknown\n";
$cmd .= "event_type: presence\n";
$cmd .= "alt_event_type: dialog\n";
$cmd .= "event_count: 1\n";
$cmd .= "unique-id: ".uuid()."\n";
$cmd .= "Presence-Call-Direction: outbound\n";
$cmd .= "answer-state: confirmed\n";
//$cmd .= "answer-state: early\n";
//$cmd .= "answer-state: terminated\n";
//send message to the console
if (isset($debug)) {
echo "\n";
echo "[presence] dnd ".$row['extension']."@".$row['domain_name']."\n";
}
//send the event
$result = event_socket_request($fp, $cmd);
if (isset($debug)) {
print_r($result, false);
}
}
/*
* * * * * cd /var/www/fusionpbx && php /var/www/fusionpbx/app/call_forward/resources/jobs/dnd.php
*/
?>
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+1 -53
View File
@@ -5,7 +5,7 @@
$apps[$x]['uuid'] = '56165644-598d-4ed8-be01-d960bcb8ffed';
$apps[$x]['category'] = '';
$apps[$x]['subcategory'] = '';
$apps[$x]['version'] = '';
$apps[$x]['version'] = '1.1';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en-us'] = 'Call Recordings';
@@ -35,56 +35,4 @@
$apps[$x]['permissions'][$y]['name'] = 'call_recording_download';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
//Call Recordings
$y = 2;
$apps[$x]['db'][$y]['table']['name'] = 'v_call_recordings';
$apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_name';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_path';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_length';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_date';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_direction';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_description';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_recording_base64';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
?>
+48
View File
@@ -0,0 +1,48 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2022
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
if ($domains_processed == 1) {
//create the user view combines username, organization, contact first and last name
$database = new database;
$database->execute("DROP VIEW view_call_recordings;", null);
$sql = "CREATE VIEW view_call_recordings AS ( \n";
$sql .= " select domain_uuid, xml_cdr_uuid as call_recording_uuid, \n";
$sql .= " caller_id_name, caller_id_number, caller_destination, destination_number, \n";
$sql .= " record_name as call_recording_name, record_path as call_recording_path, \n";
$sql .= " duration as call_recording_length, start_stamp as call_recording_date, direction as call_direction \n";
$sql .= " from v_xml_cdr \n";
$sql .= " where record_name is not null \n";
$sql .= " and record_path is not null \n";
$sql .= " order by start_stamp desc \n";
$sql .= "); \n";
$database = new database;
$database->execute($sql, null);
unset($sql);
}
?>
+404 -248
View File
@@ -2,129 +2,243 @@
$text['title-call_recordings']['en-us'] = "Call Recordings";
$text['title-call_recordings']['en-gb'] = "Call Recordings";
$text['title-call_recordings']['ar-eg'] = "";
$text['title-call_recordings']['de-at'] = "";
$text['title-call_recordings']['de-ch'] = "";
$text['title-call_recordings']['de-de'] = "";
$text['title-call_recordings']['es-cl'] = "";
$text['title-call_recordings']['es-mx'] = "";
$text['title-call_recordings']['ar-eg'] = "تسجيلات المكالمات";
$text['title-call_recordings']['de-at'] = "Anrufaufzeichnungen";
$text['title-call_recordings']['de-ch'] = "Anrufaufzeichnungen";
$text['title-call_recordings']['de-de'] = "Anrufaufzeichnungen";
$text['title-call_recordings']['es-cl'] = "Grabaciones de llamadas";
$text['title-call_recordings']['es-mx'] = "Grabaciones de llamadas";
$text['title-call_recordings']['fr-ca'] = "Enregistrements d'appels";
$text['title-call_recordings']['fr-fr'] = "Enregistrements d'appels";
$text['title-call_recordings']['he-il'] = "";
$text['title-call_recordings']['it-it'] = "";
$text['title-call_recordings']['he-il'] = "הקלטות שיחות";
$text['title-call_recordings']['it-it'] = "Grabaciones de llamadas";
$text['title-call_recordings']['nl-nl'] = "Gespreksopnamen";
$text['title-call_recordings']['pl-pl'] = "Nagrania Rozmów";
$text['title-call_recordings']['pt-br'] = "";
$text['title-call_recordings']['pt-pt'] = "";
$text['title-call_recordings']['ro-ro'] = "";
$text['title-call_recordings']['pt-br'] = "Gravações de chamadas";
$text['title-call_recordings']['pt-pt'] = "Gravações de chamadas";
$text['title-call_recordings']['ro-ro'] = "Înregistrări de apeluri";
$text['title-call_recordings']['ru-ru'] = "Записи разговоров";
$text['title-call_recordings']['sv-se'] = "";
$text['title-call_recordings']['uk-ua'] = "";
$text['title-call_recordings']['sv-se'] = "Samtalsinspelningar";
$text['title-call_recordings']['uk-ua'] = "Записи дзвінків";
$text['title-call_recordings']['zh-cn'] = "通话录音";
$text['title-call_recordings']['ja-jp'] = "通話録音";
$text['title-call_recordings']['ko-kr'] = "통화 녹음";
$text['title-call_recording']['en-us'] = "Call Recording";
$text['title-call_recording']['en-gb'] = "Call Recording";
$text['title-call_recording']['ar-eg'] = "";
$text['title-call_recording']['de-at'] = "";
$text['title-call_recording']['de-ch'] = "";
$text['title-call_recording']['de-de'] = "";
$text['title-call_recording']['es-cl'] = "";
$text['title-call_recording']['es-mx'] = "";
$text['title-call_recording']['ar-eg'] = "تسجيل المكالمات";
$text['title-call_recording']['de-at'] = "Anrufaufzeichnung";
$text['title-call_recording']['de-ch'] = "Anrufaufzeichnung";
$text['title-call_recording']['de-de'] = "Anrufaufzeichnung";
$text['title-call_recording']['es-cl'] = "Grabacion de llamada";
$text['title-call_recording']['es-mx'] = "Grabacion de llamada";
$text['title-call_recording']['fr-ca'] = "Enregistrement d'appel";
$text['title-call_recording']['fr-fr'] = "Enregistrement d'appel";
$text['title-call_recording']['he-il'] = "";
$text['title-call_recording']['it-it'] = "";
$text['title-call_recording']['he-il'] = "הקלטת שיחה";
$text['title-call_recording']['it-it'] = "Registrazione delle chiamate";
$text['title-call_recording']['nl-nl'] = "Gespreksopname";
$text['title-call_recording']['pl-pl'] = "";
$text['title-call_recording']['pt-br'] = "";
$text['title-call_recording']['pt-pt'] = "";
$text['title-call_recording']['ro-ro'] = "";
$text['title-call_recording']['pl-pl'] = "Nagranie rozmowy";
$text['title-call_recording']['pt-br'] = "Gravação de chamadas";
$text['title-call_recording']['pt-pt'] = "Gravação de chamadas";
$text['title-call_recording']['ro-ro'] = "Înregistrare apel";
$text['title-call_recording']['ru-ru'] = "Запись разговора";
$text['title-call_recording']['sv-se'] = "";
$text['title-call_recording']['uk-ua'] = "";
$text['title-call_recording']['sv-se'] = "Samtalsinspelning";
$text['title-call_recording']['uk-ua'] = "Запис дзвінків";
$text['title-call_recording']['zh-cn'] = "通话录音";
$text['title-call_recording']['ja-jp'] = "通話録音";
$text['title-call_recording']['ko-kr'] = "통화 녹음";
$text['title_description-call_recordings']['en-us'] = "Shows the call recordings with name, length, date and time, and call direction.";
$text['title_description-call_recordings']['en-gb'] = "Shows the call recordings with name, length, date and time, and call direction.";
$text['title_description-call_recordings']['ar-eg'] = "";
$text['title_description-call_recordings']['de-at'] = "";
$text['title_description-call_recordings']['de-ch'] = "";
$text['title_description-call_recordings']['de-de'] = "";
$text['title_description-call_recordings']['es-cl'] = "";
$text['title_description-call_recordings']['es-mx'] = "";
$text['title_description-call_recordings']['ar-eg'] = "يظهر تسجيلات المكالمة بالاسم والطول والتاريخ والوقت واتجاه المكالمة.";
$text['title_description-call_recordings']['de-at'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
$text['title_description-call_recordings']['de-ch'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
$text['title_description-call_recordings']['de-de'] = "Zeigt die Anrufaufzeichnungen mit Name, Dauer, Datum und Uhrzeit sowie Anrufrichtung an.";
$text['title_description-call_recordings']['es-cl'] = "Muestra las grabaciones de llamadas con nombre, duración, fecha y hora, y dirección de la llamada.";
$text['title_description-call_recordings']['es-mx'] = "Muestra las grabaciones de llamadas con nombre, duración, fecha y hora, y dirección de la llamada.";
$text['title_description-call_recordings']['fr-ca'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
$text['title_description-call_recordings']['fr-fr'] = "Affiche les enregistrements d'appel avec nom, durée, date et heure, et direction de l'appel";
$text['title_description-call_recordings']['he-il'] = "";
$text['title_description-call_recordings']['it-it'] = "";
$text['title_description-call_recordings']['he-il'] = "מציג את הקלטות השיחה עם שם, אורך, תאריך ושעה וכיוון השיחה.";
$text['title_description-call_recordings']['it-it'] = "Mostra le registrazioni delle chiamate con nome, durata, data e ora e direzione della chiamata.";
$text['title_description-call_recordings']['nl-nl'] = "Toont de gespreksopnamen met naam, lengte, datum/tijd en oproep richting.";
$text['title_description-call_recordings']['pl-pl'] = "Wyświetla nagrania połączeń wraz z nazwą, długością, datą i godziną oraz kierunkiem połączenia.";
$text['title_description-call_recordings']['pt-br'] = "";
$text['title_description-call_recordings']['pt-pt'] = "";
$text['title_description-call_recordings']['ro-ro'] = "";
$text['title_description-call_recordings']['pt-br'] = "Mostra as gravações de chamadas com nome, duração, data e hora e direção da chamada.";
$text['title_description-call_recordings']['pt-pt'] = "Mostra as gravações de chamadas com nome, duração, data e hora e direção da chamada.";
$text['title_description-call_recordings']['ro-ro'] = "Afișează înregistrările apelurilor cu nume, lungime, dată și oră și direcția apelului.";
$text['title_description-call_recordings']['ru-ru'] = "Показывает доступные записи разговоров с именем, датой, временем и направлением вызова.";
$text['title_description-call_recordings']['sv-se'] = "";
$text['title_description-call_recordings']['uk-ua'] = "";
$text['title_description-call_recordings']['sv-se'] = "Visar samtalsinspelningarna med namn, längd, datum och tid samt samtalsriktning.";
$text['title_description-call_recordings']['uk-ua'] = "Показує записи дзвінків із назвою, тривалістю, датою та часом, а також напрямком дзвінка.";
$text['title_description-call_recordings']['zh-cn'] = "显示带有名称、长度、日期和时间以及呼叫方向的通话录音。";
$text['title_description-call_recordings']['ja-jp'] = "通話録音を名前、長さ、日付と時刻、通話方向とともに表示します。";
$text['title_description-call_recordings']['ko-kr'] = "이름, 길이, 날짜 및 시간, 통화 방향과 함께 통화 녹음을 표시합니다.";
$text['label-call_recording_name']['en-us'] = "Name";
$text['label-call_recording_name']['en-gb'] = "Name";
$text['label-call_recording_name']['ar-eg'] = "";
$text['label-call_recording_name']['de-at'] = "";
$text['label-call_recording_name']['de-ch'] = "";
$text['label-call_recording_name']['de-de'] = "";
$text['label-call_recording_name']['es-cl'] = "";
$text['label-call_recording_name']['es-mx'] = "";
$text['label-call_recording_name']['ar-eg'] = "اسم";
$text['label-call_recording_name']['de-at'] = "Name";
$text['label-call_recording_name']['de-ch'] = "Name";
$text['label-call_recording_name']['de-de'] = "Name";
$text['label-call_recording_name']['es-cl'] = "Nombre";
$text['label-call_recording_name']['es-mx'] = "Nombre";
$text['label-call_recording_name']['fr-ca'] = "Nom";
$text['label-call_recording_name']['fr-fr'] = "Nom";
$text['label-call_recording_name']['he-il'] = "";
$text['label-call_recording_name']['it-it'] = "";
$text['label-call_recording_name']['he-il'] = "שֵׁם";
$text['label-call_recording_name']['it-it'] = "Nome";
$text['label-call_recording_name']['nl-nl'] = "Naam";
$text['label-call_recording_name']['pl-pl'] = "Nazwa";
$text['label-call_recording_name']['pt-br'] = "";
$text['label-call_recording_name']['pt-pt'] = "";
$text['label-call_recording_name']['ro-ro'] = "";
$text['label-call_recording_name']['pt-br'] = "Nome";
$text['label-call_recording_name']['pt-pt'] = "Nome";
$text['label-call_recording_name']['ro-ro'] = "Nume";
$text['label-call_recording_name']['ru-ru'] = "Имя";
$text['label-call_recording_name']['sv-se'] = "";
$text['label-call_recording_name']['uk-ua'] = "";
$text['label-call_recording_name']['sv-se'] = "namn";
$text['label-call_recording_name']['uk-ua'] = "Ім'я";
$text['label-call_recording_name']['zh-cn'] = "姓名";
$text['label-call_recording_name']['ja-jp'] = "名前";
$text['label-call_recording_name']['ko-kr'] = "이름";
$text['description-call_recording_name']['en-us'] = "";
$text['description-call_recording_name']['en-gb'] = "";
$text['description-call_recording_name']['ar-eg'] = "";
$text['description-call_recording_name']['de-at'] = "";
$text['description-call_recording_name']['de-ch'] = "";
$text['description-call_recording_name']['de-de'] = "";
$text['description-call_recording_name']['es-cl'] = "";
$text['description-call_recording_name']['es-mx'] = "";
$text['description-call_recording_name']['fr-ca'] = "";
$text['description-call_recording_name']['fr-fr'] = "";
$text['description-call_recording_name']['he-il'] = "";
$text['description-call_recording_name']['it-it'] = "";
$text['label-caller_id_name']['en-us'] = "Caller Name";
$text['label-caller_id_name']['en-gb'] = "Caller Name";
$text['label-caller_id_name']['ar-eg'] = "اسم المتصل";
$text['label-caller_id_name']['de-at'] = "Anrufer Name";
$text['label-caller_id_name']['de-ch'] = "Anrufer Name";
$text['label-caller_id_name']['de-de'] = "Anrufer Name";
$text['label-caller_id_name']['es-cl'] = "Nombre CID";
$text['label-caller_id_name']['es-mx'] = "Nombre CID";
$text['label-caller_id_name']['fr-ca'] = "Nom de l'Appelant";
$text['label-caller_id_name']['fr-fr'] = "Nom de l'Appelant";
$text['label-caller_id_name']['he-il'] = "שם המתקשר";
$text['label-caller_id_name']['it-it'] = "Nome CID";
$text['label-caller_id_name']['nl-nl'] = "Naam beller";
$text['label-caller_id_name']['pl-pl'] = "Prezentacja nazwy dzwoniącego";
$text['label-caller_id_name']['pt-br'] = "Nome CID";
$text['label-caller_id_name']['pt-pt'] = "Nome CID";
$text['label-caller_id_name']['ro-ro'] = "Numele apelantului";
$text['label-caller_id_name']['ru-ru'] = "CID Имя";
$text['label-caller_id_name']['sv-se'] = "CID Namn";
$text['label-caller_id_name']['uk-ua'] = "CID Ім’я";
$text['label-caller_id_name']['zh-cn'] = "来电者姓名";
$text['label-caller_id_name']['ja-jp'] = "発信者名";
$text['label-caller_id_name']['ko-kr'] = "발신자 이름";
$text['label-caller_id_number']['en-us'] = "Caller Number";
$text['label-caller_id_number']['en-gb'] = "Caller Number";
$text['label-caller_id_number']['ar-eg'] = "رقم المتصل";
$text['label-caller_id_number']['de-at'] = "Anrufer Nummer";
$text['label-caller_id_number']['de-ch'] = "Anrufer Nummer";
$text['label-caller_id_number']['de-de'] = "Anrufer Nummer";
$text['label-caller_id_number']['es-cl'] = "Número CID";
$text['label-caller_id_number']['es-mx'] = "Número CID";
$text['label-caller_id_number']['fr-ca'] = "Numéro de l'Appelant";
$text['label-caller_id_number']['fr-fr'] = "Numéro de l'Appelant";
$text['label-caller_id_number']['he-il'] = "מספר מתקשר";
$text['label-caller_id_number']['it-it'] = "Numero CID";
$text['label-caller_id_number']['nl-nl'] = "Beller nummer";
$text['label-caller_id_number']['pl-pl'] = "Prezentacja numeru dzwoniącego";
$text['label-caller_id_number']['pt-br'] = "Número CID";
$text['label-caller_id_number']['pt-pt'] = "Número CID";
$text['label-caller_id_number']['ro-ro'] = "Numărul apelantului";
$text['label-caller_id_number']['ru-ru'] = "CID номера";
$text['label-caller_id_number']['sv-se'] = "CID, Nummer";
$text['label-caller_id_number']['uk-ua'] = "CID Номер";
$text['label-caller_id_number']['zh-cn'] = "来电号码";
$text['label-caller_id_number']['ja-jp'] = "発信者番号";
$text['label-caller_id_number']['ko-kr'] = "발신자 번호";
$text['label-caller_destination']['en-us'] = "Caller Destination";
$text['label-caller_destination']['en-gb'] = "Caller Destination";
$text['label-caller_destination']['ar-eg'] = "وجهة المتصل";
$text['label-caller_destination']['de-at'] = "Rufziel";
$text['label-caller_destination']['de-ch'] = "Rufziel";
$text['label-caller_destination']['de-de'] = "Rufziel";
$text['label-caller_destination']['es-cl'] = "Destino de la persona que llama";
$text['label-caller_destination']['es-mx'] = "Destino de la persona que llama";
$text['label-caller_destination']['fr-ca'] = "Destination de l'appelant";
$text['label-caller_destination']['fr-fr'] = "Destination de l'appelant";
$text['label-caller_destination']['he-il'] = "Destino de la persona que llama";
$text['label-caller_destination']['it-it'] = "Destinazione del chiamante";
$text['label-caller_destination']['nl-nl'] = "Bestemming van de beller";
$text['label-caller_destination']['pl-pl'] = "Miejsce docelowe dzwoniącego";
$text['label-caller_destination']['pt-br'] = "Destino do chamador";
$text['label-caller_destination']['pt-pt'] = "Destino do chamador";
$text['label-caller_destination']['ro-ro'] = "Destinația apelantului";
$text['label-caller_destination']['ru-ru'] = "Вызывающий абонент";
$text['label-caller_destination']['sv-se'] = "Uppringarens destination";
$text['label-caller_destination']['uk-ua'] = "Пункт призначення абонента";
$text['label-caller_destination']['zh-cn'] = "来电目的地";
$text['label-caller_destination']['ja-jp'] = "発信者の宛先";
$text['label-caller_destination']['ko-kr'] = "발신자 목적지";
$text['label-destination_number']['en-us'] = "Destination";
$text['label-destination_number']['en-gb'] = "Destination";
$text['label-destination_number']['ar-eg'] = "وجهة";
$text['label-destination_number']['de-at'] = "Ziel";
$text['label-destination_number']['de-ch'] = "Ziel";
$text['label-destination_number']['de-de'] = "Ziel";
$text['label-destination_number']['es-cl'] = "Destino";
$text['label-destination_number']['es-mx'] = "Destino";
$text['label-destination_number']['fr-ca'] = "Destination";
$text['label-destination_number']['fr-fr'] = "Destination";
$text['label-destination_number']['he-il'] = "יַעַד";
$text['label-destination_number']['it-it'] = "Destinazione";
$text['label-destination_number']['nl-nl'] = "Bestemming";
$text['label-destination_number']['pl-pl'] = "Miejsce docelowe";
$text['label-destination_number']['pt-br'] = "Destino";
$text['label-destination_number']['pt-pt'] = "Destino";
$text['label-destination_number']['ro-ro'] = "Destinaţie";
$text['label-destination_number']['ru-ru'] = "Место назначения";
$text['label-destination_number']['sv-se'] = "Destination";
$text['label-destination_number']['uk-ua'] = "Пункт призначення";
$text['label-destination_number']['zh-cn'] = "目的地";
$text['label-destination_number']['ja-jp'] = "行き先";
$text['label-destination_number']['ko-kr'] = "목적지";
$text['description-call_recording_name']['en-us'] = "Call Recording Name";
$text['description-call_recording_name']['en-gb'] = "Call Recording Name";
$text['description-call_recording_name']['ar-eg'] = "اسم تسجيل المكالمات";
$text['description-call_recording_name']['de-at'] = "Name der Anrufaufzeichnung";
$text['description-call_recording_name']['de-ch'] = "Name der Anrufaufzeichnung";
$text['description-call_recording_name']['de-de'] = "Name der Anrufaufzeichnung";
$text['description-call_recording_name']['es-cl'] = "Nombre de grabación de llamada";
$text['description-call_recording_name']['es-mx'] = "Nombre de grabación de llamada";
$text['description-call_recording_name']['fr-ca'] = "Nom de l'enregistrement d'appel";
$text['description-call_recording_name']['fr-fr'] = "Nom de l'enregistrement d'appel";
$text['description-call_recording_name']['he-il'] = "שם הקלטת שיחה";
$text['description-call_recording_name']['it-it'] = "Nome della registrazione della chiamata";
$text['description-call_recording_name']['nl-nl'] = "Gespreksopname naam";
$text['description-call_recording_name']['pl-pl'] = "";
$text['description-call_recording_name']['pt-br'] = "";
$text['description-call_recording_name']['pt-pt'] = "";
$text['description-call_recording_name']['ro-ro'] = "";
$text['description-call_recording_name']['ru-ru'] = "";
$text['description-call_recording_name']['sv-se'] = "";
$text['description-call_recording_name']['uk-ua'] = "";
$text['description-call_recording_name']['pl-pl'] = "Nazwa nagrania rozmowy";
$text['description-call_recording_name']['pt-br'] = "Nome da gravação de chamada";
$text['description-call_recording_name']['pt-pt'] = "Nome da gravação de chamada";
$text['description-call_recording_name']['ro-ro'] = "Numele înregistrării apelului";
$text['description-call_recording_name']['ru-ru'] = "Имя записи звонка";
$text['description-call_recording_name']['sv-se'] = "Namn på samtalsinspelning";
$text['description-call_recording_name']['uk-ua'] = "Назва запису виклику";
$text['description-call_recording_name']['zh-cn'] = "通话录音名称";
$text['description-call_recording_name']['ja-jp'] = "通話録音名";
$text['description-call_recording_name']['ko-kr'] = "통화 녹음 이름";
$text['label-call_recording_path']['en-us'] = "Path";
$text['label-call_recording_path']['en-gb'] = "Path";
$text['label-call_recording_path']['ar-eg'] = "";
$text['label-call_recording_path']['de-at'] = "";
$text['label-call_recording_path']['de-ch'] = "";
$text['label-call_recording_path']['de-de'] = "";
$text['label-call_recording_path']['es-cl'] = "";
$text['label-call_recording_path']['es-mx'] = "";
$text['label-call_recording_path']['ar-eg'] = "طريق";
$text['label-call_recording_path']['de-at'] = "Weg";
$text['label-call_recording_path']['de-ch'] = "Weg";
$text['label-call_recording_path']['de-de'] = "Weg";
$text['label-call_recording_path']['es-cl'] = "Camino";
$text['label-call_recording_path']['es-mx'] = "Camino";
$text['label-call_recording_path']['fr-ca'] = "Chemin";
$text['label-call_recording_path']['fr-fr'] = "Chemin";
$text['label-call_recording_path']['he-il'] = "";
$text['label-call_recording_path']['it-it'] = "";
$text['label-call_recording_path']['he-il'] = "נָתִיב";
$text['label-call_recording_path']['it-it'] = "Sentiero";
$text['label-call_recording_path']['nl-nl'] = "Pad";
$text['label-call_recording_path']['pl-pl'] = "Scieżka";
$text['label-call_recording_path']['pt-br'] = "";
$text['label-call_recording_path']['pt-pt'] = "";
$text['label-call_recording_path']['ro-ro'] = "";
$text['label-call_recording_path']['pt-br'] = "Caminho";
$text['label-call_recording_path']['pt-pt'] = "Caminho";
$text['label-call_recording_path']['ro-ro'] = "cale";
$text['label-call_recording_path']['ru-ru'] = "Путь";
$text['label-call_recording_path']['sv-se'] = "";
$text['label-call_recording_path']['uk-ua'] = "";
$text['label-call_recording_path']['sv-se'] = "Väg";
$text['label-call_recording_path']['uk-ua'] = "шлях";
$text['label-call_recording_path']['zh-cn'] = "小路";
$text['label-call_recording_path']['ja-jp'] = "道";
$text['label-call_recording_path']['ko-kr'] = "길";
$text['description-call_recording_path']['en-us'] = "";
$text['description-call_recording_path']['en-gb'] = "";
@@ -146,111 +260,129 @@ $text['description-call_recording_path']['ro-ro'] = "";
$text['description-call_recording_path']['ru-ru'] = "";
$text['description-call_recording_path']['sv-se'] = "";
$text['description-call_recording_path']['uk-ua'] = "";
$text['description-call_recording_path']['zh-cn'] = "";
$text['description-call_recording_path']['ja-jp'] = "";
$text['description-call_recording_path']['ko-kr'] = "";
$text['label-call_recording_length']['en-us'] = "Length";
$text['label-call_recording_length']['en-gb'] = "Length";
$text['label-call_recording_length']['ar-eg'] = "";
$text['label-call_recording_length']['de-at'] = "";
$text['label-call_recording_length']['de-ch'] = "";
$text['label-call_recording_length']['de-de'] = "";
$text['label-call_recording_length']['es-cl'] = "";
$text['label-call_recording_length']['es-mx'] = "";
$text['label-call_recording_length']['ar-eg'] = "طول";
$text['label-call_recording_length']['de-at'] = "Länge";
$text['label-call_recording_length']['de-ch'] = "Länge";
$text['label-call_recording_length']['de-de'] = "Länge";
$text['label-call_recording_length']['es-cl'] = "Longitud";
$text['label-call_recording_length']['es-mx'] = "Longitud";
$text['label-call_recording_length']['fr-ca'] = "Longueur";
$text['label-call_recording_length']['fr-fr'] = "Longueur";
$text['label-call_recording_length']['he-il'] = "";
$text['label-call_recording_length']['it-it'] = "";
$text['label-call_recording_length']['he-il'] = "אורך";
$text['label-call_recording_length']['it-it'] = "Lunghezza";
$text['label-call_recording_length']['nl-nl'] = "Lengte";
$text['label-call_recording_length']['pl-pl'] = "Długość";
$text['label-call_recording_length']['pt-br'] = "";
$text['label-call_recording_length']['pt-pt'] = "";
$text['label-call_recording_length']['ro-ro'] = "";
$text['label-call_recording_length']['pt-br'] = "Comprimento";
$text['label-call_recording_length']['pt-pt'] = "Comprimento";
$text['label-call_recording_length']['ro-ro'] = "Lungime";
$text['label-call_recording_length']['ru-ru'] = "Длительность";
$text['label-call_recording_length']['sv-se'] = "";
$text['label-call_recording_length']['uk-ua'] = "";
$text['label-call_recording_length']['sv-se'] = "Längd";
$text['label-call_recording_length']['uk-ua'] = "Довжина";
$text['label-call_recording_length']['zh-cn'] = "长度";
$text['label-call_recording_length']['ja-jp'] = "長さ";
$text['label-call_recording_length']['ko-kr'] = "길이";
$text['description-call_recording_length']['en-us'] = "";
$text['description-call_recording_length']['en-gb'] = "";
$text['description-call_recording_length']['ar-eg'] = "";
$text['description-call_recording_length']['de-at'] = "";
$text['description-call_recording_length']['de-ch'] = "";
$text['description-call_recording_length']['de-de'] = "";
$text['description-call_recording_length']['es-cl'] = "";
$text['description-call_recording_length']['es-mx'] = "";
$text['description-call_recording_length']['fr-ca'] = "";
$text['description-call_recording_length']['fr-fr'] = "";
$text['description-call_recording_length']['he-il'] = "";
$text['description-call_recording_length']['it-it'] = "";
$text['description-call_recording_length']['en-us'] = "Call Recording Duration";
$text['description-call_recording_length']['en-gb'] = "Call Recording Duration";
$text['description-call_recording_length']['ar-eg'] = "مدة تسجيل المكالمات";
$text['description-call_recording_length']['de-at'] = "Anrufaufzeichnungsdauer";
$text['description-call_recording_length']['de-ch'] = "Anrufaufzeichnungsdauer";
$text['description-call_recording_length']['de-de'] = "Anrufaufzeichnungsdauer";
$text['description-call_recording_length']['es-cl'] = "Duración de la grabación de llamadas";
$text['description-call_recording_length']['es-mx'] = "Duración de la grabación de llamadas";
$text['description-call_recording_length']['fr-ca'] = "Durée d'enregistrement des appels";
$text['description-call_recording_length']['fr-fr'] = "Durée d'enregistrement des appels";
$text['description-call_recording_length']['he-il'] = "משך הקלטת השיחה";
$text['description-call_recording_length']['it-it'] = "Durata della registrazione delle chiamate";
$text['description-call_recording_length']['nl-nl'] = "Gespreksopname duur";
$text['description-call_recording_length']['pl-pl'] = "";
$text['description-call_recording_length']['pt-br'] = "";
$text['description-call_recording_length']['pt-pt'] = "";
$text['description-call_recording_length']['ro-ro'] = "";
$text['description-call_recording_length']['ru-ru'] = "";
$text['description-call_recording_length']['sv-se'] = "";
$text['description-call_recording_length']['uk-ua'] = "";
$text['description-call_recording_length']['pl-pl'] = "Czas nagrywania rozmowy";
$text['description-call_recording_length']['pt-br'] = "Durata înregistrării apelului";
$text['description-call_recording_length']['pt-pt'] = "Durata înregistrării apelului";
$text['description-call_recording_length']['ro-ro'] = "Durata înregistrării apelului";
$text['description-call_recording_length']['ru-ru'] = "Продолжительность записи разговора";
$text['description-call_recording_length']['sv-se'] = "Samtalsinspelningslängd";
$text['description-call_recording_length']['uk-ua'] = "Тривалість запису розмови";
$text['description-call_recording_length']['zh-cn'] = "通话录音时长";
$text['description-call_recording_length']['ja-jp'] = "通話録音時間";
$text['description-call_recording_length']['ko-kr'] = "통화 녹음 시간";
$text['label-call_recording_date']['en-us'] = "Date";
$text['label-call_recording_date']['en-gb'] = "Date";
$text['label-call_recording_date']['ar-eg'] = "";
$text['label-call_recording_date']['de-at'] = "";
$text['label-call_recording_date']['de-ch'] = "";
$text['label-call_recording_date']['de-de'] = "";
$text['label-call_recording_date']['es-cl'] = "";
$text['label-call_recording_date']['es-mx'] = "";
$text['label-call_recording_date']['ar-eg'] = "تاريخ";
$text['label-call_recording_date']['de-at'] = "Datum";
$text['label-call_recording_date']['de-ch'] = "Datum";
$text['label-call_recording_date']['de-de'] = "Datum";
$text['label-call_recording_date']['es-cl'] = "Fecha";
$text['label-call_recording_date']['es-mx'] = "Fecha";
$text['label-call_recording_date']['fr-ca'] = "Date";
$text['label-call_recording_date']['fr-fr'] = "Date";
$text['label-call_recording_date']['he-il'] = "";
$text['label-call_recording_date']['it-it'] = "";
$text['label-call_recording_date']['he-il'] = "תַאֲרִיך";
$text['label-call_recording_date']['it-it'] = "תַאֲרִיך";
$text['label-call_recording_date']['nl-nl'] = "Datum";
$text['label-call_recording_date']['pl-pl'] = "Data";
$text['label-call_recording_date']['pt-br'] = "";
$text['label-call_recording_date']['pt-pt'] = "";
$text['label-call_recording_date']['ro-ro'] = "";
$text['label-call_recording_date']['pt-br'] = "Data";
$text['label-call_recording_date']['pt-pt'] = "Data";
$text['label-call_recording_date']['ro-ro'] = "Data";
$text['label-call_recording_date']['ru-ru'] = "Дата";
$text['label-call_recording_date']['sv-se'] = "";
$text['label-call_recording_date']['uk-ua'] = "";
$text['label-call_recording_date']['sv-se'] = "Datum";
$text['label-call_recording_date']['uk-ua'] = "Дата";
$text['label-call_recording_date']['zh-cn'] = "日期";
$text['label-call_recording_date']['ja-jp'] = "日にち";
$text['label-call_recording_date']['ko-kr'] = "날짜";
$text['description-call_recording_date']['en-us'] = "";
$text['description-call_recording_date']['en-gb'] = "";
$text['description-call_recording_date']['ar-eg'] = "";
$text['description-call_recording_date']['de-at'] = "";
$text['description-call_recording_date']['de-ch'] = "";
$text['description-call_recording_date']['de-de'] = "";
$text['description-call_recording_date']['es-cl'] = "";
$text['description-call_recording_date']['es-mx'] = "";
$text['description-call_recording_date']['fr-ca'] = "";
$text['description-call_recording_date']['fr-fr'] = "";
$text['description-call_recording_date']['he-il'] = "";
$text['description-call_recording_date']['it-it'] = "";
$text['description-call_recording_date']['en-us'] = "Call Recording Date";
$text['description-call_recording_date']['en-gb'] = "Call Recording Date";
$text['description-call_recording_date']['ar-eg'] = "تاريخ تسجيل المكالمة";
$text['description-call_recording_date']['de-at'] = "Anrufaufzeichnungsdatum";
$text['description-call_recording_date']['de-ch'] = "Anrufaufzeichnungsdatum";
$text['description-call_recording_date']['de-de'] = "Anrufaufzeichnungsdatum";
$text['description-call_recording_date']['es-cl'] = "Fecha de grabación de llamadas";
$text['description-call_recording_date']['es-mx'] = "Fecha de grabación de llamadas";
$text['description-call_recording_date']['fr-ca'] = "Date d'enregistrement de l'appel";
$text['description-call_recording_date']['fr-fr'] = "Date d'enregistrement de l'appel";
$text['description-call_recording_date']['he-il'] = "תאריך הקלטת שיחה";
$text['description-call_recording_date']['it-it'] = "Data di registrazione della chiamata";
$text['description-call_recording_date']['nl-nl'] = "Gespreksopname datum";
$text['description-call_recording_date']['pl-pl'] = "";
$text['description-call_recording_date']['pt-br'] = "";
$text['description-call_recording_date']['pt-pt'] = "";
$text['description-call_recording_date']['ro-ro'] = "";
$text['description-call_recording_date']['ru-ru'] = "";
$text['description-call_recording_date']['sv-se'] = "";
$text['description-call_recording_date']['uk-ua'] = "";
$text['description-call_recording_date']['pl-pl'] = "Data nagrania rozmowy";
$text['description-call_recording_date']['pt-br'] = "Data de gravação da chamada";
$text['description-call_recording_date']['pt-pt'] = "Data de gravação da chamada";
$text['description-call_recording_date']['ro-ro'] = "Data înregistrării apelului";
$text['description-call_recording_date']['ru-ru'] = "Дата записи звонка";
$text['description-call_recording_date']['sv-se'] = "Samtalsinspelningsdatum";
$text['description-call_recording_date']['uk-ua'] = "Дата запису дзвінка";
$text['description-call_recording_date']['zh-cn'] = "通话录音日期";
$text['description-call_recording_date']['ja-jp'] = "通話録音日";
$text['description-call_recording_date']['ko-kr'] = "통화 녹음 날짜";
$text['label-call_direction']['en-us'] = "Direction";
$text['label-call_direction']['en-gb'] = "Direction";
$text['label-call_direction']['ar-eg'] = "";
$text['label-call_direction']['de-at'] = "";
$text['label-call_direction']['de-ch'] = "";
$text['label-call_direction']['de-de'] = "";
$text['label-call_direction']['es-cl'] = "";
$text['label-call_direction']['es-mx'] = "";
$text['label-call_direction']['ar-eg'] = "اتجاه";
$text['label-call_direction']['de-at'] = "Richtung";
$text['label-call_direction']['de-ch'] = "Richtung";
$text['label-call_direction']['de-de'] = "Richtung";
$text['label-call_direction']['es-cl'] = "Dirección";
$text['label-call_direction']['es-mx'] = "Dirección";
$text['label-call_direction']['fr-ca'] = "Direction";
$text['label-call_direction']['fr-fr'] = "Direction";
$text['label-call_direction']['he-il'] = "";
$text['label-call_direction']['it-it'] = "";
$text['label-call_direction']['he-il'] = "כיוון";
$text['label-call_direction']['it-it'] = "Direzione";
$text['label-call_direction']['nl-nl'] = "Richting";
$text['label-call_direction']['pl-pl'] = "Kierunek";
$text['label-call_direction']['pt-br'] = "";
$text['label-call_direction']['pt-pt'] = "";
$text['label-call_direction']['ro-ro'] = "";
$text['label-call_direction']['pt-br'] = "Direção";
$text['label-call_direction']['pt-pt'] = "Direção";
$text['label-call_direction']['ro-ro'] = "Direcţie";
$text['label-call_direction']['ru-ru'] = "Направление";
$text['label-call_direction']['sv-se'] = "";
$text['label-call_direction']['uk-ua'] = "";
$text['label-call_direction']['sv-se'] = "Riktning";
$text['label-call_direction']['uk-ua'] = "Напрямок";
$text['label-call_direction']['zh-cn'] = "方向";
$text['label-call_direction']['ja-jp'] = "方向";
$text['label-call_direction']['ko-kr'] = "방향";
$text['description-call_direction']['en-us'] = "";
$text['description-call_direction']['en-gb'] = "";
@@ -272,27 +404,33 @@ $text['description-call_direction']['ro-ro'] = "";
$text['description-call_direction']['ru-ru'] = "";
$text['description-call_direction']['sv-se'] = "";
$text['description-call_direction']['uk-ua'] = "";
$text['description-call_direction']['zh-cn'] = "";
$text['description-call_direction']['ja-jp'] = "";
$text['description-call_direction']['ko-kr'] = "";
$text['label-call_recording_description']['en-us'] = "Description";
$text['label-call_recording_description']['en-gb'] = "Description";
$text['label-call_recording_description']['ar-eg'] = "";
$text['label-call_recording_description']['de-at'] = "";
$text['label-call_recording_description']['de-ch'] = "";
$text['label-call_recording_description']['de-de'] = "";
$text['label-call_recording_description']['es-cl'] = "";
$text['label-call_recording_description']['es-mx'] = "";
$text['label-call_recording_description']['ar-eg'] = "وصف";
$text['label-call_recording_description']['de-at'] = "Beschreibung";
$text['label-call_recording_description']['de-ch'] = "Beschreibung";
$text['label-call_recording_description']['de-de'] = "Beschreibung";
$text['label-call_recording_description']['es-cl'] = "Descripción";
$text['label-call_recording_description']['es-mx'] = "Descripción";
$text['label-call_recording_description']['fr-ca'] = "Description";
$text['label-call_recording_description']['fr-fr'] = "Description";
$text['label-call_recording_description']['he-il'] = "";
$text['label-call_recording_description']['it-it'] = "";
$text['label-call_recording_description']['he-il'] = "תיאור";
$text['label-call_recording_description']['it-it'] = "Descrizione";
$text['label-call_recording_description']['nl-nl'] = "Omschrijving";
$text['label-call_recording_description']['pl-pl'] = "Opis";
$text['label-call_recording_description']['pt-br'] = "";
$text['label-call_recording_description']['pt-pt'] = "";
$text['label-call_recording_description']['ro-ro'] = "";
$text['label-call_recording_description']['pt-br'] = "Descrição";
$text['label-call_recording_description']['pt-pt'] = "Descrição";
$text['label-call_recording_description']['ro-ro'] = "Descriere";
$text['label-call_recording_description']['ru-ru'] = "Описание";
$text['label-call_recording_description']['sv-se'] = "";
$text['label-call_recording_description']['uk-ua'] = "";
$text['label-call_recording_description']['sv-se'] = "Beskrivning";
$text['label-call_recording_description']['uk-ua'] = "опис";
$text['label-call_recording_description']['zh-cn'] = "描述";
$text['label-call_recording_description']['ja-jp'] = "説明";
$text['label-call_recording_description']['ko-kr'] = "설명";
$text['description-call_recording_description']['en-us'] = "";
$text['description-call_recording_description']['en-gb'] = "";
@@ -314,110 +452,128 @@ $text['description-call_recording_description']['ro-ro'] = "";
$text['description-call_recording_description']['ru-ru'] = "";
$text['description-call_recording_description']['sv-se'] = "";
$text['description-call_recording_description']['uk-ua'] = "";
$text['description-call_recording_description']['zh-cn'] = "";
$text['description-call_recording_description']['ja-jp'] = "";
$text['description-call_recording_description']['ko-kr'] = "";
$text['label-call_recording_base64']['en-us'] = "Base64";
$text['label-call_recording_base64']['en-gb'] = "Base64";
$text['label-call_recording_base64']['ar-eg'] = "";
$text['label-call_recording_base64']['de-at'] = "";
$text['label-call_recording_base64']['de-ch'] = "";
$text['label-call_recording_base64']['de-de'] = "";
$text['label-call_recording_base64']['es-cl'] = "";
$text['label-call_recording_base64']['es-mx'] = "";
$text['label-call_recording_base64']['ar-eg'] = "قاعدة64";
$text['label-call_recording_base64']['de-at'] = "Base64";
$text['label-call_recording_base64']['de-ch'] = "Base64";
$text['label-call_recording_base64']['de-de'] = "Base64";
$text['label-call_recording_base64']['es-cl'] = "Base64";
$text['label-call_recording_base64']['es-mx'] = "Base64";
$text['label-call_recording_base64']['fr-ca'] = "Base64";
$text['label-call_recording_base64']['fr-fr'] = "Base64";
$text['label-call_recording_base64']['he-il'] = "";
$text['label-call_recording_base64']['it-it'] = "";
$text['label-call_recording_base64']['he-il'] = "64בסיס";
$text['label-call_recording_base64']['it-it'] = "Base64";
$text['label-call_recording_base64']['nl-nl'] = "Base64";
$text['label-call_recording_base64']['pl-pl'] = "Base64";
$text['label-call_recording_base64']['pt-br'] = "";
$text['label-call_recording_base64']['pt-pt'] = "";
$text['label-call_recording_base64']['ro-ro'] = "";
$text['label-call_recording_base64']['ru-ru'] = "";
$text['label-call_recording_base64']['sv-se'] = "";
$text['label-call_recording_base64']['uk-ua'] = "";
$text['label-call_recording_base64']['pt-br'] = "Base64";
$text['label-call_recording_base64']['pt-pt'] = "Base64";
$text['label-call_recording_base64']['ro-ro'] = "Base64";
$text['label-call_recording_base64']['ru-ru'] = "Base64";
$text['label-call_recording_base64']['sv-se'] = "Base64";
$text['label-call_recording_base64']['uk-ua'] = "Base64";
$text['label-call_recording_base64']['zh-cn'] = "基地64";
$text['label-call_recording_base64']['ja-jp'] = "ベース64";
$text['label-call_recording_base64']['ko-kr'] = "베이스64";
$text['description-call_recording_base64']['en-us'] = "";
$text['description-call_recording_base64']['en-gb'] = "";
$text['description-call_recording_base64']['ar-eg'] = "";
$text['description-call_recording_base64']['de-at'] = "";
$text['description-call_recording_base64']['de-ch'] = "";
$text['description-call_recording_base64']['de-de'] = "";
$text['description-call_recording_base64']['es-cl'] = "";
$text['description-call_recording_base64']['es-mx'] = "";
$text['description-call_recording_base64']['fr-ca'] = "";
$text['description-call_recording_base64']['fr-fr'] = "";
$text['description-call_recording_base64']['he-il'] = "";
$text['description-call_recording_base64']['it-it'] = "";
$text['description-call_recording_base64']['en-us'] = "Base64";
$text['description-call_recording_base64']['en-gb'] = "Base64";
$text['description-call_recording_base64']['ar-eg'] = "قاعدة64";
$text['description-call_recording_base64']['de-at'] = "Base64";
$text['description-call_recording_base64']['de-ch'] = "Base64";
$text['description-call_recording_base64']['de-de'] = "Base64";
$text['description-call_recording_base64']['es-cl'] = "Base64";
$text['description-call_recording_base64']['es-mx'] = "Base64";
$text['description-call_recording_base64']['fr-ca'] = "Base64";
$text['description-call_recording_base64']['fr-fr'] = "Base64";
$text['description-call_recording_base64']['he-il'] = "בסיס 64";
$text['description-call_recording_base64']['it-it'] = "Base64";
$text['description-call_recording_base64']['nl-nl'] = "Base64";
$text['description-call_recording_base64']['pl-pl'] = "";
$text['description-call_recording_base64']['pt-br'] = "";
$text['description-call_recording_base64']['pt-pt'] = "";
$text['description-call_recording_base64']['ro-ro'] = "";
$text['description-call_recording_base64']['ru-ru'] = "";
$text['description-call_recording_base64']['sv-se'] = "";
$text['description-call_recording_base64']['uk-ua'] = "";
$text['description-call_recording_base64']['pl-pl'] = "Base64";
$text['description-call_recording_base64']['pt-br'] = "Base64";
$text['description-call_recording_base64']['pt-pt'] = "Base64";
$text['description-call_recording_base64']['ro-ro'] = "Base64";
$text['description-call_recording_base64']['ru-ru'] = "База64";
$text['description-call_recording_base64']['sv-se'] = "Base64";
$text['description-call_recording_base64']['uk-ua'] = "База64";
$text['description-call_recording_base64']['zh-cn'] = "基地64";
$text['description-call_recording_base64']['ja-jp'] = "ベース64";
$text['description-call_recording_base64']['ko-kr'] = "베이스64";
$text['label-inbound']['en-us'] = "Inbound";
$text['label-inbound']['en-gb'] = "Inbound";
$text['label-inbound']['ar-eg'] = "Inbound";
$text['label-inbound']['de-at'] = "Inbound";
$text['label-inbound']['de-ch'] = "Inbound";
$text['label-inbound']['de-de'] = "Inbound";
$text['label-inbound']['es-cl'] = "Inbound";
$text['label-inbound']['es-mx'] = "Inbound";
$text['label-inbound']['fr-ca'] = "Inbound";
$text['label-inbound']['fr-fr'] = "Inbound";
$text['label-inbound']['he-il'] = "Inbound";
$text['label-inbound']['it-it'] = "Inbound";
$text['label-inbound']['ar-eg'] = "واردة";
$text['label-inbound']['de-at'] = "Eingehende";
$text['label-inbound']['de-ch'] = "Eingehende";
$text['label-inbound']['de-de'] = "Eingehende";
$text['label-inbound']['es-cl'] = "Entrante";
$text['label-inbound']['es-mx'] = "Entrante";
$text['label-inbound']['fr-ca'] = "Entrant";
$text['label-inbound']['fr-fr'] = "Entrant";
$text['label-inbound']['he-il'] = "נכנסת";
$text['label-inbound']['it-it'] = "In entrata";
$text['label-inbound']['nl-nl'] = "Inkomend";
$text['label-inbound']['pl-pl'] = "Przychodzący";
$text['label-inbound']['pt-br'] = "Inbound";
$text['label-inbound']['pt-pt'] = "Inbound";
$text['label-inbound']['ro-ro'] = "Inbound";
$text['label-inbound']['ru-ru'] = "Inbound";
$text['label-inbound']['sv-se'] = "Inbound";
$text['label-inbound']['uk-ua'] = "Inbound";
$text['label-inbound']['pt-br'] = "Entrada";
$text['label-inbound']['pt-pt'] = "Entrada";
$text['label-inbound']['ro-ro'] = "Intrare";
$text['label-inbound']['ru-ru'] = "Входящий";
$text['label-inbound']['sv-se'] = "Inkommande";
$text['label-inbound']['uk-ua'] = "Вхідний";
$text['label-inbound']['zh-cn'] = "入境";
$text['label-inbound']['ja-jp'] = "インバウンド";
$text['label-inbound']['ko-kr'] = "인바운드";
$text['label-outbound']['en-us'] = "Outbound";
$text['label-outbound']['en-gb'] = "Outbound";
$text['label-outbound']['ar-eg'] = "Outbound";
$text['label-outbound']['de-at'] = "Outbound";
$text['label-outbound']['de-ch'] = "Outbound";
$text['label-outbound']['de-de'] = "Outbound";
$text['label-outbound']['es-cl'] = "Outbound";
$text['label-outbound']['es-mx'] = "Outbound";
$text['label-outbound']['fr-ca'] = "Outbound";
$text['label-outbound']['fr-fr'] = "Outbound";
$text['label-outbound']['he-il'] = "Outbound";
$text['label-outbound']['it-it'] = "Outbound";
$text['label-outbound']['ar-eg'] = "الصادرة";
$text['label-outbound']['de-at'] = "Ausgehend";
$text['label-outbound']['de-ch'] = "Ausgehend";
$text['label-outbound']['de-de'] = "Ausgehend";
$text['label-outbound']['es-cl'] = "Saliente";
$text['label-outbound']['es-mx'] = "Saliente";
$text['label-outbound']['fr-ca'] = "Sortant";
$text['label-outbound']['fr-fr'] = "Sortant";
$text['label-outbound']['he-il'] = "יוצא";
$text['label-outbound']['it-it'] = "In uscita";
$text['label-outbound']['nl-nl'] = "Uitgaand";
$text['label-outbound']['pl-pl'] = "Wychodzący";
$text['label-outbound']['pt-br'] = "Outbound";
$text['label-outbound']['pt-pt'] = "Outbound";
$text['label-outbound']['pt-br'] = "Saída";
$text['label-outbound']['pt-pt'] = "Saída";
$text['label-outbound']['ro-ro'] = "Outbound";
$text['label-outbound']['ru-ru'] = "Outbound";
$text['label-outbound']['sv-se'] = "Outbound";
$text['label-outbound']['uk-ua'] = "Outbound";
$text['label-outbound']['ru-ru'] = "Исходящий";
$text['label-outbound']['sv-se'] = "Utgående";
$text['label-outbound']['uk-ua'] = "Вихідний";
$text['label-outbound']['zh-cn'] = "出站";
$text['label-outbound']['ja-jp'] = "アウトバウンド";
$text['label-outbound']['ko-kr'] = "배 밖으로";
$text['label-local']['en-us'] = "Local";
$text['label-local']['en-gb'] = "Local";
$text['label-local']['ar-eg'] = "Local";
$text['label-local']['de-at'] = "Local";
$text['label-local']['de-ch'] = "Local";
$text['label-local']['de-de'] = "Local";
$text['label-local']['ar-eg'] = "محلي";
$text['label-local']['de-at'] = "Lokal";
$text['label-local']['de-ch'] = "Lokal";
$text['label-local']['de-de'] = "Lokal";
$text['label-local']['es-cl'] = "Local";
$text['label-local']['es-mx'] = "Local";
$text['label-local']['fr-ca'] = "Local";
$text['label-local']['fr-fr'] = "Local";
$text['label-local']['he-il'] = "Local";
$text['label-local']['it-it'] = "Local";
$text['label-local']['he-il'] = "מְקוֹמִי";
$text['label-local']['it-it'] = "Locale";
$text['label-local']['nl-nl'] = "Lokaal";
$text['label-local']['pl-pl'] = "Lokalny";
$text['label-local']['pt-br'] = "Local";
$text['label-local']['pt-pt'] = "Local";
$text['label-local']['ro-ro'] = "Local";
$text['label-local']['ru-ru'] = "Local";
$text['label-local']['sv-se'] = "Local";
$text['label-local']['uk-ua'] = "Local";
$text['label-local']['ru-ru'] = "Местный";
$text['label-local']['sv-se'] = "Lokal";
$text['label-local']['uk-ua'] = "Місцевий";
$text['label-local']['zh-cn'] = "当地的";
$text['label-local']['ja-jp'] = "地元";
$text['label-local']['ko-kr'] = "현지의";
?>
+33 -15
View File
@@ -1,19 +1,37 @@
<?php
$apps[$x]['menu'][0]['title']['en-us'] = 'Call Recordings';
$apps[$x]['menu'][0]['title']['en-gb'] = 'Call Recordings';
$apps[$x]['menu'][0]['title']['es-cl'] = '';
$apps[$x]['menu'][0]['title']['fr-fr'] = '';
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
$apps[$x]['menu'][0]['title']['nl-nl'] = 'Gespreksopnamen';
$apps[$x]['menu'][0]['title']['pl'] = 'Nagrania Rozmów';
$apps[$x]['menu'][0]['title']['sv-se'] = '';
$apps[$x]['menu'][0]['title']['uk'] = '';
$apps[$x]['menu'][0]['title']['de-at'] = '';
$apps[$x]['menu'][0]['uuid'] = 'd5b7bd0e-5e56-4d87-b2d5-7d7b2f7307ef';
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
$apps[$x]['menu'][0]['category'] = 'internal';
$apps[$x]['menu'][0]['path'] = '/app/call_recordings/call_recordings.php';
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Call Recordings";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Call Recordings";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "تسجيلات المكالمات";
$apps[$x]['menu'][$y]['title']['de-at'] = "Anrufaufnahmen";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Anrufaufnahmen";
$apps[$x]['menu'][$y]['title']['de-de'] = "Anrufaufnahmen";
$apps[$x]['menu'][$y]['title']['el-gr'] = "Ηχογραφήσεις κλήσεων";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Grabación de llamadas";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Grabación de llamadas";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Enregistrements d'appels";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Enregistrements d'appels";
$apps[$x]['menu'][$y]['title']['he-il'] = "הקלטות שיחות";
$apps[$x]['menu'][$y]['title']['it-it'] = "Registrazioni delle chiamate";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Gespreksopnamen";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Nagrania Rozmów";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Gravações de chamadas";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Gravações de chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Înregistrări de apeluri";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Записи звонков";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Samtalsinspelningar";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Запис дзвінків";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "通话录音";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "コール録音";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "통화 녹음";
$apps[$x]['menu'][$y]['uuid'] = "d5b7bd0e-5e56-4d87-b2d5-7d7b2f7307ef";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/call_recordings/call_recordings.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$y++;
?>
+124 -63
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2019
Portions created by the Initial Developer are Copyright (C) 2018 - 2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
@@ -43,15 +42,19 @@
$language = new text;
$text = $language->get();
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//get the http post data
if (is_array($_POST['call_recordings'])) {
if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$call_recordings = $_POST['call_recordings'];
}
//process the http post data by action
if ($action != '' && is_array($call_recordings) && @sizeof($call_recordings) != 0) {
if (!empty($action) && is_array($call_recordings) && @sizeof($call_recordings) != 0) {
switch ($action) {
case 'delete':
if (permission_exists('call_recording_delete')) {
@@ -67,52 +70,95 @@
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//add the search string
if (isset($_GET["search"])) {
if (!empty($search)) {
$search = strtolower($_GET["search"]);
$sql_search = "and (";
$sql_search .= " lower(call_recording_name) like :search ";
$sql_search .= " or lower(call_recording_path) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
//set the time zone
if (!empty($_SESSION['domain']['time_zone']['name'])) {
$time_zone = $_SESSION['domain']['time_zone']['name'];
}
else {
$time_zone = date_default_timezone_get();
}
$parameters['time_zone'] = $time_zone;
//get the count
$sql = "select count(call_recording_uuid) from v_call_recordings ";
$sql .= "where true ";
if ($_GET['show'] != "all" || !permission_exists('call_recording_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($sql_search)) {
$sql .= $sql_search;
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
//$sql = "select count(*) ";
//$sql .= "from view_call_recordings ";
//$sql .= "where true ";
//if ($_GET['show'] != "all" || !permission_exists('call_recording_all')) {
// $sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
// $parameters['domain_uuid'] = $_SESSION['domain_uuid'];
//}
//if (isset($search)) {
// $sql .= "and (";
// $sql .= " lower(call_recording_name) like :search ";
// $sql .= " or lower(call_recording_path) like :search ";
// $sql .= ") ";
// $parameters['search'] = '%'.$search.'%';
//}
//$database = new database;
//$num_rows = $database->select($sql, $parameters, 'column');
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "&search=".urlencode($search);
if ($_GET['show'] == "all" && permission_exists('call_recording_all')) {
$param .= "&show=all";
}
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
//prepare some of the paging values
$rows_per_page = (!empty($_SESSION['domain']['paging']['numeric'])) ? $_SESSION['domain']['paging']['numeric'] : 50;
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(call_recording_uuid)', '*', $sql);
$sql .= order_by($order_by, $order, 'call_recording_date', 'desc');
$sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, ";
$sql .= "r.call_recording_name, r.call_recording_path, r.call_recording_length, ";
$sql .= "r.caller_id_name, r.caller_id_number, r.caller_destination, r.destination_number, ";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'DD Mon YYYY') as call_recording_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'HH12:MI:SS am') as call_recording_time_formatted \n";
$sql .= "from view_call_recordings as r, v_domains as d ";
//$sql .= "from v_call_recordings as r, v_domains as d ";
$sql .= "where true ";
if ($show != "all" || !permission_exists('call_recording_all')) {
$sql .= "and (r.domain_uuid = :domain_uuid or r.domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
$sql .= "and r.domain_uuid = d.domain_uuid ";
if (!empty($search)) {
$sql .= "and (";
$sql .= " lower(r.call_direction) like :search ";
$sql .= " or lower(r.caller_id_name) like :search ";
$sql .= " or lower(r.caller_id_number) like :search ";
$sql .= " or lower(r.caller_destination) like :search ";
$sql .= " or lower(r.destination_number) like :search ";
$sql .= " or lower(r.call_recording_name) like :search ";
$sql .= " or lower(r.call_recording_path) like :search ";
$sql .= ") ";
$parameters['search'] = '%'.$search.'%';
}
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$call_recordings = $database->select($sql, $parameters, 'all');
$call_recordings = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//count the results
$result_count = is_array($call_recordings) ? sizeof($call_recordings) : 0;
//limit the number of results
if (!empty($_SESSION['cdr']['limit']['numeric']) && $_SESSION['cdr']['limit']['numeric'] > 0) {
$num_rows = $_SESSION['cdr']['limit']['numeric'];
}
//prepare to page the results
$param = "&search=".urlencode($search);
if ($show == "all" && permission_exists('call_recording_all')) {
$param .= "&show=all";
}
list($paging_controls_mini, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, true, $result_count); //top
list($paging_controls, $rows_per_page) = paging($num_rows ?? null, $param, $rows_per_page, false, $result_count); //bottom
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
@@ -123,7 +169,7 @@
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call_recordings']." (".$num_rows.")</b></div>\n";
echo " <div class='heading'><b>".$text['title-call_recordings']." </b></div>\n";
echo " <div class='actions'>\n";
if (permission_exists('call_recording_download_add') && $call_recordings) {
echo button::create(['type'=>'button','label'=>$text['button-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'collapse'=>'hide-xs','onclick'=>"list_action_set('download'); list_form_submit('form_list');"]);
@@ -132,10 +178,18 @@
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-left: 15px;','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','collapse'=>'hide-xs']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>($search == '' ? 'display: none;' : null),'collapse'=>'hide-xs']);
if ($paging_controls_mini != '') {
if (permission_exists('call_recording_all')) {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.(!empty($search) ? "&search=".urlencode($search) : null)]);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=\"$('#btn_reset').hide(); $('#btn_search').show();\">";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>(!empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_recordings.php','style'=>(empty($search) ? 'display: none;' : null),'collapse'=>'hide-xs']);
if (!empty($paging_controls_mini)) {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " </form>\n";
@@ -156,24 +210,31 @@
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
$col_count = 4;
$col_count = 8;
if ($show == "all" && permission_exists('call_recording_all')) {
$col_count++;
}
if (permission_exists('call_recording_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($call_recordings ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(empty($call_recordings) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
$col_count++;
}
if ($_GET['show'] == "all" && permission_exists('call_recording_all')) {
if ($show == "all" && permission_exists('call_recording_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
}
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-40'");
echo th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order, null, "class='hide-sm-dn shrink'");
echo th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order, null, "class='pct-10'");
echo th_order_by('caller_destination', $text['label-caller_destination'], $order_by, $order, null, "class='hide-sm-dn shrink'");
echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, null, "class='hide-sm-dn shrink'");
echo th_order_by('call_recording_name', $text['label-call_recording_name'], $order_by, $order, null, "class='pct-40 hide-sm-dn'");
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
echo "<th class='shrink center'>".$text['label-recording']."</th>\n";
$col_count++;
}
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order, null, "class='right'");
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order);
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order);
echo th_order_by('call_recording_length', $text['label-call_recording_length'], $order_by, $order, null, "class='right hide-sm-dn shrink'");
echo th_order_by('call_recording_date', $text['label-call_recording_date'], $order_by, $order, null, "class='center'");
echo th_order_by('call_direction', $text['label-call_direction'], $order_by, $order, null, "class='hide-sm-dn shrink'");
if (permission_exists('xml_cdr_details')) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
@@ -182,6 +243,9 @@
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
$x = 0;
foreach ($call_recordings as $row) {
//add padding to the call recording length
$call_recording_length_padding = (!empty($row['call_recording_length'])) ? str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT) : '';
//playback progress bar
if (permission_exists('call_recording_play')) {
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n";
@@ -197,16 +261,14 @@
echo " <input type='hidden' name='call_recordings[$x][uuid]' value='".escape($row['call_recording_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == "all" && permission_exists('call_recording_all')) {
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
}
else {
$domain = $text['label-global'];
}
echo " <td>".escape($domain)."</td>\n";
if ($show == "all" && permission_exists('call_recording_all')) {
echo " <td class='overflow hide-sm-dn shrink'>".escape($row['domain_name'])."</td>\n";
}
echo " <td class='overflow'>".escape($row['call_recording_name'])."</td>\n";
echo " <td class='hide-sm-dn shrink'>".escape($row['caller_id_name'])."</td>\n";
echo " <td class='overflow'>".escape($row['caller_id_number'])."</td>\n";
echo " <td class='overflow hide-sm-dn shrink'>".escape($row['caller_destination'])."</td>\n";
echo " <td class='overflow hide-sm-dn shrink'>".escape($row['destination_number'])."</td>\n";
echo " <td class='hide-sm-dn nowrap'>".escape($row['call_recording_name'])."</td>\n";
if (permission_exists('call_recording_play') || permission_exists('call_recording_download')) {
echo " <td class='middle button center no-link no-wrap'>";
if (file_exists($row['call_recording_path'].'/'.$row['call_recording_name'])) {
@@ -226,10 +288,9 @@
}
echo " </td>\n";
}
echo " <td class='right'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape(str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT))."</td>\n";
$call_recording_date = explode(' ', $row['call_recording_date']);
echo " <td class='no-wrap'>".escape($call_recording_date['0'])." <span class='hide-sm-dn'>".escape($call_recording_date[1])."</span></td>\n";
echo " <td>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
echo " <td class='right overflow hide-sm-dn shrink'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($call_recording_length_padding)."</td>\n";
echo " <td class='center no-wrap'>".escape($row['call_recording_date_formatted'])." <span class='hide-sm-dn'>".escape($row['call_recording_time_formatted'])."</span></td>\n";
echo " <td class='left hide-sm-dn shrink'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
if (permission_exists('xml_cdr_details')) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>PROJECT_PATH.'/app/xml_cdr/xml_cdr_details.php?id='.urlencode($row['call_recording_uuid'])]);
+2 -3
View File
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
require_once "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permisions
@@ -1,4 +1,28 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
/**
* call_recordings class
@@ -33,16 +57,6 @@ if (!class_exists('call_recordings')) {
$this->location = 'call_recordings.php';
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete rows from the database
*/
@@ -67,10 +81,10 @@ if (!class_exists('call_recordings')) {
$x = 0;
foreach ($records as $record) {
//add to the array
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
//get the information to delete
$sql = "select call_recording_name, call_recording_path ";
$sql .= "from v_call_recordings ";
$sql .= "from view_call_recordings ";
$sql .= "where call_recording_uuid = :call_recording_uuid ";
$parameters['call_recording_uuid'] = $record['uuid'];
$database = new database;
@@ -81,7 +95,10 @@ if (!class_exists('call_recordings')) {
unlink($field['call_recording_path'].'/'.$field['call_recording_name']);
}
//build call recording delete array
$array[$this->table][$x][$this->name.'_uuid'] = $record['uuid'];
$array['xml_cdr'][$x]['xml_cdr_uuid'] = $record['uuid'];
$array['xml_cdr'][$x]['record_path'] = null;
$array['xml_cdr'][$x]['record_name'] = null;
$array['xml_cdr'][$x]['record_length'] = null;
//increment the id
$x++;
}
@@ -91,15 +108,25 @@ if (!class_exists('call_recordings')) {
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//execute delete
//add temporary permissions
$p = new permissions;
$p->add('xml_cdr_edit', 'temp');
//remove record_path, record_name and record_length
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->delete($array);
$database->app_name = 'xml_cdr';
$database->app_uuid = '4a085c51-7635-ff03-f67b-86e834422848';
$database->save($array, false);
$message = $database->message;
unset($array);
//remove the temporary permissions
$p->delete('xml_cdr_edit', 'temp');
//set message
message::add($text['message-delete']);
}
unset($records);
}
@@ -114,8 +141,11 @@ if (!class_exists('call_recordings')) {
//get call recording from database
if (is_uuid($this->recording_uuid)) {
$sql = "select call_recording_name, call_recording_path, call_recording_base64 ";
$sql .= "from v_call_recordings ";
$sql = "select call_recording_name, call_recording_path ";
if (!empty($_SESSION['call_recordings']['storage_type']['text']) && $_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
$sql = ", call_recording_base64 ";
}
$sql .= "from view_call_recordings ";
$sql .= "where call_recording_uuid = :call_recording_uuid ";
$parameters['call_recording_uuid'] = $this->recording_uuid;
$database = new database;
@@ -123,26 +153,19 @@ if (!class_exists('call_recordings')) {
if (is_array($row) && @sizeof($row) != 0) {
$call_recording_name = $row['call_recording_name'];
$call_recording_path = $row['call_recording_path'];
if ($_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
if (!empty($_SESSION['call_recordings']['storage_type']['text']) && $_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
file_put_contents($path.'/'.$call_recording_name, base64_decode($row['call_recording_base64']));
}
}
unset($sql, $parameters, $row);
}
//set the path for the directory
$default_path = $_SESSION['switch']['call_recordings']['dir']."/".$_SESSION['domain_name'];
//build full path
$full_recording_path = $call_recording_path.'/'.$call_recording_name;
//download the file
if (file_exists($full_recording_path)) {
//content-range
if (isset($_SERVER['HTTP_RANGE']) && !$this->binary) {
$this->range_download($full_recording_path);
}
ob_clean();
if ($full_recording_path != '/' && file_exists($full_recording_path)) {
ob_clean();
$fd = fopen($full_recording_path, "rb");
if ($this->binary) {
header("Content-Type: application/force-download");
@@ -164,12 +187,18 @@ if (!class_exists('call_recordings')) {
if ($this->binary) {
header("Content-Length: ".filesize($full_recording_path));
}
ob_clean();
fpassthru($fd);
ob_clean();
//content-range
if (isset($_SERVER['HTTP_RANGE']) && !$this->binary) {
$this->range_download($full_recording_path);
}
fpassthru($fd);
}
//if base64, remove temp recording file
if ($_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
if (!empty($_SESSION['call_recordings']['storage_type']['text']) && $_SESSION['call_recordings']['storage_type']['text'] == 'base64' && $row['call_recording_base64'] != '') {
@unlink($full_recording_path);
}
}
@@ -198,7 +227,7 @@ if (!class_exists('call_recordings')) {
* (mediatype = mimetype)
* as well as a boundry header to indicate the various chunks of data.
*/
header("Accept-Ranges: 0-$length");
header("Accept-Ranges: 0-".$length);
// header('Accept-Ranges: bytes');
// multipart/byteranges
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
@@ -221,7 +250,7 @@ if (!class_exists('call_recordings')) {
// If the range starts with an '-' we start from the beginning
// If not, we forward the file pointer
// And make sure to get the end byte if spesified
if ($range0 == '-') {
if ($range[0] == '-') {
// The n-number of the last bytes is requested
$c_start = $size - substr($range, 1);
}
@@ -272,4 +301,4 @@ if (!class_exists('call_recordings')) {
} //class
}
?>
?>
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
File diff suppressed because it is too large Load Diff
+11 -5
View File
@@ -3,13 +3,13 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Active Calls";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Active Calls";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "الدعوات النشطة";
$apps[$x]['menu'][$y]['title']['de-at'] = "Aktive Gespräche";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Aktive Anrufe";
$apps[$x]['menu'][$y]['title']['de-de'] = "Aktive Gespräche";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Llamadas Activas";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Llamadas activas";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Appels actifs";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Appels en cours";
$apps[$x]['menu'][$y]['title']['he-il'] = "שיחות פעילות";
$apps[$x]['menu'][$y]['title']['it-it'] = "Chiamate Attive";
@@ -17,15 +17,21 @@
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Aktywne połączenia";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Chamadas ativas";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Chamadas Activas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Apeluri active";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Активные вызовы";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Aktiva samtal";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Активні дзвінки";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "主动通话";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "アクティブ コール";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "활성 통화";
$apps[$x]['menu'][$y]['uuid'] = "eba3d07f-dd5c-6b7b-6880-493b44113ade";
$apps[$x]['menu'][$y]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/calls_active/calls_active.php";
$apps[$x]['menu'][$y]['order'] = "";
$apps[$x]['menu'][$y]['groups'][] = "superadmin";
$apps[$x]['menu'][$y]['groups'][] = "admin";
$y++;
?>
+5 -6
View File
@@ -17,16 +17,15 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -43,7 +42,7 @@
$text = $language->get();
//get the HTTP values and set as variables
$show = trim($_REQUEST["show"]);
$show = trim($_REQUEST["show"] ?? '');
if ($show != "all") { $show = ''; }
//show the header
@@ -53,7 +52,7 @@
//load gateways into a session variable
$sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true' ";
$database = new database;
$gateways = $database->select($sql, $parameters, 'all');
$gateways = $database->select($sql, $parameters ?? null, 'all');
foreach ($gateways as $row) {
$_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway'];
}
+6 -7
View File
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -43,7 +42,7 @@
$text = $language->get();
//get the HTTP values and set as variables
$show = trim($_REQUEST["show"]);
$show = trim($_REQUEST["show"] ?? '');
if ($show != "all") { $show = ''; }
//include theme config for button images
@@ -66,7 +65,7 @@
if (isset($results["rows"])) {
foreach ($results["rows"] as &$row) {
//get the domain
if (strlen($row['context']) > 0 && $row['context'] != "public" && $row['context'] != "default") {
if (!empty($row['context']) && $row['context'] != "public" && $row['context'] != "default") {
if (substr_count($row['context'], '@') > 0) {
$context_array = explode('@', $row['context']);
$row['domain_name'] = $context_array[1];
@@ -153,7 +152,7 @@
echo "<tr class='list-header'>\n";
if (permission_exists('call_active_hangup')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".($rows ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='if (this.checked) { refresh_stop(); } else { refresh_start(); } list_all_toggle();' ".(empty($rows) ? "style='visibility: hidden;'" : null).">\n";
echo " </th>\n";
}
echo " <th>".$text['label-profile']."</th>\n";
@@ -224,7 +223,7 @@
echo " <td>".escape($cid_name)."&nbsp;</td>\n";
echo " <td>".escape($cid_num)."&nbsp;</td>\n";
echo " <td>".escape($dest)."&nbsp;</td>\n";
echo " <td>".(strlen($application) > 0 ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n";
echo " <td>".(!empty($application) ? escape($application).":".escape($application_data) : null)."&nbsp;</td>\n";
echo " <td>".escape($read_codec).":".escape($read_rate)." / ".escape($write_codec).":".escape($write_rate)."&nbsp;</td>\n";
echo " <td>".escape($secure)."&nbsp;</td>\n";
if (permission_exists('call_active_hangup')) {
+3 -4
View File
@@ -24,9 +24,8 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
include "root.php";
require_once "resources/require.php";
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
@@ -67,7 +66,7 @@
}
}
}
if (is_uuid($_REQUEST['uuid'])) {
if (!empty($_REQUEST['uuid']) && is_uuid($_REQUEST['uuid'])) {
$calls[] = $_REQUEST['uuid'];
}
-90
View File
@@ -1,90 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>
+179
View File
@@ -0,0 +1,179 @@
<?php
//application details
$apps[$x]['name'] = "Cisco";
$apps[$x]['uuid'] = "eb30ac3a-1f11-4c72-9878-9572baf3ed6d";
$apps[$x]['category'] = "Vendor";
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "";
$apps[$x]['description']['en-gb'] = "";
$apps[$x]['description']['ar-eg'] = "";
$apps[$x]['description']['de-at'] = "";
$apps[$x]['description']['de-ch'] = "";
$apps[$x]['description']['de-de'] = "";
$apps[$x]['description']['es-cl'] = "";
$apps[$x]['description']['es-mx'] = "";
$apps[$x]['description']['fr-ca'] = "";
$apps[$x]['description']['fr-fr'] = "";
$apps[$x]['description']['he-il'] = "";
$apps[$x]['description']['it-it'] = "";
$apps[$x]['description']['nl-nl'] = "";
$apps[$x]['description']['pl-pl'] = "";
$apps[$x]['description']['pt-br'] = "";
$apps[$x]['description']['pt-pt'] = "";
$apps[$x]['description']['ro-ro'] = "";
$apps[$x]['description']['ru-ru'] = "";
$apps[$x]['description']['sv-se'] = "";
$apps[$x]['description']['uk-ua'] = "";
//default settings
$y=0;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "da21eec7-699b-4a8b-a5e5-30ce118aaf8c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_time_zone";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "GMT-07:00";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a6529f0e-9d8b-43b9-b487-db42b9b6be25";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_time_format";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "12hr";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "12hr,24hr";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "58c764a9-4f71-4cd2-a44a-1ab52990b97f";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_date_format";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "day/month";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "94d7d463-770e-48d9-8ba7-6009a54be413";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_provision_url";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA Provision URL";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9c9886a0-92f6-4dd7-8c1b-d04f240d9a9b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_back_light_timer";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30 s";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7c7fb3c1-3796-4c5f-b090-2aec955e023b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_handle_via_rport";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Yes";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8311d0c9-73ae-4d49-9036-e2f649586b5b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_insert_via_rport";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Yes";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "72de5cdf-31f8-4d4b-b94b-468be0aa7a3d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_dial_plan";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "(park+*xxxx|*xxxxxxx|*xxxxxx|*xxxxx|*xxxx|*xxx|*xx*|*x|**xxxxx|**xxxx|**xxx|**xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "564c50ee-4403-4e26-a30b-637f661db389";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_call_waiting";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "Yes";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Call Waiting Yes=enabled No=disable";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "05176dde-763e-4983-b8d2-93f6bf984805";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_feature_key_sync";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "No";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Feature Key Sync Yes=enabled No=disable";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2ce5d7a2-2a72-423f-adb4-777b1f0f8586";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_dual_registration";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "No";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Dual Registration Yes=enabled No=disable";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6f815035-9b80-4007-8cc6-ac151727e5fb";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_register_when_failover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "No";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Auto register when failover Yes=enabled No=disable";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7f93d499-13e8-4938-ba1f-01eafff43354";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_secure_call_setting";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "No";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA secure call No or Yes";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e8efadd1-8753-42b3-92d8-d2b40f111c63";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_resync_time";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA resync at 0300 every night at 3:00 am. Default disabled.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "753ed706-a5b0-47c1-a466-5ed35c4d27da";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_upgrade_enable";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA upgrade firmware enable Yes or No Default No.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c142a1aa-957f-441e-9b05-366d10929b72";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_vlan_enable";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "No";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA vlan enable. Options: Yes or No Default No.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3d3ffb11-9ade-4725-a02e-926dd483a2bf";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_vlan_id";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA VLAN ID. Options 0 to 4094.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "78637de4-ec12-4d41-8c65-39afe50d2b02";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "spa_vlan_pc_id";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "SPA PC VLAN ID. Options 0 to 4094.";
$y++;
?>
File diff suppressed because it is too large Load Diff
+16 -10
View File
@@ -3,27 +3,33 @@
$y=0;
$apps[$x]['menu'][$y]['title']['en-us'] = "Click to Call";
$apps[$x]['menu'][$y]['title']['en-gb'] = "Click to Call";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "";
$apps[$x]['menu'][$y]['title']['ar-eg'] = "اضغط للاتصال";
$apps[$x]['menu'][$y]['title']['de-at'] = "Click to Call";
$apps[$x]['menu'][$y]['title']['de-ch'] = "";
$apps[$x]['menu'][$y]['title']['de-ch'] = "Klicken Sie auf Anruf";
$apps[$x]['menu'][$y]['title']['de-de'] = "Click to Call";
$apps[$x]['menu'][$y]['title']['es-cl'] = "Pulse para Llamar";
$apps[$x]['menu'][$y]['title']['es-mx'] = "";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "";
$apps[$x]['menu'][$y]['title']['es-mx'] = "Haga clic para llamar";
$apps[$x]['menu'][$y]['title']['fr-ca'] = "Cliquez pour appeler";
$apps[$x]['menu'][$y]['title']['fr-fr'] = "Cliquez pour Appeller";
$apps[$x]['menu'][$y]['title']['he-il'] = "";
$apps[$x]['menu'][$y]['title']['he-il'] = "לחצו על Call";
$apps[$x]['menu'][$y]['title']['it-it'] = "Clicca e Chiama";
$apps[$x]['menu'][$y]['title']['nl-nl'] = "Klik voor oproep";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "";
$apps[$x]['menu'][$y]['title']['pt-br'] = "";
$apps[$x]['menu'][$y]['title']['pl-pl'] = "Click to Call";
$apps[$x]['menu'][$y]['title']['pt-br'] = "Clique para ligar";
$apps[$x]['menu'][$y]['title']['pt-pt'] = "Clicar para Chamadas";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "";
$apps[$x]['menu'][$y]['title']['ro-ro'] = "Fă clic pentru a apela";
$apps[$x]['menu'][$y]['title']['ru-ru'] = "Вызов по клику";
$apps[$x]['menu'][$y]['title']['sv-se'] = "";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "";
$apps[$x]['menu'][$y]['title']['sv-se'] = "Klicka för att ringa";
$apps[$x]['menu'][$y]['title']['uk-ua'] = "Натисніть, щоб викликати";
$apps[$x]['menu'][$y]['title']['zh-cn'] = "点击通话";
$apps[$x]['menu'][$y]['title']['ja-jp'] = "電話するにはクリック";
$apps[$x]['menu'][$y]['title']['ko-kr'] = "클릭 투 콜";
$apps[$x]['menu'][$y]['uuid'] = "f862556f-9ddd-2697-fdf4-bed08ec63aa5";
$apps[$x]['menu'][$y]['parent_uuid'] = "fd29e39c-c936-f5fc-8e2b-611681b266b5";
$apps[$x]['menu'][$y]['category'] = "internal";
$apps[$x]['menu'][$y]['icon'] = "";
$apps[$x]['menu'][$y]['path'] = "/app/click_to_call/click_to_call.php";
$apps[$x]['menu'][$y]['order'] = "";
$y++;
?>

Some files were not shown because too many files have changed in this diff Show More