Recent upgrade to 1.8 - No trunk display

  1. 13 years ago

    FOP2 Engineer:

    I recently upgraded the following:
    Asterisk 1.6 -> 1.8.4
    FreePBX 2.8 -> 2.9.0.4

    Unfortunately, following my upgrade, my FOP2 no longer dynamically display calls on the respective channels. I've checked the FOP2Admin to make sure that "1-24" was listed next to the trunk specification, as well as ran the "autoconfig-buttons-freepbx.sh" script. Still, to no prevail, the calls don't display on the trunk.

    Some guidance on how to make this feature work would be appreciated. Also, would it be in my best interest to upgrade my FOP2 version? I believe I only have version 2 (instead of 2.2). Please lend me your guidance.

    Thanks, Josh

  2. admin

    27 May 2011 Administrator

    Hello Josh,

    Running the autoconfig-buttons-freepbx.sh script will do nothing, except show *you* what the button configuration is, including the trunks. It will not modify behavior in any way nor alter configuration. But what you see when running the script is useful for troubleshooting.

    So, run the script, and look at the trunk configuration that is generated. Look at the channel name (between brackets) and the channel lines that are inside, will be something like:

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

    or similar... look at all the channel lines there, those are the names that fop2 will track on that button.

    Then make a call, and do an

    asterisk -rx "core show channels"

    Look for the channel names there, do they match? If so, it will work, if not, then you must make fop2 button configuration match the name of the channels in asterisk

    Best regards,

  3. Admin,

    Thanks for your reply. I'm still not able to resolve this. It appears that FreePBX is using the autoconfig-buttons-freepbx.sh script to set up the items and trunks lines. What I believe to be the problem is that Asterisk 1.8 now refers to incoming DAHDI calls as "DAHDI/i1/..." (see example)

    voip01*CLI> core show channels
    Channel              Location             State   Application(Data)
    DAHDI/i1/18774092379 (None)               Up      AppDial((Outgoing Line))
    SIP/6403-000003ae    s@macro-dialout-trun Up      Dial(DAHDI/g0/18774092379,300,
    2 active channels
    1 active call
    903 calls processed

    Here is what is processed by the autoconfig script:

    [DAHDI/g0]
    type=trunk
    label=Cox PRI
    queuecontext=from-queue
    extenvoicemail=*
    email=splitme-1-24
    channel=DAHDI/1
    channel=ZAP/1
    channel=DAHDI/2
    channel=ZAP/2
    channel=DAHDI/3
    channel=ZAP/3
    channel=DAHDI/4
    channel=ZAP/4
    channel=DAHDI/5
    channel=ZAP/5
    channel=DAHDI/6
    ...

    I don't believe there are static config files for FOP2 that are used to match the DAHDI group to the FOP2 group config. I believe that Asterisk used to refer to each channel as 'g1', but there may have been an adjustment in the recent releases. Are there any additional suggestions you may be able to provide to help me resolve this issue? Thanks.

    Josh

  4. admin

    1 Jun 2011 Administrator

    Hi Josh,

    Edit the script /usr/local/fop2/autoconfig-buttons-freepbx.sh, line 58 or so, that looks like this:

    do
    echo "channel=DAHDI/$ZAPNUM"
    echo "channel=ZAP/$ZAPNUM"
    done

    Just add one option like:

    do
    echo "channel=DAHDI/i$ZAPNUM"
    echo "channel=DAHDI/$ZAPNUM"
    echo "channel=ZAP/$ZAPNUM"
    done

    Save the file, restart fop2, and see if it works.

  5. Nicolás,

    That didn't work. There were two places that I had to change it. The calls on the respective channels of the trunk are still not appearing. Here is the code after I made the requested adjustments:

    echo $LINEA | sed 's/^channel=\(.*\)/\n[\1]/g'
    echo $LINEA | grep -qi "^email=splitme"
    if [ $? = 0 ]; then
    RANGE=`echo $LINEA | sed 's/^email=splitme-//g' | sed 's/-/ /g'`
    for ZAPNUM in `seq $RANGE`
    do
    echo "channel=DAHDI/i$ZAPNUM"
    echo "channel=DAHDI/$ZAPNUM"
    echo "channel=ZAP/$ZAPNUM"
    done
    fi
    done
    
    else
    
    mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e \
        "SELECT if(type='extension',CONCAT('USER/',exten),device) AS channel,type,if(type<>'trunk',exten,' ') AS extension,\
        label,mailbox,context,'$QUEUECONTEXT' as queuecontext,concat('*',mailbox) AS extenvoicemail, \
        privacy,\`group\`,IF(type='trunk',IF(email<>'',concat('splitme-',email),''),email) as email, \
        queuechannel,originatechannel FROM fop2buttons WHERE device<>'' ORDER BY type,exten" | \
        sed '/\*\*/d' | sed 's/: /=/g' | sed '/.*=$/d' | while read LINEA
    do
    echo $LINEA | sed 's/^channel=\(.*\)/\n[\1]/g'
    echo $LINEA | grep -qi "^email=splitme"
    if [ $? = 0 ]; then
    RANGE=`echo $LINEA | sed 's/^email=splitme-//g' | sed 's/-/ /g'`
    for ZAPNUM in `seq $RANGE`
    do
    echo "channel=DAHDI/i$ZAPNUM"
    echo "channel=DAHDI/$ZAPNUM"
    echo "channel=ZAP/$ZAPNUM"
    done
    fi
    done
    fi

    Did I execute the code change correctly? Let me know if there are other steps we can take. Is there an upgrade? Would installing the latest version or even re-installing the version I have resolve this problem?

    Thanks, Josh

  6. admin

    10 Jun 2011 Administrator

    Hi Josh,

    What is the output now when you run autoconfig-buttons-freepbx.sh for your trunk?

  7. Nicolás,

    Here is the output from the autoconfig-buttons-freepbx.sh script:

    [DAHDI/g0]
    type=trunk
    label=Cox PRI
    queuecontext=from-queue
    extenvoicemail=*
    email=splitme-1-24
    channel=DAHDI/i1
    channel=DAHDI/1
    channel=ZAP/1
    channel=DAHDI/i2
    channel=DAHDI/2
    channel=ZAP/2
    channel=DAHDI/i3
    channel=DAHDI/3
    channel=ZAP/3
    channel=DAHDI/i4
    channel=DAHDI/4
    channel=ZAP/4
    channel=DAHDI/i5
    channel=DAHDI/5
    channel=ZAP/5
    channel=DAHDI/i6
    channel=DAHDI/6
    channel=ZAP/6
    channel=DAHDI/i7
    channel=DAHDI/7
    channel=ZAP/7
    channel=DAHDI/i8
    channel=DAHDI/8
    channel=ZAP/8
    channel=DAHDI/i9
    channel=DAHDI/9
    channel=ZAP/9
    channel=DAHDI/i10
    channel=DAHDI/10
    channel=ZAP/10
    channel=DAHDI/i11
    channel=DAHDI/11
    channel=ZAP/11
    channel=DAHDI/i12
    channel=DAHDI/12
    channel=ZAP/12
    channel=DAHDI/i13
    channel=DAHDI/13
    channel=ZAP/13
    channel=DAHDI/i14
    channel=DAHDI/14
    channel=ZAP/14
    channel=DAHDI/i15
    channel=DAHDI/15
    channel=ZAP/15
    channel=DAHDI/i16
    channel=DAHDI/16
    channel=ZAP/16
    channel=DAHDI/i17
    channel=DAHDI/17
    channel=ZAP/17
    channel=DAHDI/i18
    channel=DAHDI/18
    channel=ZAP/18
    channel=DAHDI/i19
    channel=DAHDI/19
    channel=ZAP/19
    channel=DAHDI/i20
    channel=DAHDI/20
    channel=ZAP/20
    channel=DAHDI/i21
    channel=DAHDI/21
    channel=ZAP/21
    channel=DAHDI/i22
    channel=DAHDI/22
    channel=ZAP/22
    channel=DAHDI/i23
    channel=DAHDI/23
    channel=ZAP/23
    channel=DAHDI/i24
    channel=DAHDI/24
    channel=ZAP/24
  8. admin

    10 Jun 2011 Administrator

    Seems fine, but re reading your first post it seems you are using FOP 2.0, I am not sure if that version will display trunk details at all. Please contact me via the live help if possible to see if we can upgrade your version and try with it.
    Best regards,

or Sign Up to reply!