This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Display logs files with lines that begin with a 10 digit unixtime to human readable date | |
# save in /usr/sbin/ and make it executable | |
# | |
# Latest version: https://gist.github.com/lgaetz/b06c58aa349bc84348b12fc5d908da11 | |
# | |
# Usage: | |
# cat /etc/asterisk/firewall.log | santiago | |
# santiago /var/log/asterisk/queue_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/***************************************************** | |
* Rough proof of concept of a web script | |
* to accept SMS webhook from FreePBX on an | |
* inbound SMS and post it to twitter using an https://ifttt.com/ webhook | |
* | |
* License: GNU GPL3+ | |
* | |
* History : 2022-01-13 first commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** | |
* | |
* License: GNU GPL/2+ | |
* | |
* /var/www/html/admin/modules/superfecta/sources/source-Trunk_Provided.module | |
* | |
* History: 2012-09-18 update by lgaetz | |
* 2021-12-20 update by tm1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Purpose | |
; FreePBX custom in-call feautre code framework that allows a caller to initiate an action that will be performed on hangup by | |
; pressing #9 during a call. Sets up feature code that adds a hangup handler to the channel, and the hangup handler can be used | |
; to record to the CDR userfield or perform some other action Possible uses are for flagging calls with audio issues. | |
; | |
; Latest version: https://gist.github.com/lgaetz/feaedc65a2f255bb4027e2b52efa8947 | |
; | |
; License GNU GPL3+ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Latest version: https://gist.github.com/lgaetz/066c655867b4e679da21dbd1567b29bd | |
; | |
; Crude proof of concept of 2FA for a FreePBX extension | |
; Clients can register to the PBX, but are unable to dial until they successfully | |
; enter a random PIN sent via email. | |
; Once the PIN passes, the client IP is whitelisted and user can dial without | |
; restriction until the IP changes | |
; | |
; License: GNU GPL3+ | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** | |
* | |
* Script: lgaetz-voicemial.php | |
* | |
* FreePBX script to work with device presence states | |
* | |
* Latest version: https://gist.github.com/lgaetz/2f0a19e79f968f9aa832dd7ec74d57dd | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Name: lgaetz-boomerang | |
; | |
; Latest version: https://gist.github.com/lgaetz/e7dbbcd6004559c5b467a146a8b14cfc | |
; | |
; Description: this dialplan Stores the most recent local extension number to speak with the referenced CallerID Number | |
; To direct an inbound call based on the last extension they last spoke to, do astdb query on the key/family | |
; boomerang/${CALLERID(number):-10} | |
; if set, will give most recent local exten. Something like dynamic routes could be used to branch call flow | |
; based on the returned result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** | |
* | |
* Script: lg-presence.php | |
* | |
* FreePBX script to work with freepbx user presence states | |
* | |
* Latest version: https://gist.github.com/lgaetz/6b528901e6746391369b79b371bdd71f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[send-sms-apidaze] | |
; latest version https://gist.github.com/lgaetz/57ffc5bbdd154081894138e983c1f4be | |
; | |
; In the APIDAZE API portal create a Dev App of type SMS and associate a DID with that APP | |
; get the secret and key for your app, and set them as variables | |
; Created by lgaetz, GNU/GPL3+ | |
; | |
; Create a Custom Destination with Return enabled and with the following target: | |
; send-sms-apidaze,s,1(${CALLERID(number)},What are you doing Dave?) | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php -q | |
<?php | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* | |
* Latest Version: https://gist.github.com/lgaetz/ce6ac96ca6de0e60177213ede50e7955 | |
* | |
* Description: | |
* | |
* Script lgaetz-trunk-monitor.php is used in conjunction with the "Monitor Trunk Failures" field in FreePBX |