In search of the elusive goto0 -- destination drop down implementation

Tags: #<Tag:0x00007f4f43a6af10> #<Tag:0x00007f4f43a6ada8> #<Tag:0x00007f4f43a6ac68> #<Tag:0x00007f4f43a6aab0>

(Mitch Mitchell) #1

I am looking for the implementation of the drop down that several modules use for selecting destinations. The label reference is “goto0” – I see it used in several modules but I have not found where it is implemented. I need to see how it prepares the list of potential destinations to implement something similar for fwconsole commands in the allowlist module.

Any pointers?


Do you want to build a snow man?
(Simon Telephonics) #2

Take a look at libraries/BMO/Destinations.class.php.

Try this little PHP script on the command line to see a structured list.

$bootstrap_settings['freepbx_auth'] = false;
require_once '/etc/freepbx.conf';

(TheJames) #3
<?php echo drawselects($post_dest,0); ?>

2nd arg is the goto number Above goto0 below goto1

<?php echo drawselects($post_dest,1); ?>

form processing…

(Mitch Mitchell) #4

Yeah I saw that, but I’m trying to find the code that actually gathers up the list and package the information for display. My aim is to replicate it for a console command to select a destination.

(TheJames) #5

The function

(Mitch Mitchell) #6

Perfect, thanks! I’ve got some reading to do. That first comment line is a classic, and quite apropos.

(Mitch Mitchell) #7

Bill, James,

Thank you both for your notes – that put me on the right track.


(system) closed #8

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.