Last Update March 30, 2004 comments to: Peter Koegel (pkoegel@azxws.com) Installation Steps and Troubleshooting Everyhing changes on a daily base. If you need more help, send me an eMail to: Peter Koegel (header add) taci and/or XOF to: pkoegel@azxws.com 1) Make sure manager.conf is setup, sample below /------------- sample manager.conf [general] enabled = yes port = 5038 bindaddr = 127.0.0.1 [office] secret = mypass permit=192.168.1.0/255.255.255.0 deny=0.0.0.0/0.0.0.0 read = system,call,log,verbose,command,agent,user write = system,call,log,verbose,command,agent,user \----------- end manager.conf NOTE: I believe you can bind to all IPs by skipping the bindaddr. If you setup the interface an the outside IP, be sure to restrict access by using asterisk IP permit and deny rules, AND/OR firewall rules. 2) restart asterisk and test your the interface "by hand" #asterisk -rx "restart when convenient" Then test.... $telnet 127.0.0.1 5038 >Trying 127.0.0.1... >Connected to 127.0.0.1. >Escape character is '^]'. >Asterisk Call Manager/1.0 -- You can login like so --- action: login username: office secret: mysecret --- then hit return twice, you'll see -- >Response: Success >Message: Authentication accepted --- Then I typed --- Action: Originate Channel: SIP/12345 Exten: 5551212 Context: default -- This tries to place a call from SIP account 12345 -- to phone number 5551212 in the context default. -- Replace with your real information -- most systems won't allow dialout in the default context -- Asterisk will show your call progress. (and all other calls too.) NOTE: I don't supply CallerID, if this is important add it or request it. 3) Setup the taci.pl script with your information, and pop it in your webserver's cgi-bin directory NOTE: You may also need Net::Telnet installed, use CPAN, a package, or download and make by hand. You need to setup your Asterisk username and password (and IP address) inside taci.pl. Make sure it is executable. #chmod +x taci.pl Test the script from the command line like so: $./taci.pl exten=5551212 account=12345 context=default 4) Test it from the web. You should password protect and/or limit the script by IP, referrer, etc. This could help fend of phone DoS attacks. (Imagine some making all your phones ring and then call international numbers... UGH.) You may decide to lock the script down to a certain context. You can certainly extend the script and use it for your own purposes. If you have a really neat trick, feel free to let me know. FROM HERE AND WHERE IT GETS INTERESTING: You can also use URLs from other apps (think groupware or web phone directories). Hack the user preferences (or supply a cookie) to supply a context and sip account. Then add a Click to dial right from the app. http://voip.example.com/cgi-bin/taci.pl?account=101&context=default&exten=5551212 You have the ever desired "Click to Dial" Phone App. --------------- PHP Hack example - from addrbook's list.lib.php if (preg_match("/[0-9][0-9][0-9].[0-9][0-9][0-9][0-9]/i", $l[$idx][$v][0])) { //echo "