views:

177

answers:

6

Ok I installed asterisk, now I would like to know

  1. how do I program asterisk PBX using PHP?
  2. Does Asterisk have an API that I can work with?

Please provide basic examples how I could perform the following scenario

  1. send phone number to asterisk
  2. asterisk dials phone number
+1  A: 

You are probably thinking about the Asterisk Gateway Interface ( http://www.voip-info.org/wiki/view/Asterisk+AGI+php ) but what you intend to do is best achieved trhough the "originate" action of the Manager interface. Take a look to the PHP examples in voip-info.org: http://www.voip-info.org/wiki/view/Asterisk+manager+Examples

codehead
this is what im after http://www.voip-info.org/wiki/view/Asterisk+manager+Examples thank you!
K001
A: 

You could also use Call Files if you want to generate outgoing calls from an external application.

If you do this, make sure you mv files into the spool directory, don't use cp!

shapr
+9  A: 

it seems you are new to asterisk, please go to the documentation of asterisk and check this book

Asterisk Gateway Interface 1.4 & 1.6 Programming

shrikant.soni
+2  A: 

You can use AMI with different languages of your choice

+2  A: 

php can be used using AGI to programm asterisk pbx

+1  A: 

programming an asterisk pbx is quite easy using php agi.

check agi documentation