Really old systems: Howto fix "invalid opcode XXX in res_digium_phone.so" and Asterisk is not connected, failing to start

Hi,

I am running my Asterisk/FreePBX on an really old CPU, from 2011 or so… and with a recent upgrade I had Asterisk crashes and “journalctl” is telling you:

Jan 02 22:07:13 pbx kernel: traps: asterisk[2252416] trap invalid opcode ip:7f277a6a99b2 sp:7ffe007e8bd8 error:0 in res_digium_phone.so[7f277a600000+260000]

! CAUTION !

The below can be considered bad security advice. I am doing it anyway and I am even telling you. As you will see to fix this is to downgrade a particular package and prevent it from being upgraded. In my setup I am actually not using the particular device - but nevertheless, this is still bad security advice and anyone does this at their own risk! This should only be considered as a time-limited fix, definitely not as a workaround - we know how long temporary workarounds will stay in place.

! CAUTION !

Please follow these steps, how to fix the above error message:

$ cd /
$ find -name res_digium_phone.so
# will show ./usr/lib/x86_64-linux-gnu/asterisk/modules/res_digium_phone.so

$ dpkg -S ./lib/x86_64-linux-gnu/asterisk/modules/res_digium_phone.so
# “/lib” is a symlink to usr/lib” 
# will show you “asterisk21-res-digium-phone: /lib/x86_64-linux-gnu/asterisk/modules/res_digium_phone.so”

$ apt-cache madison asterisk21-res-digium-phone # this will show you the available versions
$ apt-get install asterisk21-res-digium-phone=3.6.10-1.sng12

$ fwconsole restart
# Go back to 5 with the next older version and rinse and repeat, til Asterisk runs again.

$ apt-mark hold asterisk21-res-digium-phone
# to prevent updates (til the new hardware arrives!)

This fixed it for me again, and I am happy running Asterisk/FreePBX and 13y old hardware again (which got a flashy and brandnew 2025 case again!).

These instructions could potentially fix other binaries as well, -but- user discretion is advised, some other packages could well expose major security risks and I definitely would not advise to do that.

HTH

Tom

The correct fix for this is to compile the whole of Asterisk for the machine on which it is running. Using a mismatched module can actually cause this sort of error.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.