Files
fusionpbx/app/dialplans/resources/switch/conf/dialplan/490_do-not-disturb.xml
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

25 lines
1.3 KiB
XML

<context name="{v_context}">
<extension name="do-not-disturb" number="*77,*78,*79" continue="false" app_uuid="df32d982-e39e-4ae5-a46d-aed1893873f2" enabled="true" order="490">
<condition field="destination_number" expression="^\*77$" break="on-true">
<action application="limit" data="hash dnd ${sip_from_uri} 1 !USER_BUSY"/>
<action application="set" data="enabled=toggle"/>
<action application="lua" data="do_not_disturb.lua"/>
</condition>
<condition field="destination_number" expression="^\*78$|\*363$" break="on-true">
<action application="limit" data="hash dnd ${sip_from_uri} 1 !USER_BUSY"/>
<action application="set" data="enabled=true"/>
<action application="lua" data="do_not_disturb.lua"/>
</condition>
<condition field="destination_number" expression="^\*79$" break="on-true">
<action application="limit" data="hash dnd ${sip_from_uri} 1 !USER_BUSY"/>
<action application="set" data="enabled=false"/>
<action application="lua" data="do_not_disturb.lua"/>
</condition>
<condition field="destination_number" expression="^dnd\+${caller_id_number}$" break="on-true">
<action application="limit" data="hash dnd ${sip_from_uri} 1 !USER_BUSY"/>
<action application="set" data="enabled=toggle"/>
<action application="lua" data="do_not_disturb.lua"/>
</condition>
</extension>
</context>