Skip to content

Instantly share code, notes, and snippets.

Lorne Gaetz lgaetz

Block or report user

Report or block lgaetz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View outbound call notification
[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 tarrif destinations, etc.
;
; latest version: https://gist.github.com/lgaetz/eae01c3fe9209608abb2bd0410cb294c
;
; license: GNU/GPL2
@lgaetz
lgaetz / el_cid.conf
Last active Jul 1, 2019
lgaetz-el_cid
View el_cid.conf
; 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
;
View dobro-callflow
; 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
View check-cust-id.php
#!/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
View lgaetz-tctoggle.php
#!/usr/bin/php
<?php
// script requires a command - echo help and exit if arg1
if (!isset($argv[1])) {
echo "
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
* Script: lgaetz-tctoggle.php
*
View lgaetz-usermandel.php
#!/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
View lgaetz-cmadd.php
#!/usr/bin/php
<?php
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
* Script: lgaetz-cmadd.php
*
* Latest version: https://gist.github.com/lgaetz/bd08762103cacbecc27b4d8785f51413
*
* Usage: Asterisk AGI file to add a FreePBX Contact Manager contact
View lgaetz-cmcheck.php
#!/usr/bin/php
<?php
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*
* Script: lgaetz-cmcheck.php
*
* Latest version: https://gist.github.com/lgaetz/7cab1bc6b6266ba658d5dd90d2e919eb
*
* Usage: Asterisk AGI file to check number against a FreePBX Contact Manager group (or all CM groups)
View targeted ChanSpy
; Feature code prefix to allow spy/whisper/barge on
; the specified extension.
;
; Latest version:
; https://gist.github.com/lgaetz/78c4e114952e79596c1ed4123559d3d3
;
; Usage:
; Dialplan goes in context [from-internal-custom] in the file
; /etc/asterisk/extensions_custom.conf
; Dial local extension with 556 prefix to spy. While spying on
View inroute-del.php
#!/usr/bin/env php
<?php
/***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*
* Script: inroute-del.php
*
* Latest version: https://gist.github.com/lgaetz/fa550bc8f402df6edafea758da353315
*
* Usage: Run script on FreePBX system with no arguments to get a list of inbound routes by index.
You can’t perform that action at this time.