No Trunk buttons Dahdi

I have followed the guide here http://www.fop2.com/documentation-confi ... unkButtons

but still dosn't pick up my Dahdi trunks, is there an autoconfigure trunks script? To grab the trunks from freepbx, do I have to change anything for Dahdi not Zaptel?

I haven't setup SIP Trunks yet either, would they be setup the same way?

here is my buttons.cfg file:

[DAHDI/1]
type=trunk
label=DAHDI 1-4
channel=DAHDI/1
channel=DAHDI/2
channel=DAHDI/3
channel=DAHDI/4
server=1

here is what my chan_dahdi.conf file looks like though

signalling = fxs_ks
callerid = asreceived
group = 0
context = from-zaptel
channel = 1
callerid= Free For All Incorporated
group= 0
context = default

signalling = fxs_ks
callerid = asreceived
group = 1
context = from-zaptel
channel = 2
callerid=
group=
context = default

signalling = fxs_ks
callerid = asreceived
group = 2
context = from-zaptel
channel = 3
callerid=
group=
context = default

signalling = fxs_ks
callerid = asreceived
group = 3
context = from-zaptel
channel = 4
callerid=
group=
context = default

group = 4
echocancel = yes
signalling = fxo_ks
context = Incoming
channel = 5
callerid = Free For All Incorporated
group = 4
context = default

group = 4
echocancel = yes
signalling = fxo_ks
context = Incoming
channel = 6
callerid = Free For All Incorporated
group = 4
context = default

group = 4
echocancel = yes
signalling = fxo_ks
context = Incoming
channel = 7
callerid = Free For All Incorporated
group = 4
context = default

group = 4
echocancel = yes
signalling = fxo_ks
context = Incoming
channel = 8
callerid = Free For All Incorporated
group = 4
context = default

I am certain I have misconfigured the buttons.cfg file, any help would be appreciated.

Comments

  • Still having problems with getting dahdi trunks to show up. If anyone could atleast point me in the direction to get this up I would appreciate greatly.

    Thanks in advance
  • Just to clarify as there are some incorrect assumptions regarding trunks:

    Trunk buttons are actually "GROUP" buttons, in the sense that no matter how many channels you list, you will only see ONE button.

    [DAHDI/1]
    type=trunk
    channel=DAHDI/2
    channel=DAHDI/3

    .. will show 1 button, not 3.

    Not sure if you have that problem, but it is a good place to clear this question out.

    Finally, if you use auto configuration using #exec, you cannot use at the same time static configs.. I will try to fix that on the next release, although is kind of difficult and I do not want to delay the release much longer.

    Best regards,
  • Yes I have tried just that, could I not being able to see this be a result of having the free trial and not seeing anymore then 15 buttons.
  • You are not going to see any button past the 15 limit in the free version. You can reduce the number of extensions so the other types show up, or you can put the trunk first in the list. If you use the autoconfiguration script move the trunk block at the top so it will list the configuration first.

    Best regards,
  • Running script on AsteriskNOW box updated new headers, keep getting command not found errors within CentOS. Not FOP2's Fault but encase anyone else is having this problem heres the fix.

    sh autoconfig-buttons-freepbx.sh > buttons.cfg
    autoconfig-buttons-freepbx.sh: line 45: asterisk: command not found

    $nano autoconfig-buttons-freepbx.sh
    Referring to First line here :
    _________________________
    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
    fi
    ___________________________________

    Fix:
    change first line where says 'asterisk -rx' to /usr/sbin/asterisk -rx
    and also changing the "zap show channels" to "dahdi show channels"
    seems to create the file correctly
  • Had rebooted server, still no dahdi trunks, and still showing old extensions, I have deleted 10 of the extensions.

    my fop2.cfg file looks like this:

    [general]
    ; AMI definitions
    manager_host=127.0.0.1 ;200.61.177.141
    manager_port=5038
    manager_user= user
    manager_secret=password
    ;event_mask=call,agent

    ; Daemon definitios
    listen_port = 4444
    ;restrict_host = www.asternic.org
    web_dir = /var/www/html/fop2

    ; Global Config
    language = en
    poll_interval = 86400
    poll_voicemail = 1

    ;master_key = 5678


    ; USER LIST
    ;user=620:1234:all
    ;user=621:1234:all
    ;user=622:1234:all
    ;user=623:1234all

    buttonfile=buttons.cfg

    blind_transfer=1

    #exec autoconfig-users-freepbx.sh

    ___________________________________
    With this pointing to the buttons.cfg for the users shouldn't this work? Where is Fop getting its button info from???
    Its not reading this file.

    Please help... I believe that I am getting close.
    What am I doing wrong now... :lol: These trunks are the last thing to configure within my AsteriskNOW setup..

    Thanks in advance.
  • Run:

    ./autoconfig-users-freepbx.sh

    Look at the output, at the end you will see a line like:

    buttonfile=XXXXXX.cfg

    then look inside XXXXXX.cfg, the buttons are there. If you have a file with just an

    #exec autoconfig-buttons-freepbx.sh

    Then leave that file alone and run in the command line:

    ./autoconfig-buttons-freepbx.sh

    That script will output the button config, if its wrong, you can fix the script to your liking, like adding the full path to the asterisk binary, changing ZAP to DAHDI, etc... The idea is that the script will output the proper FOP2 button configuration for your PBX.

    Best regards,
  • ok I have done exactly that, i had the buttonfile=XXXXXX.cfg

    then look inside XXXXXX.cfg, the buttons are there. If you have a file with just an

    #exec autoconfig-buttons-freepbx.sh

    so I have left it alone, and I ran ./autoconfig-buttons-freepbx.sh only to find that it didn't output anything, said it did, to what file I don't know, that was my original question.
    What file is fop2 reading from to get the buttons, after you have run the script outputs to where? I have exceeded over 15 so i need to delete some of them that are in call groups anyways... but I have no idea what file to delete these from.

    I really don't know what is wrong. Would hater to start over again when this is all that I have left.

    Thanks,
  • YAY.... :P

    All I had to do was reboot! :lol:
  • strange... usually there is no need to reboot for that script to work? anyways, glad it works now.
Sign In or Register to comment.