[from-cnam]
exten=>_x.,1,Noop( **${CALLERID(name)}** **${CALLERID(num)}**)
;same=>n,GotoIf($["${CALLERID(name)}" != "Unknown"]?valid)
same=>n,GotoIf($["${CALLERID(name)}" != ""]?valid)
same=>n,Set(name=${SHELL(php /var/www/html/cname/cid.php ${CALLERID(num)})})
same=>n,Set(CALLERID(name)=${name})
same=>n(valid),Goto(from-trunk,${EXTEN},1)
<?php
error_reporting(0);
$url=file_get_contents("http://api.everyoneapi.com/v1/phone/$argv[1]?account_sid=AC95f600f22fe04ab9a74a501aed72ff73&auth_token=AU926f2e2d89124cbdaa92f76b1ab7ff27&pretty=true&data=name");
$url=json_decode($url, true);
//print_r($url);
//print_r($url[data][expanded_name]);
if(!$url['data']['expanded_name']) {
echo "Unknow Caller";
exit();
}
foreach($url['data']['expanded_name'] as $key=>$value){
}
$cname=$url['data']['expanded_name']['first'];
$cname.=" ".$url['data']['expanded_name']['last'];
echo $cname;
exit();
?>
Soporte & Consultoria
Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita
jueves, 13 de abril de 2017
viernes, 7 de abril de 2017
${EXTEN} MANIPULATION
The
${EXTEN}
variable properly has the syntax ${EXTEN
:x
:y
}
, where x
is the starting position and y
is the number of digits to return. Given the following dial string:94169671111
${EXTEN:1:3}
would contain416
${EXTEN:4:7}
would contain9671111
${EXTEN:-4:4}
would start four digits from the end and return four digits, giving us1111
${EXTEN:2:-4}
would start two digits in and exclude the last four digits, giving us16967
${EXTEN:-6:-4}
would start six digits from the end and exclude the last four digits, giving us67
${EXTEN:1}
would give us everything after the first digit, or4169671111
(if the number of digits to return is left blank, it will return the entire remaining string)
Suscribirse a:
Entradas (Atom)