[Users] Module for Config files
Hakan YASTI
hakanyasti at gmail.com
Mon Aug 14 17:10:50 CEST 2006
You can use permissions module.
http://www.openser.org/docs/modules/1.1.x/permissions.html
this is an example of with trusted_table.....
loadmodule "/usr/local/lib/openser/modules/permissions.so"
modparam("permissions", "db_url", "postgres or mysql://username:password@localhost/dbname")
#---- Permissions_Module_Parameters -----
modparam("permissions", "db_mode", 0)
modparam("permissions", "trusted_table", "trusted")
modparam("permissions", "source_col", "src_ip")
modparam("permissions", "proto_col", "proto")
modparam("permissions", "from_col", "from_pattern")
route[3] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (allow_trusted()) {
route(4); # NAT Traversal Section
route(5); # PSTN Handler
return;
};
Welcome to psql 7.4.13, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
dbname=> select * from trusted;
src_ip | proto | from_pattern
-----------------+-------+-------------------------------
10.1.1.5 | udp | ^sip:120*@*
Regards,
Hakan.
----- Original Message -----
From: ronn100200 at aim.com
To: users at openser.org
Sent: Monday, August 14, 2006 5:39 PM
Subject: [Users] Module for Config files
Hi All,
I am using the following if statement to allow certain calls from pre authorized IPs.
if ( method == "INVITE" && src_ip != 195.xxx.xxx.xx && src_ip != 195.xxx.xxx.xx && src_ip != 195.xxx.xxx.xx && src_ip != 195.xxx.xxx.xx) {
My issues is the number of IPs that need to be authorized this way is getting large and was wondering if there's a module that can be used to read config date from a config file ?
regards,
Ron
------------------------------------------------------------------------------
Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
------------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060814/0a3f13ef/attachment.htm>
More information about the sr-users
mailing list