Control default recording max_length, silence_threshold, silence_seconds
Use the following default settings
- recording_max_length
- recording_silence_threshold,
- recording_silence_seconds
The current condition #vm_disk_quota <= #message_sum is checking the lengths of vm_disk_quota and message_sum, not their actual values. So, it won't compare the numeric values for your intended logic.
If they're strings that can be safely converted to numbers, use tonumber():
if (vm_disk_quota and message_sum and tonumber(vm_disk_quota) <= tonumber(message_sum)) then
-- your code
end
This will compare them as numbers, ensuring that vm_disk_quota is less than or equal to message_sum.
If the extension is in a call and also receives calls at the same time, the query will return more than one uuid causing to eavesdrop the wrong channel.
Made this change because if the XML is not generated then extension variables are not available. These variables are needed for call forward and follow me.
Use sofia_contact instead of user bridge alias. Added a useful note from @greenbea describing why there was a problem with follow me delay timing.
When you originate user/ext@domain, switch_ivr_originate will call the user endpoint. The user endpoint isn't a real endpoint. It is a shortcut to get the real dialstring from the user's XML and calls again switch_ivr_originate, so essentially, what happens is switch_ivr_originate reads twice originate_delay_start variable and waits double the time.
Your patch fixes the case when the endpoint is the user/ endpoint but will make the delay half the time if called with other endpoints like sofia.
The ultimate solution would be freeswitch to handle this in the user endpoint function. I would suggest that fusion manually get the user's dial string from the XML and call originate on it and not rely on the user (shortcut) endpoint for ring group and follow me.
Use sofia_contact instead of user bridge alias. Added a useful note from @greenbea describing why there was a problem with follow me delay timing.
When you originate user/ext@domain, switch_ivr_originate will call the user endpoint. The user endpoint isn't a real endpoint. It is a shortcut to get the real dialstring from the user's XML and calls again switch_ivr_originate, so essentially, what happens is switch_ivr_originate reads twice originate_delay_start variable and waits double the time.
Your patch fixes the case when the endpoint is the user/ endpoint but will make the delay half the time if called with other endpoints like sofia.
The ultimate solution would be freeswitch to handle this in the user endpoint function. I would suggest that fusion manually get the user's dial string from the XML and call originate on it and not rely on the user (shortcut) endpoint for ring group and follow me.