rem: static int prefix2domain(struct sip_msg* msg, char* str1, char* str2)
add: static int prefix2domain(struct sip_msg* msg, int mode)
context: static int prefix2domain(struct sip_msg* msg, char* str1, char* str2){	str p;	str *d;	time_t crt_time;	int plen;		if(msg==NULL)	{		LOG(L_ERR,"PDT:prefix2domain: weird error\n");		return -1;	}		/* parse the uri, if not yet */	if(msg->parsed_uri_ok==0)		if(parse_sip_msg_uri(msg)<0)		{			LOG(L_ERR,"PDT:prefix2domain: ERROR while parsing the R-URI\n");			return -1;		}	/* if the user part begin with the prefix for PSTN users, extract the code*/	if (msg->parsed_uri.user.len<=0)	{		DBG("PDT:prefix2domain: user part of the message is empty\n");		return 1;	}		if(prefix.len>0 && prefix.len < msg->parsed_uri.user.len			&& strncasecmp(prefix.s, msg->parsed_uri.user.s, prefix.len)!=0)	{		DBG("PDT:prefix2domain: PSTN prefix did not matched\n");		return 1;				}	p.s   = msg->parsed_uri.user.s + prefix.len;	p.len = msg->parsed_uri.user.len - prefix.len;	/* check if need for sync */	crt_time = time(NULL);	if(last_sync + sync_time < crt_time)	{		last_sync = crt_time;		if(pdt_sync_cache())		{			LOG(L_ERR, "PDT:prefix2domain: cannot update the cache\n");			return -1;		}	}	/* find the domain that corresponds to this prefix */	plen = 0;	if((d=pdt_get_domain(_ptree, &p, &plen))==NULL)	{		LOG(L_INFO, "PDT:prefix2domain: no prefix found in [%.*s]\n",				p.len, p.s);		return -1;	}		/* update the new uri */	if(update_new_uri(msg, plen, d)<0)	{		LOG(L_ERR, "PDT:prefix2domain: new_uri cannot be updated\n");		return -1;	}	return 1;}