I use the permission before sending the calls to PSTN, however, I can't make it
to work; If I bypass route 3 on this config and go straight to route 4 I can
make call to PSTN through a few asterisk gateways.
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
route[3] {
## INVITE request handler
if (is_from_local()){
# From an internal domain -> check the credentials and the FROM
if(!allow_trusted()){
if (!proxy_authorize("192.168.1.102","subscriber")) {
proxy_challenge("192.168.1.102","1");
exit;
} else if (!check_from()) {
sl_send_reply("403", "Forbidden, use From=ID");
exit;
};
} else {
log("Request bypassed the auth.using allow_trusted");
};
consume_credentials();
#Verify aliases, if found replace R-URI.
lookup("aliases");
if (is_uri_host_local()) {
# -- Inbound to Inbound
route(10);
} else {
# -- Inbound to outbound
route(11);
};
} else {
#From an external domain ->do not check credentials
#Verify aliases, if found replace R-URI.
lookup("aliases");
if (is_uri_host_local()) {
#-- Outbound to inbound
route(12);
} else {
# -- Outbound to outbound
route(13);
};
};
}
route[4] {
# routing to the public network
ds_select_dst("1", "0");
record_route();
t_relay();
--- On Mon, 1/26/09, Alex Balashov <[email protected]> wrote:
From: Alex Balashov <[email protected]>
Subject: Re: [OpenSIPS-Users] Warning message at startup
To: [email protected]
Cc: [email protected], "Iñaki Baz Castillo" <[email protected]>
Date: Monday, January 26, 2009, 12:09 AM
Nothing to worry about; if you are not using the permissions module but loading
it anyway, or are using it but keeping your list of authorised peers in the
database, you do not need to worry about this.
It only matters if you actually wish to list your authorised peers (the things
you use the permissions module to authorise) in a text file.
Gonzalo Gonzalez wrote:
> Thanks.....
>
> It is something I am missing or should I just don't worry about?
>
> --- On *Sun, 1/25/09, Iñaki Baz Castillo /<[email protected]>/* wrote:
>
> From: Iñaki Baz Castillo <[email protected]>
> Subject: Re: [OpenSIPS-Users] Warning message at startup
> To: [email protected]
> Date: Sunday, January 25, 2009, 10:46 PM
>
> El Domingo, 25 de Enero de 2009, Gonzalo Gonzalez escribió:
> > Jan 25 17:40:44 sipproxy /usr/local/sbin/opensips[6640]:
> > WARNING:permissions:parse_config_file: file not found:
> > /usr/local/etc/opensips/permissions.allow Jan 25 17:40:44
sipproxy
> > /usr/local/sbin/opensips[6640]: WARNING:permissions:mod_init:
default
> allow
> > file
> (/usr/local/etc/opensips/permissions.allow) not found => empty
> rule
> > set Jan 25 17:40:44 sipproxy /usr/local/sbin/opensips[6640]:
> > WARNING:permissions:parse_config_file: file not found:
> > /usr/local/etc/opensips/permissions.deny Jan 25 17:40:44 sipproxy
> > /usr/local/sbin/opensips[6640]: WARNING:permissions:mod_init:
default deny
> > file (/usr/local/etc/opensips/permissions.deny) not found =>
empty rule
> set
>
> Try yourself: what do you think "file not found" can mean?
;)
>
> -- Iñaki Baz Castillo
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-- Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users