How We Integrated Asterisk With SugarCRM
We recently made some changes to our phone system and decided that we should integrate it with our SugarCRM system. We use Asterisk as our phone switch, which is an excellent open source phone system. The goal of the integration was to enable a user to click on any phone number in Sugar and have it automatically connect that phone number to the user’s phone extension.
We store the user’s phone extension in the Users module, so that user can edit “my account”. Similarly, an administrator can edit an employee record to specify what extension should ring when a user clicks a phone number. Our phone server and our Sugar system are not in the same physical building, but it was a simple process to have Sugar communicate directly with Asterisk’s API to initiate the call.
When the user clicks on a phone number, Sugar validates that it is a legitimate phone number and if so, it then makes an API call to Asterisk, sending both the user’s extension number and the connecting phone number. Asterisk first rings the user’s extension and if the user picks up, Asterisk then dials the phone number and connects the the newly placed call.
In addition, we programmed the system to place calls to the conference room phone by clicking the last digit in the phone number. All of our users have a secondary extension that goes to a soft-phone (which may be used if the user is working from home), so when the second-to-last digit of the phone number is clicked, the call transfers to the soft phone extension. A different digit in the phone number could easily be assigned to call a user’s cell phone.
Although we opted not to go any farther with our integration, we could have made it open the “Schedule Call” feature in the Activities sub-panel or create a note in the “History” sub-panel if that was desired.