Thanks, but I need to restrict based on registered user, i.e. some users will be able to dial those numbers others wont.
Thanks, Keith
On Wednesday 04 December 2013 15:27:31 Keith wrote:
Thanks, but I need to restrict based on registered user, i.e. some users will be able to dial those numbers others wont.
I'd use a simple route/query for this, the barred attribute in usr_preferences can contain a full number or prefix.
route[CALLBARRING] { if(is_method("INVITE") && $au!=$null) { if(avp_db_query("SELECT value FROM usr_preferences WHERE username='$au' and attribute='barred_prefix' and (value='$rU' or '$rU' like concat(value,'%')) ORDER BY value limit 1")) { sl_send_reply("403","Call barred"); exit; } }
return; }