提交 9dbce7f9 authored 作者: Michael Collins's avatar Michael Collins

FIFO onhook agent login/logout example

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk/contrib@15467 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 f7c09b84
<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>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论