Are you trying to figure out how to set up click to call from a webpage using the Asterisk AMI? Well look no further, this is an easy to follow guide on exactly how to do it.
So before we start a couple of things you have to know about my environment. First I am hosting the webpage on the Asterisk server for the click to call so I have Apache installed and running, second I have port 80 open on the Asterisk server firewall so I can allow external requests.
Hi, asterisk is a complete VoIP/SIP solution but can also be used as a SIP client to send a prerecorded message. In this example I will use a Fritz!box as the upstream SIP Server for asterisk. First create IP Phone and a new User Account. Open the Fritz!Box GUI. Open the Phonelist New Phone Telephonename New SIP User Deselect Phone numbers for which asterisk should.
So first thing you need to do is configure your Asterisk manager config file with a username who can originate the call.
Using Asterisk In Search
Now we’re ready to create our first dialplan. We’ll start with a very simple example. We are going to instruct Asterisk to answer a call, play a sound file, and hang up. We’ll use this simple example to point out the most important dialplan fundamentals. In our example, the extension 100 will redirect an unanswered call to the voicemail after 5 seconds. In our example, the extension 200 does not have voicemail. In our example, if any extension dial 500 it will be sent to the Voicemail menu. Delete the content of the voicemail.conf configuration file.
Asterisk Call Manager
Once you create a user and password, in this case I have the username “clickadmin” then you can start writing the php code.
So that webpage will respond to url post of http://[ip address]/clickcall/index.php?internalnum=101&outboundnum=4075551234
Call From Asterisk
It will first place a phone call to the extension number, in the example case would be 101. Once extension 101 answers that call it will then place the outbound leg of the call to phone number 4075551234.
Phone Call From Asterisk
Related posts: