演练:报号业务
转接坐席成功后,一般会对主叫播报其所需要的电话号码,简称“报号”。
坐席进行自动报号一般有两种实现方式。
一种是呼通坐席后,坐席将需要播报的号码设置到随路数据中,在坐席挂机后,脚本获取随路数据,解析出随路数据中的号码,进行播报。
该种方式请参照坐席挂机回业务。
另一种是呼通坐席后,坐席单步转到一个报号的自动业务进行报号,本章节是对第二种方式进行演练
本章节实现这样一个场景:用户拨打一个电话后出发VXML业务,业务首先进行排队接续坐席,
接通坐席后询问要查询某酒店联系电话,坐席单步转到报号的业务,对用户进行号码播报。
呼叫接入坐席
requestRouting.xml
该脚本的流程是,
1.先用排队预测标签获取排队参数,如果排队等待时间大于5s,则向用户确认是否进行排队;
否则直接进行排队。排队预测超过3次就退出
2.排队使用RequestRouting的单独排队功能。排队失败后则跳转到步骤1,将排队预测次数加1.
3.排队成功后使用transfer标签进行接续坐席
<?xml version=“1.0” encoding=“gb2312”?> <vxml version=“2.0” application=“approot.vxml”> <var name=“Skill” expr=“1”/> <var name=“first” expr=“0”/> <var name=“WaitTime” expr=“0”/> <var name=“WaitNum” expr=“0”/> <var name=“”FreeAgent expr=“0”/> <var name=“Play” expr=“ ”/> <var name=“AgentPhone”/> <form id=“query”> <block> <log>begin get queue status</log> </block> <object name=“QueueStatus” classid=“method://ngcc/Other/GetStatus”> <param name=“virtualcenter” expr=“1”/> <param name=“skill” expr=“Skill”/> <filled> <if cond=“QueueStatus.result==‘SUCCESS’ ”> <log> get queue status success: waitnum:<value expr=“QueueStatus.waitnum”/> freeagentnum:<value expr=“QueueStatus.freeagent”/> maxwaittime:<value expr=“QueueStatus.maxwaittime”/> avewaittime:<value expr=“QueueStatus.avewaittime”/> forecastwaittime:<value expr=“QueueStatus.waittime”/> </log> <assign name=“WaitTime” expr=“QueueStatus.waittime”/> <assign name=“WaitNum” expr=“QueueStatus.waitnum”/> <assign name=“”FreeAgent” expr=“QueueStatus.freeagent”/> <if cond=“first ==0”> <if cond=“WaitTime >5 ”> <goto next =“#fir_queue”/> <else/> <goto next=“#requestRouting”/> </if> <elseif cond=“first<3”/> <goto next=“#sec_queue”/> <else/> <exit/> </if> <else/> <log> get queue status failure,ErrorCode:<value expr=“”QueueStatus.reason”/>; </log> <assign name=“first” expr=“first+!”/> <prompt>排队查询失败</prompt> <exit/> </if> </filled> </object> </form> <form id=“fir_queue”> <block> <log> first wait queue </log> </block> <field name=“fir_wait” type=“digits?maxlenth=1;minlength=1”> <prompt>排队等待请按1,退出请挂机</prompt> <filled> <if cond=“fir_wait == ‘1’ ”> <goto next =“#requestRouting” /> <else/> <exit/> </if> </filled> </field> </form> <form id=“sec_queue”> <block> <log> wait queue more </log> </block> <field id =“sec_queue ”> <block > <log> wait queue more </log> </block> <field name=“sec_wait” type=“digits?maxlength=1;minlength=1”> <prompt>排队失败,预计等待时长为<value expr=”WaitTime”/>秒,继续排队等待请按1,退出请挂机</prompt> <filled> <if cond=“sec_wait ==‘1’ ”> <goto next =“#requestRouting”/> <else/> <exit/> </if> </filled> </field>
</form> <form id=“requestRouting”> <object name=“Queue” classid=“method://cm-ngcc/Other/RequestRouting”> <param name=“WaitingAudio” expr=“ipfile://wav”/> <param name=“CallData” expr=“application.s_keypressed”/> <param name=“AudioRepeate” expr=“3”/> <param name=“ConnectTimeOut” expr=“6”/> <param name=“virtualcenter” expr=“1”/> <param name=“RoutingType” expr=“1”/> <param name=“RoutingInfo” expr=“Skill”/> <param name=“WaitReturn” expr=“1”/> <filled> <log> result:<value expr=“Queue” /> agentphone:<value expr=“Queue$.agentphone”/> </log> <assign name=“Agentphone” expr=“Queue$.agentphone”/> <if cond=“Queue ==‘OPR_SUCCESS’”> <goto next=“#Transfer”/> </if> <if cond=“Queue==‘OPR_FAILURE’”> <assign name=“first” expr=“first+1”/> <goto next=“#query”/> </if> <log>=======errorCode:<value expr=“Queue$.errorCode”/>=======</log> <goto next =“#Transfer”/> </filled> </object> </form> <form id=“Transfer”> <transfer name=“tran_test” bridge=“true” destexpr=“Agentphone” maxtime=“5s”> <filled> <log> Transfer success,holding time<value expr=“tran_test$.duration” />秒 </log> <exit/> </filled> </transfer> </form></vxml>坐席单步转到报号业务reportPhone.vxml该脚本是坐席通过单步转触发该脚本的执行。该脚本是对用户进行播报号码。 <?xml version=“1.0” encoding=“gb2312”?><vxml version=“2.0”> <var name=“Specialssp”/> <var name=“Oldssp”/> <form> <var name=“outputinfo”/> <var name=“Curssp”/> <object name=“getcurssp1” classid=“method://ngcc/Other/GetCurCallID”> <param name=“Oldssp” expr=“CallID”/> <filled> <prompt bargein=“false”> 初始呼叫:<value expr=“Oldssp”/> </prompt> </filled> </object> <!—对主叫放音—> <var name=“CurrentCallID” expr=“Oldssp”/> <object name=“connectres” classid=“method://ngcc/Call/ExtStartPlay”> <param name=“CallID” expr=“CurrentCallID”/> <param name=“PlayType” expr=“5”/> <param name=“PlayPara” expr=“‘88880009’”/> </object> </form></vxml></field>