Asterisk Crash when SMDI Message received

I’ve just set up an Asterisk server with an SMDI link to our Nortel Switch.

Here is our setup

Digium WCTDM2 Card, Xorcom Astribank, 2 analog ports from the Nortel PBX.

When ever a call comes in and the SMDI data is sent to Asterisk it crashes:

/usr/sbin/safe_asterisk: line 147: 27023 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk

I’ve tried Asterisk 1.6.0.10, 1.6.1.1, 1.6.1.2 and they all do the same. If I unplug the SMDI link the server does not crash. I can verify in the debug log that the SMDI messages are being received.

As well I’ve tried the calls via the WCTDM and Astribank and they produce the same result.

[Aug 6 10:45:19] DEBUG[27035] res_smdi.c: Read an ‘M’ to start an SMDI message
[Aug 6 10:45:19] DEBUG[27035] res_smdi.c: Read a ‘D’ … it’s an MD message.
[Aug 6 10:45:19] DEBUG[27035] res_smdi.c: Read a ‘0’
[Aug 6 10:45:19] DEBUG[27035] res_smdi.c: Read a '6

ANy Ideas, has anyone got SMDI and Asterisk 1.6x working?

Please check that all your Asterisk modules are for the same version, and, if they are, follow the procedures in doc/backtrace.txt.

Quick Update:

version 1.4.26 works fine, I will post more about the 1.6x bug once I look at doc/backtrace.txt

I had a similar problem back in the spring. SMDI would work but would crash more often than not. Also, I had applied the patch to allow the options to be used in the function. What I did find as a fix was some code in the res_smdi.c file. I’d have to get back in to see exactly what I did but we were seeing Asterisk try to re-read the smdi after it had already got the data and cleared it. You may want to get some better debug to determine if it is a similar error. In the meantime I will research what I did and let you know.