added a function to return proper message class
adding function to decide message class
Merge branch 'master' of https://github.com/mjvallin/telecom