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, 27 de enero de 2021

select and update FreePBX extension sip password

 mysql  -e "select id,data from sip where keyword='secret' or keyword='callerid' group by data order by id;" asterisk 


mysql  -e "select id,data from sip where keyword='secret' and id=100  group by data order by id;" asterisk 



mysql  -e "update  sip set data='Ambiorix13' where id=100 and keyword='secret';" asterisk 


reload the  config after apply the change

fwconsole reload

FreePBX disable and enabling recording API

show internal extern rec asterisk -x  "database show AMPUSER/100/recording/in/external"



 show external out rec asterisk -x  "database show AMPUSER/100/recording/out/external"



enable force asterisk -x "database put AMPUSER/100/recording/out external force"


disable recording  asterisk -x "database put AMPUSER/100/recording/out external no"



(Inbound calls disbaling ) asterisk -x "database put AMPUSER/100/recording/in external no"


(inbound calls enabling ) asterisk -x "database put AMPUSER/100/recording/in external force"

lunes, 28 de diciembre de 2020

Asterisk set variable

 #!/usr/bin/php -q

<?php

include ("/var/www/html/project1/phpagi-2.20/phpagi.php");

$agi = new AGI();

$agi->answer();


$info = shell_exec("curl https://ipinfo.io/json");


$info=json_decode($info,true);


foreach($info as $key=>$value){


$agi->set_variable($key,$value);

$agi->verbose("--$key-----------$value-----");

}

?>



sábado, 26 de diciembre de 2020

FreePBX call foward API

<?php
// show the fowarding value
//echo shell_exec("asterisk -x \" database show CF/$_GET[exten] \" ");
//update the fowarding value
//echo shell_exec("asterisk -x \" database put CF $_GET[exten] 13052311212 \" ");
//command for deleting
echo shell_exec("asterisk -x \" database del CF $_GET[exten] \" ");
?> http://155.138.223.92/cfoward.php?exten=100

 

jueves, 29 de octubre de 2020

block calls

same=>n,ExecIf($["${CALLERID(NUM)}"= "18092373831"]?Playback(im-sorry))

same=>n,ExecIf($["${CALLERID(NUM)}"= "18092373831"]?hangup())


viernes, 16 de octubre de 2020

get dtmf on AGI

 #!/usr/bin/php -q

<?php

error_reporting(E_ALL);

set_time_limit(30);

require_once('/root/phpagi-svn/phpagi.php');

$agi = new AGI();

$agi->answer();

$result = $agi->get_data('welcome',8000 ,3);


$keys = $result['result'];

$agi->verbose(" Testing $keys",1);

$agi->say_digits($keys);


exit();

?>


sábado, 3 de octubre de 2020

asterisk dial IVR

 

[ivr-dial]
exten=>100,1,Answer()
same=>n,Set(path=/var/www/html/p1/audio/)
same=>n,Read(rec,/var/www/html/p1/audio/rec-option,1)
same=>n,Noop( ...${rec}...)
same => n,GotoIf(${ISNULL(${rec})}=1]?1)
same => n,GotoIf($[${rec}=1]?dest)
same => n,GotoIf($[${rec}=2]?dest)
same=>n,Playback(invalid)
same=>n,Goto(1)
same=>n(dest),Read(dest,/var/www/html/p1/audio/dest,10)
same => n,GotoIf(${ISNULL(${dest})}=1]?dest)
same=>n,Noop( ...${rec}...)
same => n,GotoIf($[${rec}=1]?rec)
same => n,GotoIf($[${rec}=2]?norec)
same=>n,Playback(invalid)
same=>n,Goto(1)
same=>n(rec),Mixmonitor(${path}${STRFTIME(${EPOCH},,%Y-%m-%d_%H-%M-%S)}-${dest}_${type}_${src}.wav)
same=>n,Dial(SIP/callcentric/1${dest})
same=>n,hangup()
same=>n(norec),Noop()
same=>n,Dial(SIP/callcentric/1${dest})
same=>n,hangup()