[OpenSER-Users] uri transformation errors in 1.2

Andreas Granig agranig at sipwise.com
Tue Aug 7 17:04:54 CEST 2007


Hi,

At the top of my config I've put the following snippet for some SEMS 
routings:

	if(uri =~ ";my_domain=.+")
	{
		$var(mydom) = $(ru{uri.param,my_domain});
		xlog("L_INFO", "domain='$var(mydom)'\n");
		$ru = "sip:" + $rU + "@" + $var(mydom);
	}

It does nothing more than changing an r-uri 
"sip:user at domain;my_domain=otherdomain" to "sip:user at otherdomain". This 
works fine for some requests, but then it starts to complain:

xl_get_ruri: ERROR while parsing the R-URI
domain=''
ERROR: parse_uri: bad host in uri (error at char
ERROR: parse_sip_msg_uri: bad uri <sip:user@>

So obviously the transformation $(ru{uri.param,my_domain}) doesn't 
return the parameter anymore, but it's present in the r-uri. After a 
restart it works again for some requests, then again stops working.

Any hints?
Andreas




More information about the Users mailing list