chan_sip parse code refactoring plus two new unit tests