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 | |
<?php | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* | |
* Script: lgaetz-usermandel.php | |
* | |
* Latest version: https://gist.github.com/lgaetz/a6cc6139aefcb711a9de2f634690ceb6 | |
* | |
* Usage: Scipt to delete a FreePBX User Management user. Developed for FreePBX 14 |
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 | |
<?php | |
// script requires a command - echo help and exit if arg1 | |
if (!isset($argv[1])) { | |
echo " | |
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* | |
* Script: lgaetz-tctoggle.php | |
* |
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 | |
<?php | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* | |
* Script: check-cust-id.php | |
* | |
* Latest version: https://gist.github.com/lgaetz/73984457008c3769f0af4c7d668d16c3 | |
* | |
* Usage: Check provided arg1 against a csv file (arg2) and set channel var (arg3) to true|false |
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
; Feature code prefix to allow FreePBX user to set and unset a dobro-callflow | |
; it works similarly to a Call Flow Conrol, except the phone user sets the | |
; destination number when enabling | |
; | |
; Latest version: | |
; https://gist.github.com/lgaetz/543da144d051a353ca0fab93b7f34cf2 | |
; | |
; Usage: | |
; Dialplan below goes in the file | |
; /etc/asterisk/extensions_custom.conf |
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 user dialplan for setting the outgoing Caller ID dynamically on a per-call basis to match | |
; the NANP area code of the destination number | |
; | |
; Latest version: | |
; https://gist.github.com/lgaetz/2b3d67a30f86a827121b004ec2f3024a | |
; | |
; Usage: | |
; Content below goes in /etc/asterisk/extensions_custom.conf | |
; |
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
[outbound-call-notification] | |
; Use with FreePBX Custom Trunk, with a dial string set to: | |
; local/$OUTNUM$@outbound-call-notification | |
; Structure outbound routes to use this trunk ahead of conventional trunks or without any other trunks. | |
; Email notice will be generated on all outbound calls. Use for restricted | |
; routes, calls to high tariff destinations, etc. | |
; | |
; latest version: https://gist.github.com/lgaetz/eae01c3fe9209608abb2bd0410cb294c | |
; | |
; license: GNU/GPL2 |
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 | |
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'); | |
$ari->setupAuth($ariuser,$aripass); |
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/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
#!/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 |