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, 22 de enero de 2016

call counter

misc destination to this  example  9918007143030

[from-internal-custom]
exten=>101013,1,Agi(ivr.php)
same=>n,Hangup()

exten=>_991NXXNXXXXXX,1,Noop( dialing to this number  ${EXTEN:2})
exten=>_991NXXNXXXXXX,2,Gosub(insert,${EXTEN:2},1)
same=>n,Dial(SIP/${trunk}/${EXTEN:2},25)
same=>n,Hangup()

[insert]
exten=>_X.,1,Noop(var values are ${CALLERID(num)} ${EXTEN})
same=>n,system(mysql --user=root --password='786' counter -e "INSERT INTO calls (id,phone,did) values (NULL,"${EXTEN}","${CALLERID(num)}")")
same=>n,return()




On shell   test


mysql --user=root --password='786' counter -e "INSERT INTO calls (id,phone,did) values (NULL,"13052361010","18007143030")";




SELECT DISTINCT COUNT( * ) , phone
FROM list
GROUP BY phone
LIMIT 0 , 30

No hay comentarios:

Publicar un comentario