rem: str aor;
add: str aor, uri;
context: int lookup(struct sip_msg* _m, char* _t, char* _s){	urecord_t* r;	str aor;	ucontact_t* ptr;	int res;		if (_m->new_uri.s) aor = _m->new_uri;	else aor = _m->first_line.u.request.uri;		if (extract_aor(_m, &aor) < 0) {		LOG(L_ERR, "lookup(): Error while extracting address of record\n");		return -1;	}		get_act_time();	ul_lock_udomain((udomain_t*)_t);	res = ul_get_urecord((udomain_t*)_t, &aor, &r);	if (res < 0) {		LOG(L_ERR, "lookup(): Error while querying usrloc\n");		ul_unlock_udomain((udomain_t*)_t);		return -2;	}		if (res > 0) {		DBG("lookup(): \'%.*s\' Not found in usrloc\n", aor.len, aor.s);		ul_unlock_udomain((udomain_t*)_t);		return -3;	}	ptr = r->contacts;	while ((ptr) && (ptr->expires <= act_time)) ptr = ptr->next;		if (ptr) {		if (rwrite(_m, &ptr->c) < 0) {			LOG(L_ERR, "lookup(): Unable to rewrite Request-URI\n");			ul_unlock_udomain((udomain_t*)_t);			return -4;		}		ptr = ptr->next;	} else {		     /* All contacts expired */		ul_unlock_udomain((udomain_t*)_t);		return -5;	}		     /* Append branches if enabled */	if (!append_branches) goto skip;	while(ptr) {		if (ptr->expires > act_time) {			if (append_branch(_m, ptr->c.s, ptr->c.len) == -1) {				LOG(L_ERR, "lookup(): Error while appending a branch\n");				ul_unlock_udomain((udomain_t*)_t);				return -6;			}		} 		ptr = ptr->next;	}	 skip:	ul_unlock_udomain((udomain_t*)_t);	return 1;}