感谢您支持将 vtiger asterisk 连接器(没有来电弹出窗口或点击通话)与 Elastix 4(Asterisk 11.20)、vtiger 7.1 和 java 版本集成:
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Elastix & vtiger are on same server
VtigerAsteriskConnector.properties:
ServerIP = 192.168.1.2
ServerPort = 8282
StorageDir = /var/www/html/VtigerAsteriskConnector/storage
Recording = true
AsteriskAppDBPath = /var/www/html/VtigerAsteriskConnector/storage
AsteriskServerPublicIP = 192.168.1.2
AsteriskServerIP = 192.168.1.2
AsteriskServerPort = 5038
AsteriskUsername = xxxxxxxx
AsteriskPassword = xxxxxxxx
VtigerURL = https://192.168.1.2/vtigercrm/
VtigerSecretKey = xxxxxxxxxxxxxxxxxxxxxxx
AsteriskLog = true
DatabaseLog = true
vTiger 配置:
Vtiger Asterisk App URL: https://192.168.1.2:8282
Outbound Context: vtiger-outbound
Outbound Trunk: dahdi1
Vtiger Secret Key: xxxxxxxxxxxxxxxxxxxxxxx
extensions.conf:
[from-internal]
include => from-internal-noxfer
include => from-internal-xfer
include => bad-number ; auto-generated
//add connector agi
exten => _X.,1,Agi(agi://127.0.0.1/incoming.agi)
当测试从分机 102 到 crm 用户分机 (103) 的来电内部呼叫时,由于 AGI 失败并出现“文件提前结束”错误,分机 102 呼叫在 3 秒后挂断并且在 103 不响铃,因此没有触发来电弹出窗口,呼叫记录在 PBX 管理器,振铃状态和稍后状态更新为无响应,单击记录时,触发错误“未找到您尝试访问的记录”
WebappInfo.log:
[INFO] 2018-06-14 14:57:07 a a Database connection successfull
[INFO] 2018-06-14 14:57:08 a a INSERT INTO vtiger_webapp_asterisk(uid,srcuid,event,channel,from_number,context,callertype,direction) VALUES(003a6ee9d1ee4913a45af4f4d74a681d,1528981025.647,AgiEvent,SIP/102-000000cf,102,from-internal,SIP,inbound);
[INFO] 2018-06-14 14:57:08 a a Successfully inserted data -> AgiEvent
[INFO] 2018-06-14 14:57:08 a a SELECT uid FROM vtiger_webapp_asterisk WHERE srcuid =1528981025.647 OR destuid =1528981025.647;
[INFO] 2018-06-14 14:57:08 a a Event: AgiEvent->003a6ee9d1ee4913a45af4f4d74a681d
[INFO] 2018-06-14 14:57:08 b a VtigerURL: https://192.168.1.2/vtigercrm/modules/PBXManager/callbacks/PBXManager.php
[INFO] 2018-06-14 14:57:08 b a Sending HTTP request to Vtiger
AgiInfo.log:
[INFO] 2018-06-14 14:57:05 a log Asterisk Login Successfull
[INFO] 2018-06-14 14:57:05 org.asteriskjava.manager.internal.ManagerConnectionImpl info Connecting to 192.168.1.2:5038
[INFO] 2018-06-14 14:57:05 org.asteriskjava.manager.internal.ManagerConnectionImpl info Connected via Asterisk Call Manager/1.3
[WARN] 2018-06-14 14:57:05 org.asteriskjava.manager.internal.ManagerConnectionImpl warn Unsupported protocol version 'Asterisk Call Manager/1.3'. Use at your own risk.
[INFO] 2018-06-14 14:57:05 org.asteriskjava.manager.internal.ManagerConnectionImpl info Successfully logged in
[INFO] 2018-06-14 14:57:05 org.asteriskjava.manager.internal.EventBuilderImpl info No event class registered for event type 'fullybooted', attributes: {privilege=system,all, event=FullyBooted, status=Fully Booted}. Please report at http://jira.reucon.org/browse/AJ
[INFO] 2018-06-14 14:57:07 org.asteriskjava.manager.internal.ManagerConnectionImpl info Determined Asterisk version: Asterisk 1.6
[INFO] 2018-06-14 14:57:07 a log org.asteriskjava.manager.event.ConnectEvent[dateReceived='Thu Jun 14 14:57:07 EET 2018',server=null,protocolidentifier='Asterisk Call Manager/1.3',sequencenumber=null,timestamp=null,systemHashcode=1470855628]
[INFO] 2018-06-14 14:57:07 b log Sending HTTP request to webapp
[INFO] 2018-06-14 14:57:07 IncomingCall log Started Manager Event
[WARN] 2018-06-14 14:57:07 org.asteriskjava.manager.internal.EventBuilderImpl warn Unable to set property 'connectedlinename' to '<unknown>' on org.asteriskjava.manager.event.StatusEvent: no setter. Please report at http://jira.reucon.org/browse/AJ
[INFO] 2018-06-14 14:57:07 b log Sending HTTP request to webapp
[WARN] 2018-06-14 14:57:07 org.asteriskjava.manager.internal.EventBuilderImpl warn Unable to set property 'connectedlinenum' to '<unknown>' on org.asteriskjava.manager.event.StatusEvent: no setter. Please report at http://jira.reucon.org/browse/AJ
[INFO] 2018-06-14 14:57:07 a log org.asteriskjava.manager.event.StatusEvent[dateReceived='Thu Jun 14 14:57:07 EET 2018',privilege='Call',server=null,calleridname='102',extension='103',link=null,channel='SIP/102-000000cf',seconds='2',calleridnum='102',context='from-internal',actionid=null,callerid='102',state='Up',uniqueid='1528981025.647',channelstatedesc='Up',timestamp=null,variables=null,internalactionid='493765340_6',bridgedchannel=null,priority='1',sequencenumber=null,channelstate='6',bridgeduniqueid=null,accountcode=null,account=null,systemHashcode=2098591697]
[INFO] 2018-06-14 14:57:07 b log Sending HTTP request to webapp
[INFO] 2018-06-14 14:57:07 a log org.asteriskjava.manager.event.StatusCompleteEvent[dateReceived='Thu Jun 14 14:57:07 EET 2018',server=null,internalactionid='493765340_6',sequencenumber=null,actionid=null,items='1',timestamp=null,systemHashcode=248508687]
[INFO] 2018-06-14 14:57:07 b log Sending HTTP request to webapp
[FATAL] 2018-06-14 14:57:08 com.vtiger.apps.asterisk.agi.b.c a
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at com.vtiger.apps.asterisk.agi.b.c.a(SourceFile:48)
at com.vtiger.apps.asterisk.agi.actions.IncomingCall.process(SourceFile:55)
at com.vtiger.apps.asterisk.agi.actions.IncomingCall.service(SourceFile:26)
at org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:144)
at org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
[INFO] 2018-06-14 14:57:08 org.asteriskjava.manager.internal.EventBuilderImpl info No event class registered for event type 'softhanguprequest', attributes: {channel=SIP/102-000000cf, cause=32, privilege=call,all, event=SoftHangupRequest, uniqueid=1528981025.647}. Please report at http://jira.reucon.org/browse/AJ
[FATAL] 2018-06-14 14:57:08 IncomingCall log
[FATAL] 2018-06-14 14:57:08 IncomingCall log Failed to authenticate Vtiger Secret Key
[INFO] 2018-06-14 14:57:08 a log Logging off from Asterisk
[INFO] 2018-06-14 14:57:08 org.asteriskjava.manager.internal.ManagerReaderImpl info Terminating reader thread: No more lines available: null
[INFO] 2018-06-14 14:57:08 org.asteriskjava.manager.internal.ManagerConnectionImpl info Closing socket.
[INFO] 2018-06-14 14:57:08 IncomingCall log Exiting from agi script
[INFO] 2018-06-14 14:57:08 org.asteriskjava.fastagi.internal.FastAgiConnectionHandler info End AgiScript com.vtiger.apps.asterisk.agi.actions.IncomingCall on Asterisk-Java DaemonPool-1-thread-1
我切换到 Elastix 2.4(Asterisk 1.8.20.0),仍然有同样的错误。java 版本:java 版本 "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) Client VM (build 25.171-b11,混合模式)
AgiError.log [WARN] 2018-06-18 07:18:00 org.asteriskjava.manager.internal.EventBuilderImpl 警告无法在 org.asteriskjava.manager.event.StatusEvent 上将属性“connectedlinename”设置为“”:没有设置器。请在http://jira.reucon.org/browse/AJ报告 [WARN] 2018-06-18 07:18:00 org.asteriskjava.manager.internal.EventBuilderImpl 警告 Unable to set property 'connectedlinenum' to '' on org.asteriskjava.manager.event.StatusEvent:没有设置器。请在http://jira.reucon.org/browse/AJ报告 [致命] 2018-06-18 07:18:01 com.vtiger.apps.asterisk.agi.bc org.xml.sax.SAXParseException; 行号:1;列号:1;文件过早结束。在 com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) 在 com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)在 com.vtiger.apps.asterisk.agi.bca(SourceFile:48) 在 com.vtiger.apps.asterisk.agi.actions.IncomingCall.process(SourceFile:55) 在 com.vtiger.apps.asterisk.agi.actions .IncomingCall.service(SourceFile:26) 在 org.asteriskjava.fastagi.internal.AgiConnectionHandler.runScript(AgiConnectionHandler.java:144) 在 org.asteriskjava.fastagi.internal.AgiConnectionHandler.run(AgiConnectionHandler.java:116) 在 java。 util.concurrent.ThreadPoolExecutor。