dahdi_cfg hanging - Help needed

Our Asterisk instance had been running without any issues for 2-3 years, but we started having this problem about a month ago, and it seems to happen now every few days.

We are running Asterisk 11.2.1, which we haven’t performed any updates on the core modules since the beginning, so the problem should not have started from any recent module changes.

The problem seems to be that something is causing /usr/sbin/dahdi_cfg to hang. One it starts hanging, we haven’t found a way to get it to work again other than rebooting the whole machine.

After a reboot, /usr/sbin/dahdi_cfg works normally, and outputs the following in less than a second:

[code]# /usr/sbin/dahdi_cfg -v
DAHDI Tools Version - 2.6.1

DAHDI Version: 2.6.1
Echo Canceller(s): HWEC
Configuration

SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)

24 channels to configure.

Setting echocan for channel 1 to hwec
Setting echocan for channel 2 to hwec
Setting echocan for channel 3 to hwec
Setting echocan for channel 4 to hwec
Setting echocan for channel 5 to hwec
Setting echocan for channel 6 to hwec
Setting echocan for channel 7 to hwec
Setting echocan for channel 8 to hwec
Setting echocan for channel 9 to hwec
Setting echocan for channel 10 to hwec
Setting echocan for channel 11 to hwec
Setting echocan for channel 12 to hwec
Setting echocan for channel 13 to hwec
Setting echocan for channel 14 to hwec
Setting echocan for channel 15 to hwec
Setting echocan for channel 16 to hwec
Setting echocan for channel 17 to hwec
Setting echocan for channel 18 to hwec
Setting echocan for channel 19 to hwec
Setting echocan for channel 20 to hwec
Setting echocan for channel 21 to hwec
Setting echocan for channel 22 to hwec
Setting echocan for channel 23 to hwec
Setting echocan for channel 24 to none[/code]

When it stops working properly, all it shows is:

[code]# /usr/sbin/dahdi_cfg -v
DAHDI Tools Version - 2.6.1

DAHDI Version: 2.6.1
Echo Canceller(s): HWEC
Configuration

SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)

24 channels to configure.

[/code]
And then it just sits there forever.

Running it with debug, I get this:

# /usr/sbin/dahdi_cfg -d Line 9: span=1,1,0,esf,b8zs Line 11: bchan=1-23 Line 12: dchan=24 Line 14: echocanceller=hwec,1-23 Line 18: loadzone = us Line 19: defaultzone = us <End of File>

The main pain this is causing us is that when changes are made in FreePBX and “Apply Config” is run, it calls /usr/sbin/dahdi_cfg, and this is causing “Apply Config” to not finish.

We’ve found that if we manually kill the /usr/sbin/dahdi_cfg process, at least we can get “Apply Config” to finish and have the changes take effect, but once the system gets into the state where “/usr/sbin/dahdi_cfg” hangs, every subsequent run will hang, so inevitably we still have to reboot the server to get it back into a proper working state.

Anyone have any ideas or suggestions to figure out why /usr/sbin/dahdi_cfg is hanging?

Thanks in advance!