Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Ordering of extensions

Ordering of extensions

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 233 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    P
    provu
    wrote on last edited by
    #1

    Hi all,

    Would just like to open by saying how great FOP2 is. Our company have purchased and deployed multiple licenses and have not encountered any difficulties with it so far.

    The latest one we have been setting up and demoing for a customer however did raise an interesting query.

    Is it possible to order the buttons in an arbitrary manner? I have tried reordering the extensions in the following way in the config:

    [SIP/100]
    type=extension
    label=Alan 
    extension=100 
    context=extensions 
    
    
    [SIP/102]
    type=extension
    label=Bob 
    extension=102 
    context=extensions 
    
    
    [SIP/101]
    type=extension
    label=Charlie 
    extension=101 
    context=extensions
    

    I was hoping that this order would be preserved but it appears to order the extensions numerically.

    Ultimately, we would like to order extensions alphabetically by their labels.

    I couldn't see any information in the [url=http://www.fop2.com/documentation-configuration-buttons.php#ExtensionButtons:35g6acjt]docs[/url:35g6acjt] regarding this.

    Am I overlooking something or is this not possible without a feature request?

    Thanks in advance.

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Hello,

      If you do a manual configuration, the extension order is preserved (first come, first served basis). So, the sample that you posted must work (unless you still have the #exec line at the end that overwrites your button configuration and instead used the output from the executed script).

      So, in the case of using auto configuration for freepbx, you can play with button order by tweaking at the autoconfiguration scripts themselves. For buttons the script is autoconfig-buttons-freepbx.sh, it is kind of a complex script because it checks for fop2admin module or not, and if you are on user and device mode or not, and uses different mysql queries to get button configuration for each case. If you look at the first big mysql query (fop2admin, non user and device mode) you can change the order by clause to be

      ORDER BY type,label

      instead of

      ORDER BY type,(exten+0)

      Best regards,

      1 Reply Last reply
      0
      • P
        P
        provu
        wrote on last edited by
        #3

        Hi Nicolas,

        Thanks for your prompt response. You pointed me in the correct direction regarding your FIFO ordering.

        I managed to get it sorted - we are using an included configuration file rather than a script such as your freepbx bash script.

        My problem was that I was simply restarting fop2 and not refreshing the fop2 web page. I incorrectly assumed that the button layout would update but understandably the DOM content doesn't change until a page refresh.

        Thanks ever so much for your help.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups