Commit Graph
59 Commits
Author SHA1 Message Date
demonspork 9952026016 Removed unused dialplan is_loopback (#6927) 2024-03-27 22:10:26 -06:00
demonspork df6d56d148 Support updating optional installed apps via git (#6513)
* WIP: Support updating optional installed apps via git

* support app source update via cli

* Update app_languages.php

* Update index.php

* Refactor App Git updating

Refactor Optional App Git updating for more resilience and better handling of ssh remotes and to only update each repository once.

* git app updates fix gui updates for repo based updating
2023-12-21 12:28:04 -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
demonspork a3811128af Support upcoming change in freeswitch - bridge_uuid changes to bridge_uuids array (#6531) 2023-01-27 10:18:35 -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
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
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
demonspork a62235e983 Typo Fix in recordings.php (#6504) 2022-12-08 16:16:13 -07:00
demonspork 36cb791e0b Add Permission to set Empty emergency Number (#5944)
* Add Permission to set empty emergency Number
2021-11-16 13:42:31 -07:00
demonspork 0f9a868913 Fix some nway conference true/false variables (#6052)
nway_conference == true was evaluating as true regardless if nway_conference was set to true or false, just as long as it had a value of any kind.
This also fixes it so that you can set nway_conference to false in the default settings and it will disable the network conference feature, previously once it was enabled on yealink phones it could not be disabled without manually changing it in the phone or a factory default.
2021-09-10 15:09:33 -06:00
demonspork 803457f8c9 Support for Disabling Non-configured ports on GXW42XX gateways (#6001)
* Support for Disabling Non-configured ports on GXW42XX gateways

When patching in an ATA at facilities like residential facilities, we don't want dial tone on un-configured ports. This makes it so that the device will disable ports that have no user id configured so they don't provide dial tone. The behavior can be reversed by setting grandstream_fxs_enabled to 1 in the settings.
2021-08-25 19:10:35 -06:00
demonspork 910549919b Grandstream headset ring (#5967)
* Add Grandstream Headset/Speaker Ring

Add variable to choose whether the speaker rings with the headset.

* Add Speaker Only option

Add note that speaker only is supported with a value of 2.
2021-06-21 20:17:58 -06:00
demonspork bcc78c1487 Yealink Dual Registration for T40P (#5968)
The t40p template was missing the rules for setting the transport type for the secondary server for dual registration.
2021-06-10 01:11:01 -06:00
demonspork 7133f35af5 Use epoch times for CDR Imports (#5955)
* Use epoch times for CDR Imports

There has been some discussion of edge cases for CDR Importing time zones/time stamps.

This modification makes the start_stamp, answer_stamp, and end_stamp values use the corresponding _epoch times for import into the v_xml_cdr table to remove any chance of time zone mis-alignment.

* Set Call recording date with Epoch

Use the start_epoch to set the call recording date.
2021-05-26 09:11:09 -06:00
demonspork 0acb7c4ac3 Yealink Support Searching Remote Phonebook on Dial pad (#5953)
By default, the dial pad only searches the Local phonebook and recent call history for suggestions while dialing. This adds support for searching the Remote Phonebook if configured and enabled. There is also commented out the definition to search an LDAP phonebook if one has been configured elsewhere.
2021-05-24 15:19:39 -06:00
demonspork 81fa140793 Restore grandstream_ipv_mode changes
Accidentally clobbered the grandstream_ipv_mode variable changes, putting them back.
2021-05-14 16:51:56 -05:00
demonspork 0e17971798 Grandstream Fix Logic for outbound proxy and secondary servers when using SRV records
There was an illogical if/else statement that the "else" condition would always set a null value, so it didn't really matter. Re-wrote it to properly filter if the transport is set to dns srv and not affix the SIP Port to the server address.
2021-05-12 09:38:06 -05:00
demonspork 81d91ce6b8 Fix HT802 Line 2 not setting SRV DNS
DNS Type wasn't being applied to the second line.
2021-05-12 07:56:53 -05:00
demonspork 01e2339ec1 GXP21XX Dual Registration Support
This is a new feature for grandstream, supporting dual simultaneous registrations. Only the very latest firmware 1.0.10.35 has it fully working, the last few versions had various partially working versions. This formats the username correctly when a secondary server is present.

There are more phone models that support this feature, but since it has been hit and miss on getting it going I am not going to enable it on those templates unless I have one of each to fully test.
2021-05-06 00:52:07 -05:00
demonspork d53bac7f55 Dialplan Fix for Feature Key Sync Race
This is a dialplan approach to fix the feature key sync loop/race with yealink phones. This aproach may also need to be extended to the Call Forward dialplans as well. It limits the number of simultaneous calls for a particular user to change their DND/Forwarding status to a single call at a time. This prevents the infinite loops that the yealinks can get into if the user presses the DND button too quickly with feature key sync enabled.

I am also reverting the lua fix because it was not reliable and can still easily allow the loop to occur.
2021-04-06 15:35:40 -05:00
demonspork 9b311f2d78 Hide Disabled Domains from domain Selector
Disabled domains can still by managed by going to the Domains app and clicking Manage.
2021-03-29 10:49:49 -05:00
demonspork 30844d90aa Add Domain and Global buttons on the respective settings pages for easy navigation 2021-03-26 16:52:05 -05:00
demonspork ea8aa47029 Add direct link button for dynamic destinations
Added a button that links directly to the currently selected destination's edit page if you have the permission to view or edit it.
2021-03-22 20:59:18 -05:00
demonspork efd27fbe90 fix send_email function for multi-part addresses
The send_email function wasn't successfully parsing ; or , separated email address lists. I simplified it's processing.

While I was at it I removed the "valid email" check from email_test.php because that step is already being done in the send_email function that is called and it safely returns the appropriate error. I would have had to rewrite that function to handle the multiple email lists otherwise.
2021-03-19 19:15:32 -05:00
demonspork 3ef6cf05db Merge branch 'master' into Fix-DND-Feature-Sync-Loop 2021-03-19 11:12:44 -05:00
demonspork cf1dfe9070 Fix DND Feature Sync loop
Add Delay to prevent infinite feature key Loops on some phones (Yealink....)
2021-03-18 20:05:31 -05:00
demonspork b847f95987 Add "Settings" link to Domains list
Skip the step of clicking on the domain then clicking settings. I very rarely want to edit a domain's basic settings, 99% of the time I am wanting to either manage the domain or edit domain_settings.
2021-03-11 14:01:55 -06:00
demonspork d7eccddf25 Fix follow_me_uuid error when enabling DND
The follow me update code in do_not_disturb.lua was being executed even when the follow me uuid didn't exist. Let me know if this is the wrong approach to fix this in lua, I'm not particularly well versed in this but this seemed to have fixed it in my testing.

I have some concerns about this section of code in general though, it seems that enabling server side DND will turn off follow me, but then turning off DND won't return follow me to its original state. Is this the intended behavior? and if so we might need to make a workaround.
2021-03-11 11:29:05 -06:00
demonspork 99fb4ae078 Grandstream: Hide BLF Remote Status And More Distinctive Ring
Hide the other connected party on the BLF of supported phones. When not hidden a busy BLF will show the other connected party/sttaus of the call by flashing back and forth between the BLF label and the caller ID.
It also impacts the park buttons, but they typically only show the word "park" because of the character limitations.
Also did more effective find/replace for the distnctive ring variables with regex!
2021-03-02 21:34:25 -06:00
demonspork 1d9694a671 Grandstream template nway conference support
Support enabling nway conference with Grandstream phones if nway_conference is set to true. If it is not true, it sets the conference URI back to blank to restore local conference
2021-02-25 17:10:49 -06:00
demonspork 0f9098cfb4 Grandstream: Plantronics EHS and additional non-clobbering of settings
Grandstream template updates to support plantronics EHS via grandstream_headset_type and grandstream_headset_key_mode variables.
Also updated wallpaper and screensaver if/else statements to leave out the variables if they are not defined instead of clobbering the user setting. If you want to mandate a certain setting, just set the variable. If the variable is unset it will not overwrite on provision and allow the previous setting to remain.
2021-02-25 15:23:33 -06:00
demonspork c11589b1c3 Track Voicemail Message Success/Failure in CDR
Track whether or not a message was actually left in the voicemail box. Previously we only knew that voicemail answered, now we know whether the caller left a message.
Callers who didn't leave a message now show up in the "Cancelled" call filter in xml_cdr.php

Bonus: Fixed a bug with the originating_leg_uuid that was breaking extension summary from a previous commit and some other minor bugs/typos.
2021-02-21 21:09:37 -06:00
demonspork 0ef2551698 Exclude cc_side agent legs from missed_call
Excluded cc_side = agent calls from being marked as missed_call = true

Fixed the previous performance issue with adding the cc_side != 'agent' to the SQL and removed its filter from the rendering loop for the xml_cdr.
2021-02-21 18:26:24 -06:00
demonspork b5272984d1 Don't filter LOSE_RACE of already filtering originating_leg_uuid
It is redundant to filter out LOSE_RACE when originating_leg_uuid is also filtered, there is an overlap where every call with LOSE_RACE also has an originating_leg.
2021-02-20 11:51:24 -06:00
demonspork 77974b71dc Fix Query performance for cc_side agent
For some unexplained reason, including the `"and cc_side != 'agent'` in the WHERE tanks the query performance from seconds to minutes on Postgres 9.4. It runs great on Postgresql 13. Reverting to the "blank content while writing the page content" approach for this value unless I can find the source of the problem. - Oh, also removed an unnecessary condition that prevents you from filtering by LOSE_RACE.
2021-02-20 11:51:24 -06:00
demonspork 92dc62a7b4 Fix TTA display bug in Export CDR PDF
Same thing as in the xml_cdr.php page display. If the call is answered instantly, less than a second, then the difference is 0s, and the 0s is a visual indicator that the call was answered, it just took less than a second. Calls that didn't get answered have a large negative number stored in the TTA field, 0 is an answered call.
2021-02-20 11:51:24 -06:00
demonspork d150f16b9d Fixed "Failed" call status in CDR
Re-implemented the commented out "Failed" call status SQL filter. It was no different than leaving the "Call status" search box empty. Removed the send_refuse restriction.
2021-02-20 11:51:24 -06:00
demonspork 56a318b2f0 Fix TTA display bug
If the TTA is 0 because the call was answered in less than a second (so that the answer_epoch and start_epoch are in the same second), it would not display the TTA at all. This is safe to include 0 because "unanswered" calls are going to have a TTA that is is the negative value of the start time, significantly lower than 0.
2021-02-20 11:51:24 -06:00
demonspork ef38b15cdc Add new missed call rules to HTTP CDR Imports
Add new missed call rules to HTTP CDR Imports. They had only been added to the xml_cdr class used by the file import.
2021-02-20 11:51:24 -06:00
demonspork 1a1edf1195 Improved Missed Call accuracy, cdr statistics, and hide duplicated CDRs from Enterprise Ring Groups
Changes
--------
  - Improve CDR Import Logic so that missed_call column is more accurate to the "missed" status. It would previously mark unanswered outbound calls as "missed". These are their own category of call.
  - Don't mark the CDRs of the "legs" of an Enterprise Ring Group call as missed, only the originating_leg will be marked (one missed call per call) - We could also just "skip" importing these call legs. Simultaneous ring groups don't have these duplicated CDRs for every ringing phone. The "Skip" approach might make most of the rest of this work irrelevant.
  - Create `originating_leg_uuid` column in v_xml_cdr and import it into the database during CDR imports so it is available for filtering Enterprise Ring Group calls out of CDRs and reports.
  - Move logic that hides the agent leg of CC calls, LOSE_RACE calls, and the Enterprise Leg hiding code from xml_cdr.php into xml_cdr_inc.php into the SQL query WHERE clause so the CDR page looks more consistent. The logic is the same, but these calls are now excluded from the query result entirely instead of having to "skip" rendering them in the list on the xml_cdr.php page.
  - Improved CDR statistics page to use the missed_call variable instead of relying upon billsec and answer_stamp/answer_epoch. Added the same logic as the xml_cdr pages to the query so it excludes enterprise ring group call legs.
  - Laid the query groundwork in xml_cdr_statistics to report on Average TTA (No UI changes yet to include that statistic)

Retroactive Changes
---------------------
There are a few changes going back in time to bring everything in line with this better reporting accuracy:
  - If you want the populated the `originating_leg_uuid column` in `v_xml_cdr`, it will rely upon having the `json` column and not having deleted the data from it like I know some people do for space saving.
  - If you don't have the json column,  you are mostly out of luck for hiding the duplicate legs of Enterprise ring group calls. It might be possible, but it isn't going to be easy.
  - On Newer Versions of postgres, this works:
```
UPDATE v_xml_cdr SET originating_leg_uuid = (json->'variables'->>'originating_leg_uuid')::uuid WHERE json->'variables'->>'originating_leg_uuid' IS NOT NULL;
```
  - For some reason on postgres 9.4, I had to UPDATE every single record because I couldn't get it to allow the json syntax properly after the WHERE. This is fine, it doesn't change the end result it just means it has to run the UPDATE on every record, which will take a while
```
UPDATE v_xml_cdr SET originating_leg_uuid = (json->'variables'->>'originating_leg_uuid')::uuid;
```
  - To remove the `missed_call = true` on all your previous outbound records so that they don't show up when you filter on missed (outbound unanswered calls can be accurately listed with TTA max 0 and direction outbound)
```
UPDATE v_xml_cdr SET missed_call = false WHERE direction = 'outbound' AND missed_call = true;
```
2021-02-20 11:51:24 -06:00
demonspork 202bc7363e Fixed "Missed" link and exclude LOSE_RACE from CDR stats
Simple change to exclude lose_race and fix a URL change for the xml_cdr page.
2021-02-16 21:21:59 -06:00
demonspork 89c51da324 Add nway conference network URI to Yealink Templates
Support for the nway_conference variable and dialplan (disabled by default) baked into the templates.
2021-02-01 13:59:54 -06:00
demonspork 8fb5ffb553 Destination Emergency Checkbox Spacing Fix
Add a missing non-breaking space to fix the positioning of the checkbox.
2021-01-11 10:24:30 -06:00
demonspork 9cf580c512 Allow Setting Default transcription state
When creating a new extension/voicemail box it can have a global/domain default setting for whether to enable transcription.
`transcription_enabled_default` default setting that determines what status transcription should be for all new extensions/voicemails.
2021-01-06 13:16:19 -06:00
demonspork ff498aa6f9 Yealink Add original party caller ID to call history for picked up call park and call intercept.
Add the ability for the "History" to show the original caller ID when picking up parked/intercepted calls instead of the history showing the dial code that was used to pick up the call. The Call History on the phones would show park+*5901 after using a button to pick up a parked call. The Caller's name would display properly during the call but wasn't in the history unless this variable is set.
2020-12-22 10:54:45 -06:00
demonspork c3704c6172 Add Support for Validated Emergency Destinations/Caller ID
This adds emergency_caller_id_select permissions. and an "Emergency" checkbox to destinations. When emergency_caller_id_select permssion is added, the "Emergency Caller ID number" and name become a dropdown in the Extension and only show Destinations that have the "Emergency" checkbox selected to indicate they are valid for emergency calls.
2020-12-11 18:24:14 -06:00
demonspork 5a39dbf68e Prevent Users without permission from clobbering ring_group_caller_id_name and number
Bring the ring_group_caller_id_name and number fields and permissions in line with the prefix permissions so that users without permission don't overwrite those those fields by hitting save.
2020-12-02 20:00:55 -06:00
demonspork 15894f4e17 Fixed Issue with extension limits preventing Extension Search
Extension searches would fail if an extension limit was set. This is because the unset($parameters) that was used at the end of the query that counts the extensions is also unsetting the "search" parameter that was set previously. I moved the //get total extension count for domain query to happen before the search parameter is added to fix it.
2020-11-19 17:18:51 -06:00
demonspork 99e2060a50 Yealink Local Directory
Enable Local Directory. Disabled by default to preserve existing behavior (variable unset in configuration file)
2020-11-18 12:51:11 -06:00
demonspork 80fa9cfe7d Fix displaying array order for settings of type array
the *_setting_order was missing from the SELECT queries for all 3 places I could find that use this mechanism. The device settings don't seem to use it.
2020-10-19 18:46:38 -05:00
demonspork b0bbae3a40 GXP17xx Template Improvements
Various basic variables were missing like transport type and sip_port and basic things were wrong like Accept Incoming SIP from Proxy Only was disabled.
This template P codes are almost identical to the GXP16XX except that the loops for button programming doesn't seem to work with it at least with my limited testing, so they are left out for now.

Tested and working with firmware 1.0.1.89
2020-10-19 00:11:43 -05:00
demonspork 05f5f8692d Fix Config URLs for unconfigured Grandstream Phones
Fix config URL so that the phones don't get an invalid URL when $domain_name is unset. They would previously receive `/app/provision` with no domain/ip included, which makes the phone unable to provision again once they have been added to the Devices page without manually re-setting the config URL or factory defaulting the device.

The alternative solution is that the PHP code could always ensure that the $domain_name variable is set even if the device doesn't exist. My suggestion is to see if it can be set to the same domain/IP as the original provision request from this unconfigured device
2020-10-18 12:34:52 -05:00
demonspork d5b88ba4dc Fix Indention
Spaces instead of tabs :)
2020-10-16 18:51:32 -05:00
demonspork 21fd701e69 Disable grandstream_feature_key_sync by default
Disable grandstream_feature_key_sync by default because it requires the lua.conf.xml modification for the server to work with it.
2020-10-16 18:49:06 -05:00
demonspork 083453784b Grandstream GXP and GRP feature Key Sync
Grandstream GXP and GRP feature key sync variables.
2020-10-16 18:47:01 -05:00
demonspork 324468c3fd Add grandstream_speaker_ring_volume to all templates
Excludes the P8352 value if the default setting grandstream_speaker_ring_volume is unset. Depends on PR #5522

Before anyone asks, Mandatory just means that the variable must be valid, not that it must be included in every XML download. The phone already has a valid value in its internal settings, so as long as we stay safe from setting it to an empty value or outside of the range of 0-7, we are safe. Excluding it is a valid option, which is also true for all settings labelled Mandatory in the Grandstream templates.
2020-10-09 23:15:31 -05:00
demonspork 03c41aafa5 Merge pull request #4 from fusionpbx/master
Pull Upstream
2020-10-09 22:16:46 -05:00
demonspork fec8752a8a Add grandstream_call_waiting and sip_port variables to Grandstream AT… (#4887)
* Add grandstream_call_waiting and sip_port variables to Grandstream ATA Templates

* Disable Local Feature Codes
2019-11-25 15:21:18 -07:00