source:programatically_list_dynamic_queue_members_from_freepbx
Differences
This shows you the differences between two versions of the page.
source:programatically_list_dynamic_queue_members_from_freepbx [2021/09/07 10:09] – created genadmin | source:programatically_list_dynamic_queue_members_from_freepbx [2021/11/01 10:32] (current) – genadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== FreePBX Queue Membership ====== | ||
+ | |||
+ | Queue members are stored within AstDB, which is a Sqlite3 database so these aren't found in config files. You can influence these using the queue memmber add/remove commands via AMI or if so inclined by accessing the AstDB directly (not recommended). You can get a list of members using show queue within Asterisk (or asterisk -rx "queue show nnnnn" | ||
+ | |||
<code PHP> | <code PHP> | ||
<?php | <?php | ||
+ | // pbxqueues.php Version 1.001a | ||
+ | // Richard Taylor 2021 | ||
+ | // Chunks taken from FreePBX source | ||
if (!isset($argv[1])){ | if (!isset($argv[1])){ | ||
Line 11: | Line 18: | ||
$device=$FreePBX-> | $device=$FreePBX-> | ||
$user=$FreePBX-> | $user=$FreePBX-> | ||
- | |||
- | |||
if ($astman) { | if ($astman) { | ||
Line 37: | Line 42: | ||
?></ | ?></ | ||
+ | |||
+ | You can of course modify this code to change Queue Membership if needed. The recommended route is of course to use Asterisk' | ||
+ | |||
+ | A scenario where this could be useful is when we're synchronising a list of queue members with a third party system. We use the code above to get a list of current members, then open a session with Asterisk via AMI and remove those who we don't want and add those we do. | ||
+ | |||
+ | Remember queue membership changes occur right away and there' |
/home/gen.uk/domains/wiki.gen.uk/public_html/data/pages/source/programatically_list_dynamic_queue_members_from_freepbx.txt · Last modified: 2021/11/01 10:32 by genadmin