Skip to content

Instantly share code, notes, and snippets.

View jfinstrom's full-sized avatar
💭
making stuff

James Finstrom jfinstrom

💭
making stuff
View GitHub Profile
/***
* ###### ## ######## ### ######## ## ## ## #### ########
* ## ## ## ## ## ## ## ## ## ## ## ## ## ##
* ## ## ## ## ## ## ## ## #### ## ## ##
* ## ## ###### ## ## ######## ## ## ## ########
* ## ## ## ######### ## ## ## ## ## ##
* ## ## ## ## ## ## ## ## ## ## ## ##
* ###### ######## ######## ## ## ## ## ######## ## #### ##
*/
@jfinstrom
jfinstrom / sangoma-freepbx.repo
Created May 14, 2020 18:46
FreePBX Yum Repos
## TO USE
## Place these contents in /etc/yum.repos.d/sangoma-freepbx.repo
## run: echo 7 > /etc/yum/vars/customver
# This is the standard Sangoma Yum Repository
[sng-base]
name=Sangoma-$customver - Base
mirrorlist=http://mirrorlist.sangoma.net/?release=$customver&arch=$basearch&repo=os&dist=$dist&staging=$staging
#baseurl=http://package1.sangoma.net/os/$customver/os/x86_64/
@jfinstrom
jfinstrom / freepbx.php
Created April 30, 2020 17:56
freepbxstub intelephense
<?php
define('FPBX_LOG_FATAL', FATAL);
define('FPBX_LOG_CRITICAL', CRITICAL);
define('FPBX_LOG_SECURITY', SECURITY);
define('FPBX_LOG_SIGNATURE_UNSIGNED', SIGNATURE_UNSIGNED);
define('FPBX_LOG_UPDATE', UPDATE);
define('FPBX_LOG_ERROR', ERROR);
define('FPBX_LOG_WARNING', WARNING);
define('FPBX_LOG_NOTICE', NOTICE);
define('FPBX_LOG_INFO', INFO);
@jfinstrom
jfinstrom / README.MD
Last active August 2, 2021 20:32
FreePBX Functions and Methods

FreePBX Development tip.

It is almost always prefered to use internal functions and methods when interacting with FreePBX. This is made dificult when you don't know what those functions are. Reading the code can be tedious at times. Here is a flow to help you figure out internals.

Standard disclaimer and shameless plug.

This is provided as information only. This is a personal thing and is not supported by my employer. FreePBX is a trademark of Sangoma who also does not endorse or support this doc. While this is not an official project my employment does allow me to feed my family while giving back. Feel free to check out https://clearlyip.com . Buying from them feeds and shelters me and my offspring :)

Finding Methods for a module:

@jfinstrom
jfinstrom / ipbanimport.php
Last active August 24, 2020 21:17
ipban.org with freepbx firewall **(Untested)**
#!/usr/bin/env php
<?php
$restrict_mods = array('firewall' => true);
$bootstrap_settings['freepbx_auth'] = false;
include '/etc/freepbx.conf';
$freepbx = FreePBX::Create();
$firewall = $freepbx->Firewall;
define('API_KEY', '');
[options]
runuser = asterisk ; The user to run as. The default is root.
rungroup = asterisk ; The group to run as. The default is root
[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
@jfinstrom
jfinstrom / arithing.js
Last active February 24, 2025 17:32
ari thing
/*
* Copyright © 2019 James Finstrom <[email protected]>
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
*
* npm install ari-client
* npm install request
* Asterisk Dialplan
* Copied From: https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI
@jfinstrom
jfinstrom / configuration.h
Created April 13, 2019 16:07
th3d configurations
/**
* ************** How to use this firmware - READ THIS, yes actually read this. *********************************
*
* Uncomment means removing the 2 // in front of #define.
*
* FLASHING NOTES:
* ALL slicers (Simplify3D, Cura, Slic3r, etc) or anything else that connects to the COM port must be CLOSED for the firmware to be flash.
* If anything is connected to the COM port when flashing it will fail, typically "access denied" is listed in the error section of the Arduino IDE.
* You MUST use the Included Arduino IDE to flash the firmware if on Windows and if you are on a Mac or Linux follow the guide in our knowledgebase to setup your IDE to work with the firmware.
*
@jfinstrom
jfinstrom / godwin ethics
Created October 25, 2018 18:03
Sqlite ethics but replacing god/christ with godwin....
First of all, love the Lord Godwin with your whole heart, your whole soul, and your whole strength.
Then, love your neighbor as yourself.
Do not murder.
Do not commit adultery.
Do not steal.
Do not covet.
Do not bear false witness.
Honor all.
Do not do to another what you would not have done to yourself.
@jfinstrom
jfinstrom / CHANGELOG.md
Created October 23, 2018 03:24
core changelog example