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 / ariendpoints.php
Created October 8, 2019 20:04 — forked from jfinstrom/ariendpoints.php
Dump endpoints with ARI and FreePBX
#!/usr/bin/env php
<?php
if((@include '/etc/freepbx.conf') === false){
echo "Failed to include configuration\r\n";
return;
}
$ariuser = \FreePBX::Config()->get('FPBX_ARI_USER');
$aripass = \FreePBX::Config()->get('FPBX_ARI_PASSWORD');
$ari = new Pest('http://localhost:8088/ari');
$ari->setupAuth($ariuser,$aripass);
@lgaetz
lgaetz / asterisk.py
Created December 6, 2012 21:11 — forked from jfinstrom/asterisk.py
Example of using the Asterisk Manager API in python...
#!/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