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 python | |
# -*- coding: utf-8 -*- | |
# | |
# asterisk.py | |
# | |
# Copyright 2012 James Finstrom<jfinstrom at gmail> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
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 | |
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** | |
* remotehintpoll.php | |
* | |
* Created by Lorne Gaetz [email protected] | |
* | |
* Latest version: https://gist.github.com/lgaetz/8545099 | |
* | |
* Licensed under GNU GPL version 2 or any later verison. |
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 | |
// This function works within FreePBX or with FreePBX 2.9+ bootstrap loader | |
// $astman (phpagi class) already declared | |
function group2chan($groupid) { | |
global $astman; | |
// strip non-digits and assume the remaining number is the group number | |
$groupid = preg_replace("/[^0-9]*/", "", $groupid); |
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/8633920 | |
* | |
* Description: | |
* | |
* Script lgaetz-didloopback.php is used on a FreePBX server, with custom dialplan that calls |
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 | |
// Written by jkiel | |
// license: GNU/GPL2 or later | |
/* | |
Match a phone number against an array of patterns | |
return array containing | |
'pattern' = the pattern that matched | |
'number' = the number that matched, after applying rules |
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 | |
function create_table($tablename, $cols) { | |
global $db; | |
# create a table if none present | |
# The temp column will be automatically removed by the checking code below. | |
$sql = "CREATE TABLE IF NOT EXISTS `$tablename` (`zzaa` INT);"; | |
$check = $db->query($sql); | |
if (DB::IsError($check)) { |
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 | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* Modification to file /admin/bounce.php to get subscriber email address * | |
* from Amazon SES bounce email warnings * | |
* Existing code lines 0 to 136 removed for clarity * | |
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***/ | |
$tables["user"],$guessedid)); // exist line 137 |
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 | |
/**** **** **** **** **** **** **** **** **** **** **** | |
* Description: | |
* Script that checks the ip address of a specified | |
* host and sends an email alert if the host's | |
* ip address has changed since the last check | |
* | |
* Usage: | |
* Run as a cron job to monitor an IP address, generates |
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 | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* confkick.php | |
* FreePBX AGI file kicks all conference participants from the conference number received as argument | |
* | |
* Usage: Call from FreePBX dialplan using single argument with conf number to be kicked | |
* exten => s,n,AGI(confkick.php,1000) | |
* |
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 | |
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | |
* email_notify.php | |
* FreePBX AGI file that generates an email message to an email address or to a list of addresses | |
* in an external file. | |
* | |
* Latest Version: https://gist.github.com/lgaetz/16f52b10983d1b8eaae02d9ec0ddf310 | |
* |
OlderNewer