[Serusers] avpops question

Andy Pyles andrew.pyles at fonomni.com
Fri Nov 11 23:40:30 CET 2005


hi I have an avpops question

I have an avp object of boolean type called forwardcalls. My question is how do I check if a specific user has this enabled or not? I have the following logic:

if (avp_db_load("$ruri/username", "s:callfwd")) {
	xlog("L_ERR", "call forward [%Tf] method <%rm> r-uri <%ru>\n");
	if ( avp_check("forwarded_calls", "eq/0/gi" )) {
		log(1, "forward calls is disabled!\n\n");
		break;
	} else {
		setflag(22);
		avp_pushto("$ruri", "s:callfwd");
		route(6);
		break;
	}
};



I think my avp_check is wrong. Any ideas?




More information about the sr-users mailing list