Revision
15467
Author
mcollins
Date
2009-11-13 19:43:15 -0600 (Fri, 13 Nov 2009)

Log Message

FIFO onhook agent login/logout example

Added Paths

Diff

Added: freeswitch/trunk/contrib/mcollins/01_FIFO_example.xml (0 => 15467)


--- freeswitch/trunk/contrib/mcollins/01_FIFO_example.xml	                        (rev 0)
+++ freeswitch/trunk/contrib/mcollins/01_FIFO_example.xml	2009-11-14 01:43:15 UTC (rev 15467)
@@ -0,0 +1,55 @@
+<include>
+
+  <!--
+
+    This is a simple FIFO agent login/logout dialplan example. Drop it into the conf/dialplan/default directory in a standard
+    FreeSWITCH install or modify it as you see fit.
+
+    These are "on hook" agents, i.e. the phone rings when a call comes in; agents don't sit and wait on the phone.
+    Dial 6* plus the FIFO number to log in.  Example: 61* to log into "ACD1"
+    Dial 6# plus the FIFO number to log out. Example: 61# to log out of "ACD1"
+    By default there are ten slots. You can mix, match, add, etc. as you see fit.
+    NOTE: There isn't any error checking, so the the system will say that the user is logged in or out no matter what!
+
+    Send a caller to the queue by transferring to 610[0-9]; 6101 corresponds to ACD1, 6102 to ACD2, etc.
+
+    To see that your user did indeed login go to the FS CLI and type "fifo list" and it will show you everything.
+    Use "fifo list_verbose" to see LOTS of information about the FIFO queues.
+
+  -->
+
+  <!-- Agent login extension: 6*[0-9] -->
+  <extension name="Agent Login">
+    <condition field="destination_number" expression="^6\*(\d)">
+      <action application="answer"/>
+      <action application="set" data="result=${fifo_member(add ACD$1 {fifo_member_wait=nowait}user/${user_name} )"/>
+      <action application="log" data="INFO Add FIFO agent result: ${result}"/>
+      <action application="log" data="INFO User Login: ACD$1 User: ${user_name}"/>
+      <!-- No error checking, just assuming login went well... -->
+      <action application="playback" data="ivr/ivr-you_are_now_logged_in.wav"/>
+    </condition>
+  </extension>
+
+  <!-- Agent logout extension: 6#[0-9] -->
+  <extension name="Agent Logout">
+    <condition field="destination_number" expression="^6#(\d)">
+      <action application="answer"/>
+      <action application="set" data="result=${fifo_member(del ACD$1 {fifo_member_wait=nowait}user/${user_name})}"/>
+      <action application="log" data="INFO Del FIFO agent result: ${result}"/>
+      <action application="log" data="INFO User Logout: ACD$1 User: ${user_name}"/>
+      <!-- No error checking, just assuming logout went well... -->
+      <action application="playback" data="ivr/ivr-you_are_now_logged_out.wav"/>
+    </condition>
+  </extension>
+
+
+  <!-- Send a call to ACD[0-9] -->
+  <extension name="send caller to ACD">
+    <condition field="destination_number" expression="^610(\d)$">
+      <action application="answer"/>
+      <action application="set" data="fifo_music=$${hold_music}"/>
+      <action application="playback" data="ivr/ivr-hold_connect_call.wav"/>
+      <action application="fifo" data="ACD$1 in"/>
+    </condition>
+  </extension>
+</include>
Property changes on: freeswitch/trunk/contrib/mcollins/01_FIFO_example.xml
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:eol-style
   + native