Start a 2 peer call from asterisk - Asterisk click to call

Hello.

First of all, sorry for my english. David551 pointed out that a simple google search, selecting the apropiate keywords, will solve the issue in 2 minutes, Those keywords were “asterisk click to call” xD so damn obvious, but didnt come to my mind. You can scroll down to the end of the post where I linked to different webs offering free solutions, or DIY solutions.

BACKGROUND: INSTALLED TELEPHONY SERVER
My enterprise manages several Asterisk installations for our clients. We’re using Issabel 4.0 or Elastix 2.5 (depending on the installation date), but we configure most things directly coding into asterisk config files. Most clients use Yealink phones, but we’ve got some Ciscos, Aastras, and even some old analogic phones converted using ATAs (mostly cisco SPA112).

The task to accomplish
Some of our clients asked us to be able to start a call ON THEIR PHONES (no zoiper or other SIP client on PC allowed) by clicking a phone number in their computer.

Status so far
For those clients who have Yealink phones it was a painless process. Yealink has action URIs, so you can just visit the web server of the phone with the appropiate parameters and it will make the call. For those of you interested about the subject, you can find more info here:
http://forum.yealink.com/forum/archive/index.php?thread-4121.html
On Firefox, we used Telify to make every telephone clickable.
For those URLs which were already clickable, we wrothe a VB “tel” protocol handler, which executes the proper URL and saves logs.

So far, so good, our Yealink phones (most of the devices our clients have are Yealink) were completly covered. If someone if interested in a deeper explanation of how we linked IE and Chrome to our handler, you’re free to ask, but as this is not the main topic I wont cover this unless someone finds it usefull.

Problems
One of our clients has several Astra and Cisco IP phones. Using the same aproximation for Cisco seems to require an specialiced software which has to be licensed (I’m not surprised, it’s Cisco after all -.-). We preffer opensource, or atleast free software, so we started to think about an alternative solution: Make asterisk start the call to both ends.

Our goal is to make an HTML API in the Asterisk server, similar to the Yealink one. Whenever a computer requests to make a call, the Asterisk will initiate a call to his phone and to the clicked number. Those calls must be joint into one as soon as the caller answers the call (rembmer, both caller and callee are actually called by Asterisk).

Remember! Even though we use Issabel/Elastix, we write our contexts manually, so we want a pure asterisk solution. Also keep in mind that the “command” will be initiated by a website, so it will run a shell script to interact with asterisk. If you know how to do so in the proper way, please tell us.

Example:
Alice wants to call Bob. To do so, she clicks Bob’s telephone number in his web browser. Our plugins will take care of this click, converting it to a URL pointing to our asterisk server. Our software will visit that url the same way we do with Yealink, so it will inform asterisk that “Alice wants to call Bob”. Inmediatly, Asterisk will start a call to Alice’s phone. As soon as Alice picks up the phone, asterisk will automatically start a call to Bob (on the same line, if possible, or a different one and join them later).

From Alice’s point of view, picking up the phone has to be identical than dialing Bob and press the “dial” button.

Why do we want to do this?
Not all our clients use Yealink, and every phone brand seems to work in a different way for click-to-dial, so we want a generic solution for those brands which charge extra money on the feature or doesnt implement it at all.

Solution
Stupid me, didnt google for the easiest topic, asterisk click to call (I spent like 3 hours researching with the wrong keywords xD)

This is the solution I was looking for:

Asterisk Click to Call from Webpage using the AMI Commands

There’s more documentation and different methods to achieve the same results here:
Asterisk click to call

Google “asterisk click to call” and/or research call files and the originate action.

What the f… I’ve been googling Cisco click to dial, aastra click to dial, asterisk initiate two peer call… And, stupid me, didnt look for the easiest topic, asterisk click to call.

This is the solution I was looking for:

Asterisk Click to Call from Webpage using the AMI Commands

Thanks David.