Last active
August 3, 2021 22:06
-
-
Save lgaetz/2f0a19e79f968f9aa832dd7ec74d57dd to your computer and use it in GitHub Desktop.
php script to use freepbx methods to get/set voicemail params
This file contains 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 | |
/***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** | |
* | |
* Script: lgaetz-voicemial.php | |
* | |
* FreePBX script to work with device presence states | |
* | |
* Latest version: https://gist.github.com/lgaetz/2f0a19e79f968f9aa832dd7ec74d57dd | |
* | |
* Usage: | |
* | |
* | |
* License: GNU/GPL3+ | |
* | |
* History: | |
* 2021-08-03 Bare minimum proof of concept | |
* | |
* | |
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****/ | |
include '/etc/freepbx.conf'; | |
$FreePBX = FreePBX::Create(); | |
// get vm settings for all extensions | |
$allext_vm=$FreePBX->Voicemail->getVoicemail(); | |
//print_r($allext_vm); | |
// get vm settings for single extension_loaded | |
$ext_vm=$FreePBX->Voicemail->getMailbox("6008"); | |
print_r($ext_vm); | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment