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
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.
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.
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
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.
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''',''...
^