Asterisk click to call

Perhaps some of you may know how to achieve this. I want something like this:

  • Click link / button
  • My phone rings, I pick it up.
  • Asterisk is dialing for me
  • Recipient's phone rings

I am using asterisk 1.2 .

I tried with dialing . But I can do this to call one way.

Thanks in advance.

+1
source share
2 answers

You can use call files . Just read: Asterisk auto-dial out .

I made a simple CGI script called through a web server, creates a call file (don't forget to use a temporary directory) and then translates it to /var/spool/asterisk/outgoing , and Asterisk does the rest of the work. From the user's point of view, it works as you described. Also, do not forget to normalize phone numbers (they may have spaces, hyphens, etc. on my web pages, while in the call file they should look like numbers that can be dialed).

+4
source

You can see the script call that I wrote in PHP that opens the fax file, but it will be suitable for your needs. Take a look at the full script here: http://www.csrdu.org/nauman/2010/10/18/web-fax-for-asterisk/

 $faxHeader = $_POST["faxHeader"]; $localID = $_POST["localID"]; $email = $_POST["email"]; $dest = $_POST["dest"]; $outbound_route = "@outbound-allroutes"; $outboundfax_context = "outboundfax"; $callfile = "Channel: Local/$dest$outbound_route\n" . "MaxRetries: 1\n" . "RetryTime: 60\n" . "WaitTime: 60\n" . "Archive: yes\n" . "Context: $outboundfax_context \n" . "Extension: s\n" . "Priority: 1\n" . "Set: FAXFILE=$input_file_tif\n" . "Set: FAXHEADER=$faxHeader\n" . "Set: TIMESTAMP=" . date("d/m/y : H:i:s",time()) . "\n" . "Set: DESTINATION=$dest\n". "Set: LOCALID=$localID\n" . "Set: EMAIL=$email\n"; // create the call file in /tmp $callfilename = unique_name("/tmp", ".call"); $f = fopen($callfilename, "w"); fwrite($f, $callfile); fclose($f); // $asterisk_spool_folder is usually /var/spool/asterisk/outgoing rename($callfilename, $asterisk_spool_folder . "/" . substr($callfilename,4)); 

Read on the call list page why we need to move the file, and not open and write it directly to the spool of the asterisk.

+1
source

All Articles