[Vtigercrm-developers] vtiger 6.2 PBXManager call status + call pop-up spam

MartinG Gutowski.martin at gmail.com
Fri Mar 13 13:39:57 GMT 2015


Hello,

I'm trying out vtiger+freePBX right now, to see if it is what my workplace
is looking for.

To test it out i installed FreePBX 12.0.3 + Asterisk 12 and vtiger 6.2 on
one server.
Both programs  seem to be working without problems. I connected 2 hardware
SIP Phones to the server, added them in the FreePBX extensions (1001 & 1002)
and they are able to call each other without me spotting a problem.

vtiger seems to be working too(creating user, contacts etc.).

Next step i did was installing the VtigerAsteriskConnector and modifying
theVtigerAsteriskConnector.conf file 
Which looks like this now:

// Location where the application server will be running.
ServerIP   = 0.0.0.0
ServerPort = 8383

// Call Recordings storage path
StorageDir = /usr/src/vtigerconnector/calls

// Enable(true) or Disable(false) call recordings
Recording = true

// Location where the applications database files will be stored.
AsteriskAppDBPath = /usr/src/vtigerconnector/db

// Asterisk Server Details
AsteriskServerPublicIP = 192.168.0.244
AsteriskServerIP   = 0.0.0.0
AsteriskServerPort = 5038
AsteriskUsername   = vtiger
AsteriskPassword   = xxxxx

// Vtiger CRM URL
VtigerURL = http://127.0.0.1/vtigercrm
VtigerSecretKey = [value from the PBXManager]

then i went and added a vtiger manager in the
/etc/asterisk/manager_custom.conf:

[vtiger]
secret = xxxx
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read =
system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
write =
system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

next followed a entry in /etc/asterisk/extensions_custom.conf

[vtiger_outbound]
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

then to test the incoming call pop-up i edited the
/etc/asterisk/extensions.conf at the [from-internal] part (SIP Phones are
using the context from-internal)
exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)

In the vtiger PBXManager i am using these settings:

Vtiger Asterisk App URL	http://0.0.0.0:8383
Outbound-Kontext	vtiger_outbound
Outbound-Trunk	XYZ
Vtiger Secret Key xxxxxxxxxxx

lastly i added a CRM-Phone extension to my vtiger user(1001) and created a
test contact with a phone number (1002).

With those settings, i am able to click in vtiger to call the user and the
1001 phone rings and when i pick up, it connects to 1002 and i am able to
talk.
Problem: when i take a look in the PBXManager menu it will show the call but
the "call status" will always stay "ringing" even after hanging up.

Incoming calls basically work too. I can call 1001 from 1002 and vtiger
shows me a pop-up, that my test user is calling. picking up and talking
works, too.
Problem: vtiger does not seems to register, that i picked the call up or
later hung up. "call status" will first remain "ringing" for ~5 minutes and
then after a time-out or something change to "no-response". till the call
timed-out, vtiger continues to send me pop-up notifications about the call,
even if the call is long over.

Looking through the VtigerAsteriskConnector logs i found a error belonging
to the HangupEvent and i could guess what seems to be wrong, but i got no
idea why, or how to fix it.

Here the log of a incoming call that i accepted:

[INFO] 2015-03-13 12:34:09 a a Database connection successfull
[INFO] 2015-03-13 12:34:09 a a INSERT INTO
vtiger_webapp_asterisk(uid,srcuid,event,channel,from_number,context,callertype,direction)
VALUES(1e6153479e534420be3e1fc1ea905837,1426246446.112,AgiEvent,SIP/1002-0000000f,1002,from-internal,SIP,inbound);
[INFO] 2015-03-13 12:34:09 a a Successfully inserted data -> AgiEvent
[INFO] 2015-03-13 12:34:09 a a SELECT uid FROM vtiger_webapp_asterisk WHERE
*srcuid =1426246446.112* OR destuid =1426246446.112;
[INFO] 2015-03-13 12:34:09 a a Event:
AgiEvent->1e6153479e534420be3e1fc1ea905837
[INFO] 2015-03-13 12:34:09 b a VtigerURL:
http://127.0.0.1/vtigercrm/modules/PBXManager/callbacks/PBXManager.php
[INFO] 2015-03-13 12:34:09 b a Sending HTTP request to Vtiger
[INFO] 2015-03-13 12:34:11 a a Database connection successfull
[INFO] 2015-03-13 12:34:11 a a SELECT uid FROM vtiger_webapp_asterisk WHERE
srcuid =*1426246446.112* OR destuid =1426246446.112;
[INFO] 2015-03-13 12:34:18 a a Event:
RecordEvent->1e6153479e534420be3e1fc1ea905837
[INFO] 2015-03-13 12:34:18 a a Recording
URL:http://192.168.0.244:8383/recording?id=1e6153479e534420be3e1fc1ea905837
[INFO] 2015-03-13 12:34:18 a a Recording
URL:http://192.168.0.244:8383/recording?id=1e6153479e534420be3e1fc1ea905837
[INFO] 2015-03-13 12:34:18 a a UPDATE vtiger_webapp_asterisk SET
recordingpath = /usr/src/vtigerconnector/calls/, recordingurl =
http://192.168.0.244:8383/recording?id=1e6153479e534420be3e1fc1ea905837WHERE
uid = 1e6153479e534420be3e1fc1ea905837;
[INFO] 2015-03-13 12:34:18 a a Updating of data successfull -> RecordEvent
[INFO] 2015-03-13 12:34:18 a a SELECT recordingpath, recordingurl from
vtiger_webapp_asterisk WHERE uid = '1e6153479e534420be3e1fc1ea905837';
[INFO] 2015-03-13 12:34:18 b a VtigerURL:
http://127.0.0.1/vtigercrm/modules/PBXManager/callbacks/PBXManager.php
[INFO] 2015-03-13 12:34:18 b a Sending HTTP request to Vtiger
[INFO] 2015-03-13 12:34:19 a a UPDATE vtiger_webapp_asterisk SET callcause =
Normal Clearing, event = HangupEvent WHERE *srcuid = 1426246451.115* OR
destuid = 1426246451.115;
[INFO] 2015-03-13 12:34:19 a a Updating of data successfull -> HangupEvent
[INFO] 2015-03-13 12:34:19 a a SELECT uid FROM vtiger_webapp_asterisk WHERE
*srcuid =1426246451.115* OR destuid =1426246451.115;
[INFO] 2015-03-13 12:34:19 a a Event: HangupEvent->
[FATAL] 2015-03-13 12:34:19 a a
java.sql.SQLException: ResultSet closed
        at org.sqlite.RS.checkOpen(RS.java:84)

At the beginning the connector writes the call in the DB with a id of
1426246446.112 (marked those as Bold). I can find this call/id in the
Database. But later it uses a srcuid =1426246451.115 that does not appear in
the Database and i got no idea where it comes from. 
So my guess is, that the HangupEvent crashes since it tries to update a
database-entry that is not there.

i will try to add all my connector logs to this post.

I would be thankful if anyone can help me in figuring out where i made an
error in my configuration.

Thanks,
Martin

AgiError.log
<http://vtiger-crm.2324883.n4.nabble.com/file/n15634/AgiError.log>  
AgiInfo.log
<http://vtiger-crm.2324883.n4.nabble.com/file/n15634/AgiInfo.log>  
nohup.out <http://vtiger-crm.2324883.n4.nabble.com/file/n15634/nohup.out>  
nohup.out <http://vtiger-crm.2324883.n4.nabble.com/file/n15634/nohup.out>  
WebappError.log
<http://vtiger-crm.2324883.n4.nabble.com/file/n15634/WebappError.log>  
WebappInfo.log
<http://vtiger-crm.2324883.n4.nabble.com/file/n15634/WebappInfo.log>  




--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/vtiger-6-2-PBXManager-call-status-call-pop-up-spam-tp15634.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list