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, 4 de marzo de 2021

asterisk incrementing

[audio-admin]

  exten=>_x.,1,Answer()

  same=>n,Noop( ******* ${DB(test/count)} ***)

  same=>n,GotoIf($[${DB(test/count)} >4]?del)

  same=>n,GotoIf($[${DB(test/count)} >0]?inc)

  same =>n,Set(DB(test/count)=1)

  same=>n,Set(COUNT=${DB(test/count)})

  same => n,SayNumber(${COUNT})

  same=>n,hangup()


 same => n(inc),Set(DB(test/count)=$[${DB(test/count)} + 1])

   same=>n,Set(COUNT=${DB(test/count)})

  same => n,SayNumber(${COUNT})

      same=>n,hangup()



same=>n(del),Set(del=${DB_DELETE(test/count)})

same=>n,playback(im-sorry)

same=>n,hangup()



lunes, 15 de febrero de 2021

Comedia - SIP:Connection-Oriented Media (Comedia)

 

In Asterisk:

Comedia mode means that Asterisk will ignore the IP and port in the received SDP from the peer and will wait for incoming RTP. This RTP should arrive to the port that Asterisk replied in the "200 OK" SDP. After that, Asterisk already knows where to send its RTP.
This makes communication possible with UA's behind NAT which don't solve NAT problem in client side (STUN, ICE, ALG enabled router, etc). This option works properly in conjunction with qualify=yes option in order to keep open the connection from Asterisk to the peer behind NAT.

Cisco Comedia Enhancements:

The Connection-Oriented Media (Comedia) Enhancements for SIP feature allows the gateway to check the media source of incoming Real-time Transport Protocol (RTP) packets and allows the endpoint to advertise its presence inside or outside. of Network Address Translation (NAT). Using this feature enables symmetric NAT traversal by supporting the capability. to modify and update an existing RTP session remote address and port.


https://www.comediacommunications.com/comedia.mhtml

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())