[autodial] | |
exten=>_x.,1,Noop(${code0} ${code1} ${code2} ${code3} ${code4} ${code5} /${d0} ${d1} ${d2} ${d3} ${d4} ${d5} ${d6} ${d7} ${d8} ${d9}) | |
same=>n,Dial(SIP/commpeak/022001${EXTEN},,M(dtmf)) | |
[macro-dtmf] | |
exten => s,1,Wait(9) | |
same=>n,SendDTMF(${code0}) | |
same=>n,SendDTMF(${code1}) | |
same=>n,SendDTMF(${code2}) | |
same=>n,SendDTMF(${code3}) | |
same=>n,SendDTMF(${code4}) | |
same=>n,SendDTMF(${code5}) | |
same=>n,Wait(9) | |
same=>n,SendDTMF(${d0}) | |
same=>n,SendDTMF(${d1}) | |
same=>n,SendDTMF(${d2}) | |
same=>n,SendDTMF(${d3}) | |
same=>n,SendDTMF(${d4}) | |
same=>n,SendDTMF(${d5}) | |
same=>n,SendDTMF(${d6}) | |
same=>n,SendDTMF(${d7}) | |
same=>n,SendDTMF(${d8}) | |
same=>n,SendDTMF(${d9}) | |
;;;;;;;;;;;;;; | |
<?php | |
/*parameters */ | |
$param= array("host"=>"localhost","port"=>5038,"trunk"=>"tw0","timeout"=>45); | |
/*form variables */ | |
$src=$_GET['src']; | |
$cid=$_GET['cid']; | |
$num=$_GET['num']; | |
/* clean data to accept only numbers*/ | |
function clean($data){ | |
$data=preg_replace('/[^0-9]+/', '', $data); | |
$data = str_split($data); | |
return $data; | |
} | |
$code=clean($_GET['code']); | |
$custnum=clean($_GET['custnum']); | |
$socket = fsockopen($param['host'],$param['port'], $errno, $errstr,$param['timeout']); | |
fputs($socket, "Action: Login\r\n"); | |
fputs($socket, "UserName: admin\r\n"); // | |
fputs($socket, "Secret:ezrerta\r\n\r\n"); // | |
$wrets=fgets($socket,128); | |
echo $wrets; | |
fputs($socket, "Action: Originate\r\n" ); | |
fputs($socket, "Channel: Local/$src@from-internal\r\n" ); | |
fputs($socket, "Exten: $num\r\n" ); | |
fputs($socket, "Context: autodial\r\n" ); | |
fputs($socket, "Priority: 1\r\n" ); | |
fputs($socket, "CallerID: $cid\r\n" ); //No used here | |
fputs($socket, "Variable: __cid=$cid\r\n" ); | |
fputs($socket, "Variable: __code0=$code[0]\r\n" ); | |
fputs($socket, "Variable: __code1=$code[1]\r\n" ); | |
fputs($socket, "Variable: __code2=$code[2]\r\n" ); | |
fputs($socket, "Variable: __code3=$code[3]\r\n" ); | |
fputs($socket, "Variable: __code4=$code[4]\r\n" ); | |
fputs($socket, "Variable: __code5=$code[5]\r\n" ); | |
fputs($socket, "Variable: __d0=$custnum[0]\r\n" ); | |
fputs($socket, "Variable: __d1=$custnum[1]\r\n" ); | |
fputs($socket, "Variable: __d2=$custnum[2]\r\n" ); | |
fputs($socket, "Variable: __d3=$custnum[3]\r\n" ); | |
fputs($socket, "Variable: __d4=$custnum[4]\r\n" ); | |
fputs($socket, "Variable: __d5=$custnum[5]\r\n" ); | |
fputs($socket, "Variable: __d6=$custnum[6]\r\n" ); | |
fputs($socket, "Variable: __d7=$custnum[7]\r\n" ); | |
fputs($socket, "Variable: __d8=$custnum[8]\r\n" ); | |
fputs($socket, "Variable: __d9=$custnum[9]\r\n" ); | |
fputs($socket, "Async: yes\r\n\r\n" ); | |
fputs($socket, "Action: Logoff\r\n\r\n"); | |
sleep (1); | |
$wrets=fgets($socket,128); | |
?> | |
URL | |
http://SERVER-IP-ADDRESS/dial.php?src=6991&num=33488809690&code=125252&custnum=2065274949 |
Soporte & Consultoria
Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita
viernes, 2 de agosto de 2019
auto dial with dtmf
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario