Escolar Documentos
Profissional Documentos
Cultura Documentos
ligame.html
</html>
ligar.php
<?php
//RECEBENDO NUMERO
$num = $_POST['fone'];
echo "Dialing $num\r\n";
$timeout = 10;
$asterisk_ip = "192.168.1.201";
$user_manager = "drasterisk";
$senha_manager = "teste";
$channel = "SIP/4000"; //Canal interno que irá receber a
chamada
$context = 'contexto-ligame';
sleep(5);
header("Location: ligame.html");
?>
/etc/asterisk/manager.conf
[general]
enabled = yes
;webenabled = yes
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1/255.255.255.255
permit = 192.168.1.0/255.255.255.0
port = 5038
[drasterisk]
secret = teste
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
/etc/asterisk/extensions.conf
[contexto-ligame]
exten => _ZZ[2-9].,1,NoOp(---> NOVA LIGACAO 0800WEB <--)
same => n,Set(CDR(accountcode)=0800WEB)
same => n,Dial(SIP/operadora/0${EXTEN},60,Tg) ;SAINDO PELO
VOIP
;same => n,Dial(Khomp/b0l0/021${EXTEN},60,Tg) ; SAINDO PELO
HARDWARE KHOMP
;same => n,Dial(Dahdi/g0/021${EXTEN},60,Tg) ; SAINDO PELO
HARDWARE DIGIUM
same => n,Hangup
É isso ai, agora basta fazer algumas modificações para adaptar da forma
que precisa.