此篇文章转载自http://www.trixbox.com.cn

由于上次的单口卡不支持来电显示,所以前一段时间无法做来电弹出新窗口的试验,上周购买的支持来电显示的卡终于在周五送到,今天抽空做了一下来电弹出新窗口和拨出的试验,在这里与大家分享一下。

前几天,hlzhangxt告诉我通过FOP可以实现根据来电弹出来电客户的资料,所以今天没走什么弯路,直接访问http://www.asternic.org/,查看有关与CRM集成的文档,看了一下,集成比较简单,原文在这里:" />
易客CRM,中小企业最忠实的合作伙伴!

来电弹出新窗口和拨出试验成功

815℃

此篇文章转载自http://www.trixbox.com.cn

由于上次的单口卡不支持来电显示,所以前一段时间无法做来电弹出新窗口的试验,上周购买的支持来电显示的卡终于在周五送到,今天抽空做了一下来电弹出新窗口和拨出的试验,在这里与大家分享一下。

前几天,hlzhangxt告诉我通过FOP可以实现根据来电弹出来电客户的资料,所以今天没走什么弯路,直接访问http://www.asternic.org/,查看有关与CRM集成的文档,看了一下,集成比较简单,原文在这里:

CRM Integration

CRM stands for ‘Customer Relationship Manager’. You can use the Flash Operator Panel in a call center environment and integrated with a web based CRM software. This feature of the panel lets you load a web page based on the callerid of an incomming call.

You can have a web page with all the customer details before answering the phone.

This feature was introduced in version 0.11 of the Panel. To set it up, you have to specify some variables in the html page that loads the flash operator panel:

mybutton The button number of the extension you like to monitor
url The URL to call when the above extension is ringing
target The target frame or window where the URL will be loaded (if you leave it blank, it will use ‘_self’)

When a call comes in for the button monitored (mybutton), it will open a browser window pointing to url in the target. It will use method get to send the variable clid to that url, so you can perform your search for the customer record.

You have to add the variables when loading the .swf file. Open the index.html supplied and look for all the instances of operator_panel.swf and append the variables like:

operator_panel.swf?mybutton=4&url=customer.php&target=bottom

You can use an invisible frame (0 width and no borders) to load the .swf file and not clobber the screen with the panel itself if you want. To have a different button monitored, user logins, etc, you can use the method of your choice: php,modperl,asp, etc, to modify the frame that loads the swf file and set the variables accordingly. If you do not specify a mybutton variable, or if the url is empty, the CRM feature will be disabled.

原文的大致意思就是与CRM集成只需在load operator_panel.swf文件时指定需要监视的分机的位置,弹出新窗口的地址以及弹出新窗口的目标窗口(parent,self,blank等)。如果需要监视不同的分机,可以在CRM登陆页面内隐藏一个frame,这个frame加载operator_panel.swf,同时指定分机的位置以及弹出新窗口的地址。分机的位置可以在op_buttons_additional.cfg里查到。这样就可以实现当客户打进电话与某个销售代表接通前,就会在该销售代表的已登陆的CRM系统弹出一个与客户有关的窗口。

根据文档,我在C3CRM的main.php添加了一个Frame,这个Frame的row为0,然后添加一个php文件,该文件包括../panel/index_amp.php,由于是做实验,我就把分机写在index_amp.php里,并指定了一个url和弹出窗口。然后用其它电话或分机拨打200分机时,C3CRM立即弹出一个新窗口,试验成功!下一步还需要细化这个功能,希望大家对这个功能提些建议。

下午刚吃过饭,hlzhangxt就来催我开始做拨出试验,Asterisk 未来之路的第10.5里面讲可以通过callfile来拨打电话,可以做,但是比较麻烦。下载了Sugarforge的asterisk的patch,把里面的有关拨打电话的代码抽了出来,
     //Asterisk DialCode
      $timeout = 30;
      $socket = fsockopen(  $system_asterisk_server,$system_asterisk_port, $errno, $errstr, $timeout);
      fputs($socket, "Action: Login\r\n");
      fputs($socket, "UserName: ".$system_asterisk_username."\r\n");
      fputs($socket, "Secret: ".$system_asterisk_secret."\r\n\r\n");
      fputs($socket, "Action: Originate\r\n");
      fputs($socket, "Channel: SIP/200\r\n");
      fputs($socket, "Context: ".$system_asterisk_context."\r\n");
      fputs($socket, "Exten: ".$number."\r\n");
      fputs($socket, "Priority: 1\r\n");
      fputs($socket, "Callerid: 200\r\n\r\n");
      $wrets=fgets($socket,128);
比较了一下两种实现方式,觉得通过fsockopen应该比新增Callfile简单一些。于是在C3CRM的客户模块的详细信息页面的电话字段上加了一个链接,这个链接弹出一个新窗口,通过新窗口调用上面的代码拨打客户的电话,拨了几次没反应,问了一下hlzhangxt,原来的asterisk的用户名和密码搞错了,这个用户名和密码是Asterisk的API的帐号,可以通过tools的Asterisk API创建Manager。创建一个Manager,在刚才的弹出新窗口里重新指定帐号,重新拨出客户电话,我的200分机响了,等了一下,我的手机也响了,原来系统是先拨通我的分机,然后再拨通手机,这样分机才开始和手机通讯,这时出现一个问题,当拨通分机时C3CRM系统也弹出了新窗口,这时候弹出新窗口是没有意义的,看来要处理一下,当发现是本机时就禁止弹出新窗口。不管怎么样,虽然有点小问题,试验还是成功,同样也需要细化。

今天试验还算比较顺利,没有经过太多波折,比起上次落地简单多了,:).
下一步就是在C3CRM的下个版本中集成trixbox,让支持C3CRM的企业和朋友也能用上大公司才用得起的呼叫中心!

转载请注明:易客CRM官方博客 » 来电弹出新窗口和拨出试验成功

喜欢 (0)or分享 (0)