If you upgraded the kernel, first reboot. This is to ensure that the kernel running matches the kernel source installed.

To install Asterisk from source, along with supporting packages:

  • enswitch install asterisk