asterCC, hosted call center solution based asterisk
»
zh
»
二次开发者指南
»
如何接受事件
您的足迹:
显示页面
修订记录
最近更改
网站地图
登录
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== 在asterCC框架内接受事件 ====== 在asterCC框架内指 * 系统使用B/S结构 * 在asterCC的应用管理里添加坐席工作地址 * 坐席登录asterCC,在asterCC坐席工作台界面工作 ==== 登陆页面 ==== 在每次asterCC打开坐席工作地址时,首先将会post坐席信息,内容包括: * agentmsg_appid: 应用id * agentmsg_appidentity: 应用标识串 * agentmsg_team_id: 坐席组ID * agentmsg_team_identity: 坐席组标识 * agentmsg_agent_group_id: 坐席工作组ID * agentmsg_agentno: 坐席工号 * agentmsg_application_code: 登录密码 * 如坐席界面的应用密码里未填写数据,则发送坐席所属用户密码的md5值 * agentmsg_username: 坐席所属用户用户名 * agentmsg_language: 坐席使用的语言 <note tip>对于PHP,您可以使用简单的<?php print_r($_POST);?>查询所有POST数据</note> 例如: <sxh php;html-script; title: astercclogin.php> <?php $user_name = $_POST['agentmsg_username']; $user_password = $_POST['agentmsg_application_code']; ?> <form action="index.php" method="post" name="DetailView" id="form" onsubmit="return document.getElementById('cant_login').value == ''"> <input type="hidden" name="module" value="Users"> <input type="hidden" name="action" value="Authenticate"> <input type="hidden" name="return_module" value="Users"> <input type="hidden" name="return_action" value="Login"> <input type="hidden" id="cant_login" name="cant_login" value=""> <input type="hidden" name="login_module" value=""> <input type="hidden" name="login_action" value=""> <input type="hidden" name="login_record" value=""> <input type="hidden" id="user_name" name="user_name" value='<?echo $user_name;?>' /> <input type="hidden" id="user_password" name="user_password" value='<?echo $user_password;?>' /> </form> <center>Login...</center> <script type="text/javascript"> <!-- document.getElementById('form').submit(); //--> </script> </sxh> 该文件将接收用户名和密码并且提交到index.php以完成登录(适用于sugarcrm) ==== 业务页面 ==== 为了接受到asterCC发来的呼叫事件,你需要在业务页面中添加如下javascript代码,其中192.168.1.150为astercc服务器地址 <sxh javascript;> <script type="text/javascript"> function sonAcceptHash(str){ alert(str); } </script> <script type="text/javascript" src="http://192.168.1.150/astercc_hash_event.js"></script> </sxh> sonAcceptHash是用来接收和处理呼叫事件的函数,每次有新的事件时,该函数将被调用,事件的具体信息将通过str字符串传递进来 在上面的例子中,当有新的呼叫事件传来时,将会弹出窗口显示事件内容 ====== 在asterCC框架外接受事件 ======
zh/二次开发者指南/如何接受事件.txt
· 最后更改: 2017/12/12 03:05 (外部编辑)
显示页面
修订记录
反向链接
回到顶部