-
-
Save lgaetz/07de9ced3d02beeaed37a519f4ce1752 to your computer and use it in GitHub Desktop.
Dump endpoints with ARI and FreePBX
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 | |
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); | |
$return = json_decode($ari->get('/endpoints'),true); | |
print_r($return); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment