On Tuesday 17 May 2011, Mike wrote:
> Hi,
> Is there any softphone or TAPI plug-in that allows one to dial from a web
> page?
Just write a simple CGI script (running from the Asterisk server) which
looks up the nearest phone from the remote IP address ( $ENV{REMOTE_ADDR} in
Perl), and inject a suitably-modified call file into the
folder /var/spool/asterisk.outgoing/ . The file needs to look something like
the below example:
-----8<-----
Channel: SIP/$SRC
Context: $CTXT
Extension: $DEST
Priority: 1
CallerId: $SRC
----->8-----
where $SRC = source number, $CTXT = context and $DEST = destination.
NB, create the file in /tmp/ first then mv it; this way you can be sure
Asterisk will never try to parse an incomplete callfile. If doing this in
Perl, you *may* get away with keeping the callfile under 1 disk block as long
as $| = 0 on the filehandle, but this is by no means portable.
--
AJS
Answers come *after* questions.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users