Some code cleanup to UA helper functions
Some code cleanup to UA helper functions

josephfrazier/SIP.js,joseph-onsip/SIP.js,Escaux/SIP.js,Voiceworks/SIP.js,ronlobo/SIP.js,onsip/SIP.js,markandrus/SIP.js,onsip/SIP.js