Soporte & Consultoria

Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita

miércoles, 13 de enero de 2016

PHP Asterisk VM checker

#!/usr/bin/php
<?php

//first Voicemail
$exten=18452220881;
$box=1166;
$carrier="vitcom_Outgoing";
$vmnum= system("/usr/sbin/asterisk -x \" voicemail show users\" | grep -i $box |  awk '{print $4}'");

if($vmnum>0) {

echo "you got $vmnum messages";
$call=System("/usr/sbin/asterisk -x \"channel originate Local/$exten@vm_customd extension *97@from-internal\"");
}

else {
echo " no messages found";

}


?>





[vm_customd]
exten=>_x.,1,Set(cid=8457313700)
exten=>_x.,n,Set(CALLERID(num)=${cid}) ;test callerid
exten=>_x.,n,Dial(SIP/vitcom_Outgoing/8977${EXTEN},25)
same=>n,hangup()





*/30 * * * * /usr/bin/php /root/vm.php

No hay comentarios:

Publicar un comentario