Built in PHP this Asterisk CRM looks pretty wicked. Its an open source Customer Relationship Management application which hooks into an Asterisk PBX. It looks nicer than I sound though so I’ll shut up and slap you with some pretty pictures…


Built in PHP this Asterisk CRM looks pretty wicked. Its an open source Customer Relationship Management application which hooks into an Asterisk PBX. It looks nicer than I sound though so I’ll shut up and slap you with some pretty pictures…


Well it’s been a while since the PHP Asterisk Manager API was released and I’ve yet to produce a clear and definitive example of its use. So here goes.
Your Asterisk server must be set up correctly before this API can ’speak’ to the server.
Firstly you’ll need to get hold of the library and there’s two routes to take. You can either install via PEAR or simply checkout the source from the Google Project:
svn checkout http://asterisk-php-api.googlecode.com/svn/trunk/ asterisk-php-api
Once you’ve got it all ready you need to start your new file thats going to make use of it. In this example I’m creating a simple dialler called: “call.php” which will take two GET variables, with one being the callee and one the caller.
'192.168.1.5',
'port' => '5038',
'auto_connect' => true
);
//Initialise
$am = new Net_AsteriskManager($params);
//Login to the Asterisk Manager interface
$am->login('user', 'pass');
//Originate Call is one of the commands available and it causes a call to be made and connected between two endpoints.
$am->originateCall($number, $from, $context, $cid, 1, 30000);
?>
By looking at the comments above you should see how this works and the steps required. If not then leave any comments and I’ll build on the above. It’s sometimes difficult to know what people already know so apologies if this is too simple or complex.
Later on I’ll show how to work with queues – adding, removing, listing, etc.
Just so the Asterisk-Ruby’ists don’t feel left out after my PHP Asterisk post here’s a useful list if you’re wanting to integrate Asterisk with your Ruby (on Rails) app:
Again with the PHP code! This time its a bit more exciting than a CakePHP component. If you’ve ever used Asterisk – an open source PBX – then you’ll know it comes with a manager interface which enables developers to send commands to the server to help administer the system and its connected peers and channels.
I’m currently sat on the first floor of an old manor house in Surrey, England having a lunch break on the second day of training in Asterisk setup and configuration. Much has been learned but the course could have been organised better from the start with numerous hiccups and poor preperation from the course tutor.
Asterisk is an open source software PBX for use (mainly) on Linux operating systems. You can use it to manage your VoIP telephone network and connect it to the outside world enabling many nice features such as call recording, voicemail, dialling plans, IVR, etc.
We had to use Fedora Core 4 instead of 5 due to an issue getting Asterisk running on FC5. I’ve also discovered Cisco phones are worse than naff and South Africans are all friendly Communists.