Invalid cause given to Hangup

I have Asterisk 1.4.0 and I see the following message after external call termination:

NOTICE[26551]: pbx.c:5426 pbx_builtin_hangup: Invalid cause given to Hangup(): " "

What does it mean and how can I fix it?

It sounds as if your dial plan does not have a number that is being used so this is invalid. You can setup an ā€œiā€ extension to catch invalid calls. For example, if you have extensions 101 and 102 in your dial plan and someone calls 103 this is invalid because it does not exist. Your ā€œiā€ extension have play a message saying that it is invalid or something.