<?xml version="1.0"?>
<include>
<context name="inboundcall">
<!-- 坐席拨打611登录到队列 -->
<extension name="Agent Login">
<!--限制可登录队列的坐席分机号-->
<condition field="caller_id_number" expression="^([1,8]\d{3})$" />
<condition field="destination_number" expression="^(611)$">
<action application="answer"/>
<action application="set" data="result=${fifo_member(add f1 {fifo_member_wait=nowait}user/${caller_id_number})}"/>
<action application="log" data="INFO call_id_number: ${caller_id_number}" />
<action application="log" data="INFO Add FIFO1 agent result: ${result}"/>
<!-- <action application="hangup"/> -->
</condition>
</extension>
<!-- 坐席拨打612退出队列 -->
<extension name="Agent Logout">
<condition field="destination_number" expression="^(612)$">
<action application="answer"/>
<action application="set" data="result=${fifo_member(del f1 {fifo_member_wait=nowait}user/${caller_id_number})}"/>
<action application="log" data="INFO Del FIFO1 agent result: ${result}"/>
<!-- <action application="hangup"/> -->
</condition>
</extension>
<extension name="send caller to FIFO">
<!-- 测试的时候可以限制一下呼入的来电号码 -->
<condition field="caller_id_number" expression="^(17712345678)$" />
<!-- destination_number应该是运营商或者线路商提供的可呼入号码 -->
<condition field="destination_number" expression="^(0101234567)$">
<action application="log" data="INFO get caller ${caller_id_number} calls coming..." />
<action application="answer"/>
<action application="set" data="record_sample_rate=8000"/>
<action application="set" data="RECORD_STEREO=true"/>
<action application="record_session" data="/home/Records/inboundcall/${strftime(%Y/%m/%d/)}${caller_id_number}_${strftime(%Y%m%d%H%M%S)}.wav"/>
<action application="fifo" data="f1 in"/>
<action application="log" data="INFO get in fifo: 12345678"/>
<action application="park"/>
<!-- 不park会导致立即挂机; -->
</condition>
</extension>
</context>
</include>