1.话务步骤
分机注册(需要查询分机状态来判断是否可用)->登录(接听呼入电话需要登录到指定queue)->拨打电话->就绪->未就绪-> 登出
2. sdk调用方式
/*<--注册分机-->*/ //EslMessage eslMessage1 =inboundClient.sendApiCommand("callcenter_config agent set contact", "21010@default user/1000"); //System.out.println("#####dial eslMessage: "+eslMessage1.getHeaders().toString()); //System.out.println("#####dial eslMessage: "+eslMessage1.getBodyLines().toString()+"=&&="+eslMessage1.getBodyLines().get(0));
/*<--查询分机状态-->*/ // EslMessage eslMessage=inboundClient.sendApiCommand("list_users", "group default user 1000"); //System.out.println("#####eslMessage: "+eslMessage.getHeaders().toString()); //System.out.println("#####eslMessage: "+eslMessage.getBodyLines().get(0)); /*<--播放欢迎语-->*/ //inboundClient.sendBackgroundApiCommand("originate", "user/1000 &playback(/usr/local/freeswitch/sounds/huanying.wav)"); //inboundClient.sendBackgroundApiCommand("callcenter_config agent set status", "21009@default 'Available'"); /*<--就绪-->*/ //inboundClient.sendBackgroundApiCommand("callcenter_config agent set status", "21009@default 'Available'"); /*<--登出-->*/ //inboundClient.sendBackgroundApiCommand("callcenter_config agent set status", "21009@default 'Logged Out'"); /*<--拨打电话异步(没有事件消息)-->*/ //inboundClient.sendBackgroundApiCommand("originate", "user/1000 1001"); /*<--拨打电话同步-->*/ //EslMessage eslMessage1=inboundClient.sendApiCommand("originate", "user/1000 1001"); //System.out.println("#####dial eslMessage: "+eslMessage1.getHeaders().toString()); //System.out.println("#####dial eslMessage: "+eslMessage1.getBodyLines().toString()+"&&"+eslMessage1.getBodyLines().get(0)); /*<--登录到queue-->*/ //inboundClient.sendBackgroundApiCommand("callcenter_config tier add", "support@default 21009@default 1 1"); //callcenter_config tier set [key(state|level|position)] [queue name] [agent name] [value] //*<--登录到queue-->*/ // inboundClient.sendBackgroundApiCommand("callcenter_config tier add", "support@default 21009@default 1 1"); //EslMessage eslMessage1=inboundClient.sendApiCommand("callcenter_config tier add", "support@default 21009@default 1 1");; //#####dial eslMessage: [-ERR Tier already exist!]&&-ERR Tier already exist! //System.out.println("#####dial eslMessage: "+eslMessage1.getHeaders().toString()); //System.out.println("#####dial eslMessage: "+eslMessage1.getBodyLines().toString()+"&&"+eslMessage1.getBodyLines().get(0)); /*<--这个queue未就绪-->*/ // support@default 21009@default on break //inboundClient.sendBackgroundApiCommand("callcenter_config tier set state", "support@default 21009@default on break"); System.out.println("###################Fs excuted start############");
3.转换成软电话事件
PS:待后续完善