Need to validate that the fax_extension really is numeric. Also replace event_socket_mkdir that makes a directory with mkdir.lua and use a php mkdir function instead. We want to offload this off of FreeSWITCH and its safer to use the PHP function.
This change adds support for images of the current selected device on the device_edit.php page.
The images need to be stored with the provisioning templates in the following format:
* /yealink/t21p/t21p.jpg
Images loaded into the page without needing link to the direct path. This makes it possible to store images with the template and not need any form of nginx rewrite rule or any other changes.
The images are zoomable with pure CSS, no javascript required.
The announce sound previously required users to manually type in the full path of the announce sound. It has now been modified to be a hybrid dropdown which shows available recordings on the domain and also allows for the old text entry method (type in the path).
* [click_to_call] fix Call-Info header set on bleg and move dialplan order before outbound route
* Update and rename 530_click_to_call_auto_answer.xml to 25_click_to_call_auto_answer.xml
* 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.
* 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.
Efficiency Improvements.
- Use the build dialplan XML when saving a dialplan as its more efficient than running the dialplan class xml method.
- Remove delete previous dialplan details as there it seems to be redundant. There is a broader delete for dialplan details in the code.
* Fix dashboard widget for agent status management
This needed to be updated for the ext@domain call center naming change.
* Add support for On-Break and remove user_status and agent_status syncing
Users may add phone number with formatting and this breaks call forward. So this removes white spaces and formatting to ensure the call forwarding works.
* 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.
Get the destination actions from columns in the destination table instead of filtering through the dialplan details. If a destination action app is set or export then use inline = true.
* Update app_languages.php
"At max no answer, then the agent's Status will changed to 'On Break'.";
* Update app_languages.php
* Update app_languages.php
Co-authored-by: FusionPBX <markjcrane@gmail.com>
* Added missing parameter to send_email()
* Preserving the call-center queue_record_template value when saving
* Removed unused declarations using the commented-out $last_offered_call
* Fix for redirecting to previous page after login, if set
* Removed duplicate bugfix in /resources/login.php
* Redirect duplicated xml_cdr_import script
This replaces the duplicated code in v_xml_cdr_import.php with xml_cdr_import.php
This also adds a call to `$cdr->post();` in that file to then process the POSTed data from FreeSWITCH
* 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.
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.
- If the server time is set to UTC then the search needs to account for the local time zone.
- Use the database to format the date in the most efficient way.
the whole point of ring group presence is to monitor the ringing state If the call was bridged or went to timeout destination the presence should be set to terminated
- Used api_on_answer so that the recording only starts when the call is answered. Should save diskspace and prevent the need for using action: ringback.
- Added 'both,self' to the end of the bind_digit_action to fix inbound call mask.
Sometimes you can have multiple registrations for the same extension across multiple SIP profiles. This adds the functionality to fire an event for each unique SIP profile. I also added a check to see if we have already send an event for a profile since you don't want multiple events fired one SIP profile.
Context and domain are usually the same but there could be times that they are different. However code is always using the domain name for the cache key.
In troubleshooting a known FreeSwitch bug with mod_callcenter, I started to try out mod_fifo as an alternative. I realized that the dialplan that was being created by Fusion was not working. Creating a queue is very simple so I knew it wasn't a user error on my part so I dug in deeper. There were a few issues I needed to fix to get queues working again.
1. Add a "break on-true" to each condition destination_number (it was changed in two places)
2. populate the "action" for callers entering the queue via the $agent_queue_extension_number
3. remove the appended "_agent" which was added to the $queue_name which was causing the queue for entering and retrieving calls different.
4. remove the inline="true" for the action that executes the lua script
I also fixed the example comments to be accurate to how the queues should be written in the dialplan.
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.
This variable should be optional as it can be defined in other places as well. It should not be assumed that this is the only place it could be set for those that need it.
When editing in the CLI with any editor that does syntax highlight, the * breaks it. Adding on the following line /* **/ restores the right highlighting
Transcriptions using Google were broken after last commit.
transcribe_alternate_language was not defined anywhere it Google would return 400 error.
Added variable to fix the issue
Parking lots are no longer directly prefixed with *. But for backwards compatibility can be called that way still.
Parking lot name changed from `park` to `5900` to allow monitoring the whole parking lot with a BLF if desired.
Fix regex from matching 5900 to allow this dialplan to work with the valet_park_auto if enabled.
If the Referred-By header is set call the normal `auto in` code. If it isn't set that means someone called it directly, call `auto out` ato attempt to pop the calls in the lot in FIFO order.
This also changes the parking lot name from `park` to `5900` this allows phones to monitor `park+5900` to get the status of the whole parking lot. Before you would have to monitor `park+park` to get this functionality.
to dynamically change
This sets the UUID as the ID in the options list. The we use the javascript onclick listener to get the id(uuid) of the selected option and open the link to the edit page.
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.
This renames `get_profile` to `get_profiles` which either returns nil for no profiles or a array of unique profiles.
Then each function that used to take the single sip_profile was updated to take this array and send events to each profile the user is part of.
- Populated select list for all assigned agents does not scale well in the browser.
- Assigned list scales better without the all of the agents in the list.
- New select list shows all agents so that new agents can be added.
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.
Zero should not be wrapped in double quotes as it's causing an SQL error.
PGRES_FATAL_ERROR
2021-03-11 10:30:47.738673 [ERR] switch_pgsql.c:680 Error executing query:
ERROR: invalid input syntax for type numeric: "'0'"
LINE 1: ...p/c8505148-1b02-4f6f-9157-b5cf64ebcc4d.tif','','','''0''',''...
^
This is less of an improvement than the other changes I proposed since it's only doing it for one file. But it still doesn't need to pull that recordings base64 data here if it has it.
Fix device MAC address imports not normalizing.
# Context
MAC addresses were not being normalized when importing CSV files. If it is not normalized you can get a not found error when provisioning since that is checking the database with a normalized MAC address
# Overview
- Use the same normalization done in device_edit.php in device_imports.php
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! (plus a typo was made in the previous version)
I have been debugging slow loading on our CDR pages for the last few days now.
One issue that we have encountered is that currently as the page loads, it checks the filesystem for each file one at a time. In our case, we move recordings to object storage after 1 week, so each time we check for a file it passes api calls which take over 1 second each to return a result. This causes this page to not load at all for us in many cases.
Regardless, this current method is unnecessarily I/O intensive and really page load is probably not the time to be checking for each file one by one.
So this PR is the simplest solution - remove the check entirely. I would contend that the administrator should remove the record_path from the database if the file was removed so this should be acceptable.
This solves this particular issue for us, but would need feedback from others if not checking for files makes sense.
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!
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.
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.
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.
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.
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.
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.
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.
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.
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;
```
storage_type was never initialized as a setting in the database due to the y counter being reset to 0 after it. This was causing the storage_type setting to not show up in the UI.