Skip to content

Instantly share code, notes, and snippets.

View lgaetz's full-sized avatar

Lorne Gaetz lgaetz

  • Nova Scotia, Canada
View GitHub Profile
@lgaetz
lgaetz / sendmail-bluemix
Last active September 13, 2022 14:01
Asterisk voicemail mailcmd script for VM transcription
#!/bin/sh
# sendmail-bluemix
# current verison of this script: https://gist.github.com/lgaetz/2cd9c54fb1714e0d509f5f8215b3f5e6
#
#
# Original source created by N. Bernaerts: https://github.com/NicolasBernaerts/debian-scripts/tree/master/asterisk
# modified per: https://jrklein.com/2015/08/17/asterisk-voicemail-transcription-via-ibm-bluemix-speech-to-text-api/
#
#
#!/usr/bin/env php
<?php
if (!isset($argv[1])){
echo "
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*
* Script: extension-del.php
*
* Latest version: https://gist.github.com/lgaetz/f2d3d717520f8adf2018643473d1f748
#!/usr/bin/env php
<?php
if (!isset($argv[1])){
echo "
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*
* Script: lgaetz-fmfm.php
*
* Latest version: https://gist.github.com/lgaetz/ff7d6806c798086e144396d275f7a8ab
*
#!/usr/bin/env php
<?php
if (!isset($argv[2])){
echo "
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*
* Script: lgaetz-dnd.php
*
* Latest version: https://gist.github.com/lgaetz/b350b9fa9ac18730150b387a1525aa4e
*
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAllMB/LAdH7yor+yW+PZla0kSWMvugiM23GsKM7eOSXby/3KpOzzFYvqiYOXwIqwBY8Dx/jbCUXxxQUQHkedObr4jyN860UQTumWA8SMR4eDTB8aSUUzkb407zyvnZ763+Ul7lp3rFWw0vwCBS3mr/AU7omnaH8DTgUIx6GiQQ9j8DDiDnD/JqLvzmuhwlbHJuwuhor09skEIi0tDdQn2qTUl1wNeBGeuX2P4peBMWF+/8JWRRHApkbJCI94qpBX/DlzYQgJ0bmaVwQhS8BdsdGZpGqVZLDuz01o+DS0WlGeb2qkN3Enrsjwgit3VlEnqaLJuXAeiWj5zNQyn1vAptQ== root@pbx.local
#!/bin/bash
# Script: lgaetz-rec2email.sh automatically send all call recordings to email for FreePBX
#
# Latest version: https://gist.github.com/lgaetz/f5d2ad453c381856b1b7e00d99ed0ecb
#
# Usage: Save to /var/lib/asterisk/bin/lgaetz-rec2email.sh, owner asterisk:asterisk 777 perms.
# In FreePBX, Advanced Settings, Post Call Recording Script sub actual email send address and populate with:
#
# /var/lib/asterisk/bin/lgaetz-rec2email.sh <email@address.com> ^{MIXMONITOR_FILENAME} ^{FROMEXTEN} ^{ARG3}
#!/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.
@lgaetz
lgaetz / Targeted ChanSpy
Last active April 6, 2024 05:16
FreePBX Feature code prefix to allow spy/whisper/barge on the specified extension
; FreePBX Feature code prefix to allow spy/whisper/barge on
; the specified extension.
;
; Latest version:
; https://gist.github.com/lgaetz/78c4e114952e79596c1ed4123559d3d3
;
; Usage:
; Dialplan goes in the file:
; /etc/asterisk/extensions_custom.conf
; Dial local extension with 556 prefix to spy. While spying on
#!/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)
#!/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