rem: int get_redirect( struct sip_msg *msg , int maxt, int maxb, char *reason)
add: int get_redirect( struct sip_msg *msg , int maxt, int maxb, str *reason)
context: int get_redirect( struct sip_msg *msg , int maxt, int maxb, char *reason){	struct cell *t;	str backup_uri;	int max;	int cts_added;	int n;	int i;	/* get transaction */	t = rd_tmb.t_gett();	if (t==T_UNDEFINED || t==T_NULL_CELL)	{		LOG(LOG_CRIT,"BUG:uac_redirect:get_redirect: no current "			"transaction found\n");		goto error;	}	DBG("DEBUG:uac_redirect:get_redirect: resume branch=%d\n",		t->first_branch);	cts_added = 0; /* no contact added */	backup_uri = msg->new_uri; /* shmcontact2dset will ater this value */	/* look if there are any 3xx branches starting from resume_branch */	for( i=t->first_branch ; i<t->nr_of_outgoings ; i++) {		DBG("DEBUG:uac_redirect:get_redirect: checking branch=%d "			"(added=%d)\n", i, cts_added);		/* is a redirected branch? */		if (t->uac[i].last_received<300 || t->uac[i].last_received>399)			continue;		DBG("DEBUG:uac_redirect:get_redirect: branch=%d is a redirect "			"(added=%d)\n", i, cts_added);		/* ok - we have a new redirected branch -> how many contacts can		 * we get from it*/		if (maxb==0) {			max = maxt?(maxt-cts_added):(-1);		} else {			max = maxt?((maxt-cts_added>=maxb)?maxb:(maxt-cts_added)):maxb;		}		if (max==0)			continue;		/* get the contact from it */		n = shmcontact2dset( msg, t->uac[i].reply, max, reason);		if ( n<0 ) {			LOG(L_ERR,"ERROR:uac_redirect:get_redirects: get contact from "				"shm_reply branch %d failed\n",i);			/* do not go to error, try next branches */		} else {			/* count the added contacts */			cts_added += n;		}	}	/* restore original new_uri */	msg->new_uri = backup_uri;	/* return false if no contact was appended */	return (cts_added>0)?1:-1;error:	return -1;}