Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-3112

hidefromdir option in voicemail.conf

    XMLWordPrintable

    Details

      Description

      I have no proof of this but I've heard that the internal app_directory in Asterisk will not read extensions from voicemail.conf that have 'hidefromdir=yes' in the list of options. The directory AGI that ships with FreePBX ignores this switch--so I'm not sure if this is a bug report or a feature request, or better yet...a patch!

      Since I wrote the patch in just 4 short lines of code I'm including it here.

      {noformat}
      110,111c110,115
      < list($key,$value) = $temp;
      < $vmconf[$section][ $matches[1] ]["options"][$key] = $value;

      > if (strtolower($temp[0])=='hidefromdir' && strtolower($temp[1])=='yes') { > $vmconf[$section][ $matches[1] ]=null; > } else { > list($key,$value) = $temp; > $vmconf[$section][ $matches[1] ]["options"][$key] = $value; > }{noformat}

      Pretty simple really--just checking for hidefromdir=yes and if it finds it nulling out that item in the list of available extensions. This isn't entirely clean because it leaves an empty node in the $vmconf array with the extension number as the key. In any case it gets the job done because later in the searching of the array the hidefromdir=yes extensions are not read back since they are nulled out.

      I saw some banter on other forums about hiding extensions from the directory and heard all sorts of "very creative" ways of hiding extensions like putting funky characters in the extension name, etc...all poor options compared to using hidefromdir. In fact, I would love to see a simple checkbox in the Extension UI so the user could easily hide extensions from the directory and I'm willing to work on this aspect further.

      Hope that helps,

      --Lyle E. Dodge

      FreePBX.org@LyleDodge.com

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dodgly Lyle Dodge
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.