Skip to content

Instantly share code, notes, and snippets.

View hgaibor's full-sized avatar

Hugo Gaibor hgaibor

View GitHub Profile
@hgaibor
hgaibor / targeted-spy-with-cos-and-exts-restrictions.conf
Created August 7, 2023 23:11
targeted-spy-with-cos-and-exts-restrictions
; Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on
; a specified extension.
; NEW: Ability to set the list of extensions that can be spied for each extension.
; This will use the accountcode variable inside of the extension --> [advanced] tab
; Extensions list will be separated by & (eg: 100&200&201...) MAX limit 255 chars!!
;
; Latest version:
; https://gist.github.com/hgaibor/
;
; Forked from:
@hgaibor
hgaibor / targeted-chanSpy-with-levels-and-cos.conf
Last active August 7, 2023 23:10
targeted-chanSpy-with-levels-and-cos
; Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on
; a specified extension.
; Additionally, levels of spy access have been included in the logic to create roles and restrict
; who can spy on what other roles based on a numeric level of access.
;
; Latest version:
; https://gist.github.com/hgaibor/6a170c150cf9dec607620aa44d78fcd0
;
; Forked from:
; https://gist.github.com/hgaibor/82433116540f15ab345b2914500abb0d
@hgaibor
hgaibor / delete_recordings.sh
Created November 29, 2021 21:55
Delete recordings cron task
#!/bin/bash
# Delete WAV recording files after X days. Script can be modified to match different file types or longer day interval if needed
# NOTE: Script below is set to dry-run, it will not delete any files until you add the -delete flag.
# Deletion will remove files permanently, there's no easy way to undo that.
# Please update the script to delete only when you confirm it it working as expected.
#
# Latest version:
# https://gist.github.com/hgaibor/efeaf6b8081ed5c49791dc31cec1dee8
@hgaibor
hgaibor / extensions_custom.conf
Last active March 15, 2021 18:05
Limit internal extension to extension dialing custom dialplan
; Restrict extension-to-extension dialing on a PBX, allowing only to dial operator extension (100).
; NOTE: This code is in early stages, it has not considered the 911 dialing that has become mandatory for the US.
; See this link for further information: https://wiki.freepbx.org/display/FOP/Set+up+Emergency+Service%28E911%29+calling+requirements
;
; Latest version:
; https://gist.github.com/hgaibor/8fa18e95715fbd78e304101f398c5ab5
;
;
; Usage:
; 1. On FreePBX/PBXact GUI, add this to extensions_custom.conf file. This will use the predial hook to validate dialing for each call.
@hgaibor
hgaibor / targeted ChanSpy with permissions
Last active January 30, 2024 15:43 — forked from lgaetz/Targeted ChanSpy
Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on a specified extension. Based on Lgaetz original targeted spy, but allowing user permissions to be set with COS module on FPBX
; Feature code + Class of Service implementation to allow certain users to spy/whisper/barge on
; a specified extension.
;
; Latest version:
; https://gist.github.com/hgaibor/82433116540f15ab345b2914500abb0d
;
; Forked original version:
; https://gist.github.com/lgaetz/78c4e114952e79596c1ed4123559d3d3
;
; Usage and install instructions:
@hgaibor
hgaibor / README
Last active September 29, 2021 22:22
Auto Hotkey HGE Script
MOVED TO: https://github.com/hgaibor/AutoHotkey-HGE-Scripts
#!/usr/bin/php -q
<?php
if (!isset($argv[2])){
echo "
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*
* Script: mass-pay-it-fwd.php
* Based on Script lgaetz-pay-it-fwd.php; modified for changing settings on a batch of extensions
* Sets,unsets,toggles and lists unconditional Call Fwd setting for provided extension
*
@hgaibor
hgaibor / vpnize-Dphones.php
Last active June 11, 2020 00:41
VPN for D-phones
#!/usr/bin/php -q
<?php
echo "
------------------------------------------------------------------------------------------
| |
| Script: vpnize-phones.php |
| Script used to modify extension files and allow D phones to connect using |
| VPN connectivity from Sysadmin PRO VPN clients module |
| |