<div dir="ltr">Dear Bogdan,<br>I have created the address table as you asked me in the previous email then I added the following to the opensips.cfg file:<br><br>route{<br><br>if (!allow_address()) {<br>sl_send_reply("403", "Forbidden");<br>
xlog("$si");<br>xlog("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");<br>};<br><br>I added only IP address to the address table...When trying to restart OpenSIps I got the below error:<br>
<br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/db_mysql.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/sl.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/tm.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:register_module: register_pv: tm <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:pv_add_extra: extra items list is not initialized <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/rr.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/maxfwd.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/usrloc.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/registrar.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/textops.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/mi_fifo.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/uri_db.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/uri.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/xlog.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:register_module: register_pv: xlog <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/acc.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/nathelper.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/permissions.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/auth.so <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/auth_db.so <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: mi_fifo matches module mi_fifo <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: found <fifo_name> in module mi_fifo [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: rr matches module rr <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: found <enable_full_lr> in module rr [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: rr matches module rr <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: found <append_fromtag> in module rr [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: registrar matches module registrar <br>Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: found <method_filtering> in module registrar [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:56 registrar1 opensips: DBG:core:set_mod_param_regex: uri_db matches module uri_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <use_uri_table> in module uri_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: uri_db matches module uri_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_url> in module uri_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <early_media> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <report_ack> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <report_cancels> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <detect_direction> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <failed_transaction_flag> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <log_flag> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <log_missed_flag> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_flag> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: acc matches module acc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_missed_flag> in module acc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: usrloc matches module usrloc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_mode> in module usrloc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: usrloc matches module usrloc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_mode> in module usrloc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: usrloc matches module usrloc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_url> in module usrloc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: auth_db matches module auth_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <calculate_ha1> in module auth_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: auth_db matches module auth_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <password_column> in module auth_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: auth_db matches module auth_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_url> in module auth_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: auth_db matches module auth_db <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <load_credentials> in module auth_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: usrloc matches module usrloc <br>Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: found <nat_bflag> in module usrloc [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:57 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <rtpproxy_sock> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <natping_interval> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <ping_nated_only> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <sipping_bflag> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <sipping_from> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: registrar matches module registrar <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <received_avp> in module registrar [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: nathelper matches module nathelper <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <received_avp> in module nathelper [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: permissions matches module permissions <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:set_mod_param_regex: found <db_url> in module permissions [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: <allow_address> not found <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: <allow_address> not found <br>Jan 15 14:17:58 registrar1 opensips: CRITICAL:core:yyerror: parse error in config file, line 226, column 20-21: unknown command, missing loadmodule? <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <mf_process_maxfwd_header>(1) in module maxfwd [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <has_totag>(0) in module uri [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <loose_route>(0) in module rr [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:58 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <record_route>(0) in module rr [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <www_authorize>(2) in module auth_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <www_challenge>(2) in module auth [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <check_to>(0) in module uri_db [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <save>(1) in module registrar [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_reply_error>(0) in module sl [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <lookup>(1) in module registrar [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_newtran>(0) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_reply>(2) in module tm [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_on_branch>(1) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_on_reply>(1) in module tm [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <sl_reply_error>(0) in module sl [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(2) in module xlog [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <record_route>(0) in module rr [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/] <br>Jan 15 14:17:59 registrar1 opensips: DBG:core:find_cmd_export_t: found <t_was_cancelled>(0) in module tm [/usr/local/lib/opensips/modules/] <br>
Jan 15 14:17:59 registrar1 opensips: ERROR:core:main: bad config file (1 errors) <br>Jan 15 14:17:59 registrar1 opensips: DBG:xlog:destroy: destroy module... <br>Jan 15 14:17:59 registrar1 opensips: DBG:tm:tm_shutdown: tm_shutdown : start <br>
Jan 15 14:17:59 registrar1 opensips: DBG:tm:tm_shutdown: emptying hash table <br>Jan 15 14:17:59 registrar1 opensips: DBG:tm:tm_shutdown: releasing timers <br>Jan 15 14:17:59 registrar1 opensips: DBG:tm:tm_shutdown: removing semaphores <br>
Jan 15 14:17:59 registrar1 opensips: DBG:tm:tm_shutdown: destroying callback lists <br>Jan 15 14:18:00 registrar1 opensips: DBG:tm:tm_shutdown: tm_shutdown : done <br>Jan 15 14:18:00 registrar1 opensips: DBG:core:shm_mem_destroy: <br>
<br><br>Thanks for the help<br><br>Regards<br><br><br><br><div class="gmail_quote">On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Michel,<br>
<br>
So, the table must look like:<br>
<br>
CREATE TABLE address (<br>
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,<br>
grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,<br>
ip_addr VARCHAR(15) NOT NULL,<br>
mask TINYINT DEFAULT 32 NOT NULL,<br>
port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL<br>
) ENGINE=MyISAM;<br>
<br>
<br>
so, mask is integer after all :). What you should put in db (to test) is:<br>
insert into address (ip_addr) values ("xxx.xxx.xxx.xxx");<br>
<br>
and check the allow_address() then.<br>
<br>
Let me know if there are errors at startup or at runtime.<div class="Ih2E3d"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
michel freiha wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
Dear Bogdan,<br>
<br>
I tried allow_address() and it returns an error when restarting OpenSIPS..Even I tried to change the mask field type from tinit to varchar but if I put a value inside it like 26 and restart OpenSIPS I even get an error<br>
<br>
Regards<br>
<br>
Regards<br>
<br></div><div><div></div><div class="Wj3C7c">
On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Michel,<br>
<br>
Have you tried to use the simple format of the command ?<br>
<br>
Like allow_address() ?<br>
<br>
Also not that after filling in the table, you have either to<br>
restart, either to issue the "address_reload" MI command.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
michel freiha wrote:<br>
<br>
Dear Sir,<br>
I'm trying to authenticate users based on their IP addresses<br>
and not based on username and password...I did the following<br>
in the config file:<br>
<br>
1- I added loadmodule "permissions.so"<br>
2- modparam("permissions", "db_url",<br>
"mysql://opensips:123456@MySQL_Database_IP/Database_name")<br>
3- I added the below function in route function<br>
<br>
if (!allow_address("1", "$si", "$sp")) {<br>
sl_send_reply("403", "Forbidden");<br>
xlog("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK");<br>
};<br>
4- on the database side I have created the address table then<br>
add an entry with the below values:<br>
<br>
grp=1 ip_address=My Softphone IP address mask=24 Port=0<br>
<br>
The problem is that I'm getting Forbidden in case my IP exist<br>
in address table or not...<br>
Does someone has any idea about what could be the issue here?<br>
<br>
Thanks a lot for the help<br>
<br>
Regards<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Users mailing list<br></div></div>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>