Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <extension name="parking_slots">
- <condition field="destination_number" expression="^(slot\d+)$" break="on-false">
- <!-- Get count of callers in the specified parking slot (FIFO) -->
- <action inline="true" application="set" data="slot_count=${fifo(count $1@demo.pbx.dynamicpacket.net)}"/>
- <action inline="true" application="set" data="slot_count=${slot_count:-3:2}"/>
- </condition>
- <condition field="${slot_count}" expression="^(\:0|ne)$" break="always">
- <!-- FIFO settings for parking FIFOs -->
- <action application="unset" data="fifo_chime_list"/>
- <action application="set" data="fifo_chime_freq=0"/>
- <!-- FIFO is empty, so park the caller: -->
- <action application="fifo" data="${destination_number}@demo.pbx.dynamicpacket.net in undef local_stream://moh"/>
- <!-- FIFO has a caller, so un-park the caller: -->
- <anti-action application="fifo" data="${destination_number}@demo.pbx.dynamicpacket.net out nowait"/>
- </condition>
- </extension>
Add Comment
Please, Sign In to add comment