<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Veja o readme do API abaixo.....</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Last Update March 30, 2004<BR>comments to: Peter Koegel (<A 
href="mailto:pkoegel@azxws.com">pkoegel@azxws.com</A>)</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Installation Steps and Troubleshooting</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Everyhing changes on a daily base. If you need more help, 
send me an eMail<BR>to: Peter Koegel (header add) taci and/or&nbsp; XOF to: <A 
href="mailto:pkoegel@azxws.com">pkoegel@azxws.com</A> </FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>1) Make sure manager.conf is setup, sample 
below</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>/------------- sample manager.conf</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>[general]<BR>enabled = yes<BR>port = 5038<BR>bindaddr = 
127.0.0.1</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>[office]<BR>secret = 
mypass<BR>permit=192.168.1.0/255.255.255.0<BR>deny=0.0.0.0/0.0.0.0<BR>read = 
system,call,log,verbose,command,agent,user<BR>write = 
system,call,log,verbose,command,agent,user</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>\----------- end manager.conf</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>NOTE: I believe you can bind to all IPs by skipping the 
bindaddr. <BR>If you setup the interface an the outside IP, be sure to restrict 
access<BR>by using asterisk IP permit and deny rules, AND/OR firewall 
rules.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>2) restart asterisk and test your the interface "by 
hand"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>#asterisk -rx "restart when convenient"</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Then test....</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>$telnet 127.0.0.1 5038</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>&gt;Trying 127.0.0.1...<BR>&gt;Connected to 
127.0.0.1.<BR>&gt;Escape character is '^]'.<BR>&gt;Asterisk Call 
Manager/1.0</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>-- You can login like so ---<BR>action: 
login&nbsp;&nbsp;&nbsp; <BR>username: office&nbsp;&nbsp; <BR>secret: 
mysecret&nbsp;&nbsp; </FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>--- then hit return twice, you'll see 
--</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>&gt;Response: Success<BR>&gt;Message: Authentication 
accepted</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>--- Then I typed ---</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Action: Originate&nbsp;&nbsp; <BR>Channel: 
SIP/12345<BR>Exten: 5551212<BR>Context: default </FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>-- This tries to place a call from SIP account 12345 <BR>-- 
to phone number 5551212 in the context default. <BR>-- Replace with your real 
information<BR>-- most systems won't allow dialout in the default context<BR>-- 
Asterisk will show your call progress. (and all other calls 
too.)</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>NOTE: I don't supply CallerID, if this is important add it 
or request it.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>3) Setup the taci.pl script with your information, and pop 
it in your webserver's cgi-bin directory</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>NOTE: You may also need Net::Telnet installed, use CPAN, a 
package, or download and make by hand.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>You need to setup your Asterisk username and password (and 
IP address) inside taci.pl.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Make sure it is executable. <BR>#chmod +x 
taci.pl</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>Test the script from the command line like 
so:<BR>$./taci.pl exten=5551212 account=12345 
context=default</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>4) Test it from the web. <BR>You should password protect 
and/or limit the script by IP, referrer, etc. <BR>This could help fend of phone 
DoS attacks. <BR>(Imagine some making all your phones ring and then call 
international numbers... UGH.)</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=615454119-12012006><FONT face=Arial 
color=#0000ff size=2>You may decide to lock the script down to a certain 
context. <BR>You can certainly extend the script and use it for your own 
purposes. If you <BR>have a really neat trick, feel free to let me 
know.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV><SPAN class=615454119-12012006><FONT face=Arial color=#0000ff 
size=2>
<DIV dir=ltr align=left><BR>FROM HERE AND WHERE IT GETS INTERESTING:<BR>You can 
also use URLs from other apps (think groupware or web phone directories). 
<BR>Hack the user preferences (or supply a cookie) to supply a context and sip 
account.<BR>Then add a Click to dial right from the app.</DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><A 
href="http://voip.example.com/cgi-bin/taci.pl?account=101&amp;context=default&amp;exten=5551212">http://voip.example.com/cgi-bin/taci.pl?account=101&amp;context=default&amp;exten=5551212</A></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left>You have the ever desired "Click to Dial" Phone 
App.</DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left>---------------<BR>PHP Hack example - from addrbook's 
list.lib.php</DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><BR>if 
(preg_match("/[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]/i", $l[$idx][$v][0])) 
{<BR>&nbsp; //echo 
"&lt;tr&gt;&lt;td&gt;&lt;strong&gt;$v:&lt;/strong&gt;&lt;/td&gt;";<BR>&nbsp; 
$charstoremove=array ("(",")","-", " ");<BR>&nbsp; 
$phone=str_replace($charstoremove,"",$l[$idx][$v][0]);<BR>&nbsp; echo 
"&lt;td&gt;&lt;A 
HREF=cgi-bin/taci.pl?exten=$phone&gt;".$l[$idx][$v][0]."&lt;/td&gt;";<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=pt-br dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De:</B> 
asteriskbrasil-bounces@listas.asteriskbrasil.org 
[mailto:asteriskbrasil-bounces@listas.asteriskbrasil.org] <B>Em nome de 
</B>Victor Carvalho<BR><B>Enviada em:</B> quinta-feira, 12 de janeiro de 2006 
15:45<BR><B>Para:</B> 
asteriskbrasil@listas.asteriskbrasil.org<BR><B>Assunto:</B> Re: [AsteriskBrasil] 
RES: Web e Asterisk<BR></FONT><BR></DIV>
<DIV></DIV>Ah foi mal, hehe<BR><BR>Mas como para usar uma interface web como 
cliente SIP?<BR>Com isso é possível?<BR><BR>
<DIV><SPAN class=gmail_quote>Em 12/01/06, <B class=gmail_sendername>Caio 
Begotti</B> &lt;<A href="mailto:caio@ueberalles.net">caio@ueberalles.net</A>&gt; 
escreveu:</SPAN>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">On 
  Thursday 12 January 2006 15:43, Victor Carvalho wrote:<BR>&gt; &gt; <A 
  href="http://voip.example.com/cgi-bin/taci.pl?account=101&amp;context=default&amp;exten">http://voip.example.com/cgi-bin/taci.pl?account=101&amp;context=default&amp;exten 
  </A><BR>&gt; &gt;=55 51212<BR>&gt; A API permite ao usuário realizar chamadas 
  numa página web?<BR>&gt; Leandro, o link não funcionou...<BR><BR>O link é um 
  exemplo...<BR><BR>--<BR>Caio Begotti (caio1982)<BR><A 
  href="http://caio.ueberalles.net">http://caio.ueberalles.net</A><BR>_______________________________________________<BR>LIsta 
  de discussões AsteriskBrasil.org<BR><A 
  href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil..org 
  </A><BR><A 
  href="http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil">http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</A><BR><BR>_______________________________________________<BR>Acesse 
  o&nbsp;&nbsp;wiki AsteriskBrasil.org:<BR><A 
  href="http://www.asteriskbrasil.org">http://www..asteriskbrasil.org</A><BR></BLOCKQUOTE></DIV><BR><BR>
<P><FONT size=2>--<BR>No virus found in this incoming message.<BR>Checked by AVG 
Free Edition.<BR>Version: 7.1.371 / Virus Database: 267.14.17/227 - Release 
Date: 11/1/2006<BR></FONT></P>
<P><FONT face=Arial size=2></FONT></P></BODY></HTML>
<BR>

<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.1.371 / Virus Database: 267.14.17/227 - Release Date: 11/1/2006<BR>
</FONT> </P>