This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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
FreePBX basic config for Asterisk/DAHDI to enable Distinctive Ring Detection for incoming calls on POTS lines with | |
multiple DIDs. Once usedistinctiveringdetection has been enabled, you can get the dring values from the Asterisk | |
console/full log when you make an inbound call | |
compiled from various sources by lgaetz c. 2009 | |
license: GPL2 | |
[root@asterisk]# cat /etc/asterisk/chan_dahdi_channels_custom.conf | |
usedistinctiveringdetection=yes |
This file contains hidden or 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 | |
if (!isset($argv[2])){ | |
echo " | |
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** | |
* | |
* Script: lgaetz-pay-it-fwd.php | |
* sets,unsets,toggles and lists Unconditional Call Fwd setting for provided extension | |
* | |
* Latest version: https://gist.github.com/lgaetz/64212eceab5e2c8381b586ba14df4fcf |
This file contains hidden or 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 | |
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** | |
* lgaetz-hinterland.php | |
* PHP script to monitor devstate change of FreePBX extensions in real time | |
* | |
* latest version: https://gist.github.com/lgaetz/64ad83952a2a629204222e48fc01bb51 | |
* | |
* Usage: download the script to the PBX, make it executable and run it |
This file contains hidden or 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-sip-response-code] | |
; Context to send a specific SIP response code and terminate the channel | |
; Create Custom Destination in FreePBX with a dial string of the format | |
; send-sip-response-code,404,1 | |
; substitute the appropriate response code in place of the 404 | |
; Reference: https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings | |
; | |
; latest version: https://gist.github.com/lgaetz/480582a1827cc98db1ee539c249f074b | |
; | |
; License GPL/2 |
This file contains hidden or 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 | |
//test edit | |
if((@include '/etc/freepbx.conf') === false){ | |
echo "Failed to include configuration\r\n"; | |
return; | |
} | |
$ariuser = \FreePBX::Config()->get('FPBX_ARI_USER'); | |
$aripass = \FreePBX::Config()->get('FPBX_ARI_PASSWORD'); | |
$ari = new Pest('http://localhost:8088/ari'); |