Added: freeswitch/trunk/contrib/jmesquita/conf/01_fifo.xml (0 => 15478)
--- freeswitch/trunk/contrib/jmesquita/conf/01_fifo.xml (rev 0)
+++ freeswitch/trunk/contrib/jmesquita/conf/01_fifo.xml 2009-11-16 05:41:17 UTC (rev 15478)
@@ -0,0 +1,69 @@
+<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}loopback/1${user_name}/default/XML )"/>
+ <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}loopback/1${user_name}/default/XML)}"/>
+ <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>
+
+ <!--
+ This will be executed everytime the queue is dialing to an agent.
+ Here we can add limit, insert things into DB or whatever we want when the consumer
+ is being connected.
+ -->
+ <extension name="Dial to Agent from Queue">
+ <condition field="destination_number" expression="^1(10[01][0-9])$" >
+ <action application="bridge" data="user/$1@$${domain}" />
+ </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>