[Vtigercrm-developers] PBX Manager alternate implementation

Alan Bell alan.bell at libertus.co.uk
Thu May 22 09:50:03 GMT 2014


Hi all,

I am putting together a tool for phone integration that doesn't depend 
on the Asterisk AMI interface. I am using OpenSIPs as a SIP proxy 
between the handsets and the PBX (any SIP PBX will do) The handsets 
think my proxy is their PBX, the PBX thinks the proxy is a bunch of 
handsets. It is basically white hat man in the middle attack on the 
phone system :) Once I have this in place I can cause events to happen 
when a SIP message goes past, these can be sent to a UDP port, so at the 
moment I am raising events when a handset registers (REGISTER|OPTIONS), 
when a call starts (INVITE) and when something hangs up (BYE|CANCEL)

I have a process that runs in PHP listening on this UDP port for events 
from the SIP proxy, this also acts as a websocket server. The idea is 
that browser clients can register with the websocket server and will be 
notified when there is a call for them. There isn't any polling from the 
clients, no posts to the IncomingCallPoll action every few seconds, all 
that is wrapped up in websockets so it is very low latency and should 
scale quite well.

I would like this to be very similar to the PBX manager functionality, 
using the same tables and call records, but I am not quite sure if it 
would be best to have a separate module for this which creates PBX 
manager call logs, or whether to extend the PBXManager classes and 
override some bits of it, perhaps just making the calls into it that the 
asterisk server would have made by overriding 
PBXManager_PBXManager_connector or calling the methods of that 
connector. I think I may be able to integrate this in a number of 
different ways, from implementing a totally separate module to 
overriding or hacking the PBXManager module directly. I am just not sure 
which is going to be the best approach, any suggestions would be 
appreciated!

Alan.

-- 
Libertus Solutions
http://libertus.co.uk



More information about the vtigercrm-developers mailing list