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. Bug in autoconfig-buttons-freepbx.sh

Bug in autoconfig-buttons-freepbx.sh

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 102 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.
  • B
    B
    blanchae
    wrote on last edited by
    #1

    Asterisk 1.6 using dahdi

    In autoconfig-buttons-freepbx.sh, the following code is supposed to be checking for dahdi trunks, it executes a "zap show channels" command. Zap show channels will report it as "no such command". It should be "dahdi show channels" - I've bolded the error.

    DAHDI=asterisk -rx "**zap** show channels" | grep -v from-internal | grep -v pseudo | grep -v Language | awk '{print $1}' | head -n 1
    if [ "X${DAHDI}" != "X" ]; then
    echo
    echo "[DAHDI/$DAHDI]"
    echo "type=trunk"
    echo "label=DAHDI"
    asterisk -rx "zap show channels" | grep -v from-internal | grep -v pseudo | grep -v Language | awk '{print $1}' | tail -n +2 | while read LINEA
    do
    echo "channel=DAHDI/$LINEA"
    done

    1 Reply Last reply
    0
    • B
      B
      blanchae
      wrote on last edited by
      #2

      Also to configure the Dahdi channels for extensions, the MySQL database for zap must be parsed. Add the following after the IAX extensions:

      DAHDI EXTENSIONS

      mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "select concat('DAHDI/',extension) as channel,extension,name as label,s1.data as mailbox,s2.data as context,concat('',s1.data) as extenvoicemail from users as u left join zap as s1 on u.extension=s1.id and s1.keyword='mailbox' left join zap as s2 on u.extension=s2.id where s2.keyword='context' order by extension" | sed '/**/d' | sed 's/: /=/g' | while read LINEA
      do
      echo $LINEA | sed 's/channel=(.
      )/\n[\1]\ntype=extension/g'
      done

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

        Thanks! I believe both issues were already addressed on the beta (when using it in conjunction with fop2 freepbx module).

        There are also some old installations out there that still require zap. So this solution will not fit everyone. And the autoconfig scripts are actually script so people can tweak them as you did.

        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