Guest User

Untitled

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