[from-trunk] | |
exten=>_x.,1,read(code,/var/www/html/project1/sounds/BIENVENIDA,4) | |
same=>n,Set(msg=${SHELL(mysql --user=root --password='789456' --skip-column-names codigos -e "SELECT mensaje FROM codes where passcode=${code}")}) | |
same=>n,GotoIf($["${msg}"=""]?im-sorry) | |
same=>n(info),system(/usr/bin/php /var/www/html/project1/1/google_tts.php "${msg}" > /var/www/html/project1/1/audios/${UNIQUEID}.txt && /usr/bin/php /var/www/html/project1/1/convert.php ${UNIQUEID}) | |
same=>n(key),read(key,/var/www/html/project1/sounds/TTSSMS,1) | |
same=>n,GotoIf($["${key}"="1"]?playmsg) | |
same=>n,GotoIf($["${key}"="2"]?sendsms) | |
same=>n,goto(key) | |
same=>n,Hangup() | |
same=>n(playmsg),Playback(/var/www/html/project1/1/audios/${UNIQUEID}) | |
same=>n,Hangup() | |
same=>n(sendsms),Playback(/var/www/html/project1/sounds/smsENVIADO) | |
same=>n,Hangup() | |
same=>n(im-sorry),Playback(im-sorry) | |
same=>n,hangup |
Soporte & Consultoria
Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita
lunes, 27 de enero de 2020
google tts reading DB
domingo, 26 de enero de 2020
CDR custom fields
[crm-hangup]
include => crm-hangup-custom
exten => s,1,Noop(Sending Hangup to CRM ** ${PJSIP_HEADER(read,Call-ID)} ** )
same=>n,set(ID=${PJSIP_HEADER(read,Call-ID)})
same=>n,Set(ID=${CUT(ID,@,1)})
same=>n,Set(CDR(userfield)=${ID})
get json and transfer
#!/usr/bin/php -q
<?php
set_time_limit(30);
require('/var/www/html/phpagi-2.20/phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$cid = $argv[1];
$uniqueid=$argv[2];
$sipcid=$argv[3];
$url=$argv[4];
$agi->verbose("****CID value is $cid*****");
$url=file_get_contents("$url?workflow=FreepbxQueueTransfer&MobileNumber=$cid&UNIQUEID=$uniqueid&sipcid=$sipcid");
$url=json_decode($url, true);
foreach($url as $key=>$value){
//echo " $key : $value<br>";
$agi->exec_goto('from-internal',$value,1);
}
?>
[getqueue]
exten=>_x.,1,Set(url="https://engine.cashngo.com.au/api/Communication/GetWorkflow")
exten=>_x.,n,AGI(/var/www/html/AMI/getqueue.php,${CALLERID(num)},${UNIQUEID},${PJSIP_HEADER(read,Call-ID)},${url})
same=>n,hangup()
?>
<?php
set_time_limit(30);
require('/var/www/html/phpagi-2.20/phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$cid = $argv[1];
$uniqueid=$argv[2];
$sipcid=$argv[3];
$url=$argv[4];
$agi->verbose("****CID value is $cid*****");
$url=file_get_contents("$url?workflow=FreepbxQueueTransfer&MobileNumber=$cid&UNIQUEID=$uniqueid&sipcid=$sipcid");
$url=json_decode($url, true);
foreach($url as $key=>$value){
//echo " $key : $value<br>";
$agi->exec_goto('from-internal',$value,1);
}
?>
[getqueue]
exten=>_x.,1,Set(url="https://engine.cashngo.com.au/api/Communication/GetWorkflow")
exten=>_x.,n,AGI(/var/www/html/AMI/getqueue.php,${CALLERID(num)},${UNIQUEID},${PJSIP_HEADER(read,Call-ID)},${url})
same=>n,hangup()
?>
Suscribirse a:
Entradas (Atom)