SipHeaderFieldValue recordRoute =
respHeaders.get(new SipHeaderFieldName(RFC3261.HDR_RECORD_ROUTE));
ArrayList<String> routeSet = new ArrayList<String>();
if (recordRoute != null) {
if (recordRoute instanceof SipHeaderFieldMultiValue) {
SipHeaderFieldMultiValue multiRecordRoute =
(SipHeaderFieldMultiValue) recordRoute;
for (SipHeaderFieldValue routeValue : multiRecordRoute.getValues()) {
routeSet.add(routeValue.getValue());
}
} else {
routeSet.add(recordRoute.getValue());
}