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 / freepbx.vscode-snippits
Created May 26, 2021 04:00
Snippits for FreePBX in vscode
{
// (c)2021 James Finstrom
// License: Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
"FreePBX Text Input":{
"scope": "php,html",
"prefix": "f-texti",
"body": [
"<!--${1:LABEL}-->",
"<div class=\"element-container\">",
@jfinstrom
jfinstrom / costOfFree.md
Last active May 26, 2021 00:31
The cost of free.

Open Source Software

The cost of free.

Who am I?

I am a Sr. Software engineer and a former core developer for the FreePBX project. I have been involved in open source software as a user and developer since 2005. I have been in computers since I was a child with my introduction to computers on a IBM XT.

Disclaimers

@jfinstrom
jfinstrom / Restore.php
Created December 14, 2020 21:34
Digium Phones Restore
<?php
namespace FreePBX\modules\Digium_phones;
use FreePBX\modules\Backup as Base;
class Restore Extends Base\RestoreBase{
public function runRestore(){
$configs = $this->getConfigs();
$this->importTables($configs['tables']);
}
public function processLegacy($pdo, $data, $tables, $unknownTables){
<?php
$options = include(__DIR__.'/options.php');
?>
<html lang="en">
<head>
<title>Select PHP Example</title>
</head>
<body>
<select id="example" name="example">
@jfinstrom
jfinstrom / ari-gen.js
Created May 22, 2020 21:54
Concept of ARI connection with generators.....
const ari = require("ari-client");
const freepbx = new require("freepbx");
const co = require("co");
co(function*() {
var freepbxC = yield freepbx.connect();
var ariC = yield ari.connect(
"http://localhost:8088/ari",
freepbxC.config.configs.FPBX_ARI_USER,
freepbxC.config.configs.FPBX_ARI_PASSWORD
@jfinstrom
jfinstrom / ari.yaml
Last active February 29, 2024 11:17
ARI Open API 3
openapi: 3.0.1
info:
title: Asterisk ARI
version: 6.0.0
servers:
- url: http://localhost:8088/ari
tags:
- name: applications
description: Stasis application resources
- name: asterisk
@jfinstrom
jfinstrom / ari.yaml
Created May 19, 2020 19:16
ARI Swagger v2
basePath: /ari
definitions:
containers:
description: Container
binary:
description: Binary
Application:
description: Details of a Stasis application
properties:
bridge_ids:
/***
* ###### ## ######## ### ######## ## ## ## #### ########
* ## ## ## ## ## ## ## ## ## ## ## ## ## ##
* ## ## ## ## ## ## ## ## #### ## ## ##
* ## ## ###### ## ## ######## ## ## ## ########
* ## ## ## ######### ## ## ## ## ## ##
* ## ## ## ## ## ## ## ## ## ## ## ##
* ###### ######## ######## ## ## ## ## ######## ## #### ##
*/
@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);