[Asterisk-Users] Example: Writing a click-to-call application using pbx_spool

John Laur
Thu, 17 Jul 2003 14:23:55 -0000

I have written a small perl CGI script that demonstrates how one might
use the asterisk spooler 'pbx_spool' to make a 'click-to-dial'
type
application. The script is intended to be a demonstration example only
and since it has little security, should not be deployed. I was just
experimenting with the spooler and wrote this to try some things, and I
though it'd be a good example to share..

The file 'placecall-example.cgi.gz' can be downloaded here:

  http://www.blurbco.com/~gork/asterisk/

Hope it helps someone,
John


---- Short readme embedded in the script:
This application is written to demonstrate how you can do PC-to-phone
integration with the asterisk outgoing queue mechanism, pbx_spool.

WARNING! Take note that this applicaiton provides no security by
default. Anyone using it can set up a call between any two extensions
in the list you specify, and thus it is not suitable for any kind of
real deployment! It is intended to serve only as an example.

<some omitted instructions>

Usage:

Load placecall.cgi in your web browser. Select the extension from which
you want the call to originate. Then, select the extension you wish to
call. Your phone will ring and the caller id will show as the value you
configured below. When you pick up, you'll hear "Please hold while I
try
that extension" and then your call will be connected to the party you
wish to call.

You should be able to apply the same basic technique seen here to write
your own click-to-call style application.