Update valet park. 1. Set the orbit extension to return the call to the original extension that referred it if the call is not answered before the timeout. 2. If the parking lot is occupied return the call to the extension that tried to park it. Team effort by Gill, James, and Mark.

This commit is contained in:
Mark Crane 2013-12-20 22:15:18 +00:00
parent b0c6deb3fd
commit 6a0ca57fdc
1 changed files with 19 additions and 5 deletions

View File

@ -1,9 +1,23 @@
<context name="{v_context}">
<extension name="valet_park" app_uuid="3cc8363d-5ce3-48aa-8ac1-143cf297c4f7" enabled="true">
<condition field="destination_number" expression="^(park\+)?(\*590[0-9])$" >
<action application="set" data="valet_parking_timeout=300" />
<action application="set" data="valet_parking_orbit_exten=0" />
<action application="valet_park" data="park@${domain_name} $2" />
<extension name="valet_park" continue="true" app_uuid="3cc8363d-5ce3-48aa-8ac1-143cf297c4f7" enabled="true">
<condition field="destination_number" expression="^(park\+)?(\*59[0-9][0-9])$" break="never"/>
<condition field="${sip_h_Referred-By}" expression="sip:(.*)@.*" break="never">
<action application="set" data="referred_by_user=$1"/>
</condition>
<condition field="destination_number" expression="^(park\+)?(\*59[0-9][0-9])$" break="never">
<action application="set" data="park_in_use=false" inline="true"/>
<action application="set" data="park_lot=$2" inline="true"/>
<action application="log" data="INFO park_in_use is [${park_in_use}]"/>
</condition>
<condition field="destination_number" expression="^(park\+)?(\*59[0-9][0-9])$"/>
<condition field="${cond ${sip_h_Referred-By} == 0 ? false : true}" expression="true" break="never">
<action application="set" data="park_in_use=${regex ${valet_info park@${context}}|${park_lot}}" inline="true"/>
</condition>
<condition field="${park_in_use}" expression="true" break="never">
<action application="transfer" data="${Referred-By} XML ${context}"/>
<anti-action application="set" data="valet_parking_timeout=20"/>
<anti-action application="set" data="valet_parking_orbit_exten=${referred_by_user}"/>
<anti-action application="valet_park" data="park@${domain_name} ${park_lot}"/>
</condition>
</extension>
</context>