[Vtigercrm-developers] PBXManager - Asterisk Connector Debugging

Richard Hills - Technologywise richard at tw.co.nz
Wed Nov 5 01:19:22 GMT 2014


Just an update, I have now installed 6.1 (not updated from anywhere) and 
this "just works" when I get a chance I am sure that I will find the 
issue with the upgrade / differences between the two versions and update 
here if it is anything interesting.

Now just one question, we have a click to call working, is this system 
still supposed to provide the popup for incoming calls? and if so, can 
someone tell me any additional steps required to configure this.

Thanks

On 29/10/14 09:14, Alex Martin wrote:
>
> No problem, if you need anymore let me know.
>
> *_extensions.conf (extensions_custom.conf in freepbx)_*
>
> [vtiger-out]
>
> exten => _X.,1,GotoIf($[${LEN(${CALLERID(num)})} = 11]?3) // I have 
> this to check for 11 digit number. Skips to 3 if it is 11 digits.
>
> exten => _X.,2,Set(CALLERID(num)=1${CALLERID(num)}) //Add a 1 if there 
> is only 10 digits as most carriers in the USA require 11 digits to 
> dial. Not sure about the uk, haven’t been home in a few years.
>
> exten => _X.,3,Agi(agi://0.0.0.0/incoming.agi)
>
> *_Sip.conf:_*
>
> [exampletrunk]
>
> type=friend
>
> secret=secret
>
> username=username
>
> host=sip.yourhost.com
>
> dtmfmode=rfc2833
>
> context=from-internal
>
> canreinvite=no
>
> allow=g729
>
> insecure=port,invite
>
> fromdomain=sip.yourhost.com
>
> *_Settings in PBXManager config:_*
>
> Vtiger Asterisk App URL
>
> 	
>
> *.*.*.*:10224 (you can use any port I believe)
>
> Outbound Context
>
> 	
>
> vtiger-out (extensions.conf context you created)
>
> Outbound Trunk
>
> 	
>
> trunkname (trunk in sip.conf)
>
> Vtiger Secret Key
>
> 	
>
> Random key
>
> *_VtigerAsteriskConnector.properties _*
>
> // Location where the application server will be running.
>
> ServerIP = 0.0.0.0
>
> ServerPort = 10224
>
> // Call Recordings storage path
>
> StorageDir = /var/spool/asterisk/monitor
>
> // Location where the applications database files will be stored.
>
> AsteriskAppDBPath = /var/www/html/VtigerAsteriskConnector
>
> // Asterisk Server Details
>
> AsteriskServerIP = 127.0.0.1
>
> AsteriskServerPort = 5038
>
> AsteriskUsername = user
>
> AsteriskPassword = secret
>
> // Vtiger CRM URL
>
> VtigerURL = http://example.com/vtigercrm
>
> VtigerSecretKey = key generated in pbxmanager
>
> I don’t have a link for the callerid issue as I’ve just been emailing 
> back and forward with a couple of the vtiger developers on it, I 
> believe they are working on it now and will be updating it soon.
>
> Alex
>
> *From:*vtigercrm-developers-bounces at lists.vtigercrm.com 
> [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] *On Behalf 
> Of *Richard Hills - Technologywise
> *Sent:* Tuesday, October 28, 2014 3:49 PM
> *To:* vtigercrm-developers at lists.vtigercrm.com
> *Subject:* Re: [Vtigercrm-developers] PBXManager - Asterisk Connector 
> Debugging
>
> Hi mate
>
> Yeah I would be interested in seeing your config, especially the 
> context you have defined in your asterisk settings (extensions.conf I 
> believe).
>
> Are you able to link me the bug you have reported?
>
> Thanks
>
> On 28/10/14 17:19, Alex Martin wrote:
>
>     I can call out fine without needed any changes to the php files.
>     There ! is an issue with the callerid with the current connector.
>     I've been working with the vtiger team to correct this but I
>     haven't been given a time frame for a updated version.
>
>     I've used it on vanilla asterisk and free pbx etc, are you sure
>     you have the outbound trunk not the context set correctly and its
>     dialing the correct number format...for example most providers in
>     the USA require the 1 in front of dialed numbers.
>
>     I can send you an example configuration if it helps.
>
>     Alex
>
>     Sent from Blue Mail <http://r.bluemailapp.com>
>
>     I can call out fine without needed any changes to the php files.
>     There is an issue with the callerid with the current connector.
>     I've been working with the vtiger team to correct this but I
>     haven't been given a time frame for a updated version.
>
>     I've used it on vanilla asterisk and free pbx etc, are you sure
>     you have the outbound context set correctly and its dialing the
>     correct number format...for example most providers in the USA
>     require the 1 in front of dialed numbers.
>
>     I can send you an example configuration if it helps.
>
>     Alex
>
>     Sent from Blue Mail <http://r.bluemailapp.com>
>
>     On Oct 27, 2014, at 11:59 PM, Richard Hills - Technologywise
>     <richard at tw.co.nz <mailto:richard at tw.co.nz>> wrote:
>
>         Okay, really no idea on this one.
>
>         I added the context as below:
>
>             [vtiger]
>             exten => _X.,1,Agi(agi://192.168.234.6/incoming.agi)
>
>
>         This is different to the wiki documentation of an inbound and
>         outbound context, but seeing as the wiki document seems to
>         actually be for the hosted version I think this is correct.
>
>         I then needed to edit the PBX modules file
>         connectors/PBXManager.php to change
>                 $extension = $user->phone_crm_extension;
>         to
>                 $extension = $user->ast_extension;
>
>         Now I can make a call by clicking on the number in the CRM.
>
>         My handset dials, showing incoming call from the number I
>         wanted to dial, I pick up and get greeted by the voicemail
>         message from my extension, so it seems that the number I want
>         to call has been ignored and my extension has dialled my
>         extension...
>
>         Would love to hear any feedback on this, see any config from
>         someone for whom this is working for, version numbers etc.
>
>         Thanks
>
>         On 28/10/14 15:53, Richard Hills - Technologywise wrote:
>
>             Yes, the below output is from the cli.
>             Still having an issue but will battle this a while before
>             posting more logs / asking for more help.
>
>             Thank you Alex.
>
>             On 28/10/14 15:33, Alex Martin wrote:
>
>                 Did you watch the output from the asterisk cli?
>
>                 Alex
>
>                 On Oct 27, 2014, at 10:29 PM, Richard Hills -
>                 Technologywise <richard at tw.co.nz
>                 <mailto:richard at tw.co.nz>> wrote:
>
>                     Indeed, this turned out to be something on our end.
>
>                     We now however have an issue where the outgoing
>                     call is failing. I will continue to look at this,
>                     but if anyone can tell me what is going on feel
>                     free. Here is the ACM log:
>
>
>                           == Extension Changed 412[ext-local] new
>                         state Ringing for Notify User 400
>                           == Extension Changed 412[ext-local] new
>                         state InUse for Notify User 400
>                           == Starting SIP/412-00000c03 at075711060
>                         <tel:075711060>,412,1 failed so falling back
>                         to exten 's'
>                           == Starting SIP/412-00000c03 at075711060
>                         <tel:075711060>,s,1 still failed so falling
>                         back to context 'default'
>                             -- Executing [s at default:1]
>                         Playback("SIP/412-00000c03", "vm-goodbye") in
>                         new stack
>                             --
>
>
>                     extension 412 tries to call a number (not in the
>                     acm log above).
>                     extension 412 phone does ring, however is greeted
>                     only by a goodbye message.
>
>                     On 28/10/14 14:41, Alex Martin wrote:
>
>                         Do you have the vtiger ip in the manager.conf
>                         file for asterisk? Also reloaded asterisk to
>                         take effect.
>
>                         It doesn't look like it's connecting.
>
>                         Alex
>
>                         On Oct 27, 2014, at 9:32 PM, Richard Hills -
>                         Technologywise <richard at tw.co.nz
>                         <mailto:richard at tw.co.nz>> wrote:
>
>                             Hi guys
>
>                             Unfortunately I am not having any more
>                             luck with the asterisk connector now that
>                             I have got the PBXManager configuration
>                             screen working.
>
>                             From the connector log
>                             (logs/nohup.webapp.20141028
>                             <tel:20141028>-13:43.out):
>
>                                 Oct 28, 2014 1:57:54 PM
>                                 com.vtiger.apps.asterisk.webapp.helpers.b
>                                 a
>                                 INFO: Outbound Call
>                                 Oct 28, 2014 1:57:54 PM
>                                 com.vtiger.apps.asterisk.webapp.helpers.b
>                                 a
>                                 INFO: Asterisk Login Successfull
>                                 Oct 28, 2014 1:57:54 PM
>                                 com.vtiger.apps.asterisk.webapp.helpers.b
>                                 a
>                                 INFO: Successfully Authenticated
>                                 Vtiger Secret Key
>                                 849304 [qtp611437735
>                                 <tel:611437735>-14] INFO
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl
>                                 - Connecting to192.168.212
>                                 <tel:192168212>.6:5060
>                                 Oct 28, 2014 1:57:54 PM
>                                 com.vtiger.apps.asterisk.webapp.c.b a
>                                 SEVERE: null
>                                 java.net.ConnectException: Connection
>                                 refused
>                                         at
>                                 java.net.PlainSocketImpl.socketConnect(Native
>                                 Method)
>                                         at
>                                 java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
>                                         at
>                                 java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>                                         at
>                                 java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
>                                         at
>                                 java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>                                         at
>                                 java.net.Socket.connect(Socket.java:589)
>                                         at
>                                 org.asteriskjava.util.internal.SocketConnectionFacadeImpl.
>                                         at
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl.createSocket(ManagerConnectionImpl.java:729)
>                                         at
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl.connect(ManagerConnectionImpl.java:708)
>                                         at
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogin(ManagerConnectionImpl.java:490)
>                                         at
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl.login(ManagerConnectionImpl.java:438)
>                                         at
>                                 org.asteriskjava.manager.internal.ManagerConnectionImpl.login(ManagerConnectionImpl.java:423)
>                                         at
>                                 org.asteriskjava.manager.DefaultManagerConnection.login(DefaultManagerConnection.java:294)
>                                         at
>                                 com.vtiger.apps.asterisk.webapp.a.a.a(Unknown
>                                 Source)
>                                         at
>                                 com.vtiger.apps.asterisk.webapp.c.b.a(Unknown
>                                 Source)
>                                         at
>                                 com.vtiger.apps.asterisk.webapp.c.b.doPost(Unknown
>                                 Source)
>                                         at
>                                 javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>                                         at
>                                 javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
>                                         at
>                                 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>                                         at
>                                 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
>                                         at
>                                 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>                                         at
>                                 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>                                         at
>                                 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>                                         at
>                                 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>                                         at
>                                 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
>                                         at
>                                 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>                                         at
>                                 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>                                         at
>                                 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>                                         at
>                                 org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
>                                         at
>                                 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>                                         at
>                                 org.eclipse.jetty.server.Server.handle(Server.java:370)
>                                         at
>                                 org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
>                                         at
>                                 org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
>                                         at
>                                 org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
>                                         at
>                                 org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
>                                         at
>                                 org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>                                         at
>                                 org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>                                         at
>                                 org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
>                                         at
>                                 org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
>                                         at
>                                 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>                                         at
>                                 org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>                                         at
>                                 java.lang.Thread.run(Thread.java:745)
>
>
>
>                             Any hints as to how to debug this issue
>                             would be great. ie. If there is another
>                             way to try to connect to the same area
>                             that the connector tries to.
>
>                             Couple of notes:
>
>                               * IP is correct
>                               * Port is correct
>                               * asterisk 1.8.20.0
>                               * java version 1.8.0_20
>
>
>                             TIA
>
>                             -- 
>
>                             Richard Hills
>                             TechnologyWise Ltd, Tauranga, NZ
>                             richard at tw.co.nz <mailto:richard at tw.co.nz>
>                             www.technologywise.co.nz
>                             <http://www.technologywise.co.nz>
>                             ph: +64 (0)7 571 1060
>                             fax: +64 (0)7 571 1061
>
>                             Basestation
>
>                             ------------------------------------------------------------------------
>
>                               
>
>                             http://www.vtiger.com/
>
>
>
>
>                         _______________________________________________
>
>                         http://www.vtiger.com/
>
>                     -- 
>
>                     Richard Hills
>                     TechnologyWise Ltd, Tauranga, NZ
>                     richard at tw.co.nz <mailto:richard at tw.co.nz>
>                     www.technologywise.co.nz
>                     <http://www.technologywise.co.nz>
>                     ph: +64 (0)7 571 1060
>                     fax: +64 (0)7 571 1061
>
>                     Basestation
>
>                     ------------------------------------------------------------------------
>
>                       
>
>                     http://www.vtiger.com/
>
>
>
>
>                 _______________________________________________
>
>                 http://www.vtiger.com/
>
>             -- 
>
>             Richard Hills
>             TechnologyWise Ltd, Tauranga, NZ
>             richard at tw.co.nz <mailto:richard at tw.co.nz>
>             www.technologywise.co.nz <http://www.technologywise.co.nz>
>             ph: +64 (0)7 571 1060
>             fax: +64 (0)7 571 1061
>
>             Basestation
>
>
>
>
>             _______________________________________________
>
>             http://www.vtiger.com/
>
>         -- 
>
>         Richard Hills
>         TechnologyWise Ltd, Tauranga, NZ
>         richard at tw.co.nz <mailto:richard at tw.co.nz>
>         www.technologywise.co.nz <http://www.technologywise.co.nz>
>         ph: +64 (0)7 571 1060
>         fax: +64 (0)7 571 1061
>
>         Basestation
>
>         ------------------------------------------------------------------------
>
>           
>
>         http://www.vtiger.com/
>
>
>
>
>     _______________________________________________
>
>     http://www.vtiger.com/
>
> -- 
>
> Richard Hills
> TechnologyWise Ltd, Tauranga, NZ
> richard at tw.co.nz <mailto:richard at tw.co.nz>
> www.technologywise.co.nz <http://www.technologywise.co.nz>
> ph: +64 (0)7 571 1060
> fax: +64 (0)7 571 1061
>
> Basestation
>
>
>
> _______________________________________________
> http://www.vtiger.com/

-- 

Richard Hills
TechnologyWise Ltd, Tauranga, NZ
richard at tw.co.nz
www.technologywise.co.nz
ph: +64 (0)7 571 1060
fax: +64 (0)7 571 1061

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141105/10a20a6d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 13137 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141105/10a20a6d/attachment-0001.png>


More information about the vtigercrm-developers mailing list