[OpenSER-Devel] return argument

Juha Heinanen jh at tutpro.com
Mon Feb 25 07:34:01 CET 2008


i remember that someone asked a while ago, if return statement accepts a
pseudo variable argument.

looks like it still doesn't because something like this resulted in
syntax error at return line:

route[1] {
	route(2);
	return($retcode);
}

i "solved" the problem like this:

route[1] {
	route(2);
	switch($retcode) {
	case 1:
		return(1);
	case 2:
		return(2);
	default:
		return(-1);
	}
}

which is not pretty.  if i didn't make a mistake in above and return
statement does not accept a pv argument, i would like to put this
feature on 1.4 wish list.

-- juha



More information about the Devel mailing list