question: static String extractNumberFromUriWithoutFormatting ( String uri ) { if ( uri == null ) { return null ; } int index0 = uri . indexOf ( URI_START_DELIMITER ) ; if ( index0 != - 1 ) { uri = uri . substring ( index0 + URI_START_DELIMITER . length ( ) , uri . indexOf ( URI_END_DELIMITER , index0 ) ) ; } int index1 = uri . indexOf ( TEL_URI_HEADER ) ; if ( index1 != - 1 ) { uri = uri . substring ( index1 + TEL_URI_HEADER . length ( ) ) ; } index1 = uri . indexOf ( SIP_URI_HEADER ) ; if ( index1 != - 1 ) { int index2 = uri . indexOf ( "@" , index1 ) ; uri = uri . substring ( index1 + SIP_URI_HEADER . length ( ) , index2 ) ; } int index2 = uri . indexOf ( ";" ) ; if ( index2 != - 1 ) { uri = uri . substring ( 0 , index2 ) ; } index2 = uri . indexOf ( "?" ) ; if ( index2 != - 1 ) { uri = uri . substring ( 0 , index2 ) ; } return uri ; }
target:  Extract user part phone number from a SIP-URI or Tel-URI or SIP address