[OpenSIPS-Users] check_source_address not working with upgrade

Ovidiu Sas osas at voipembedded.com
Thu Feb 2 17:56:34 CET 2012


The subnet is empty because you don't have any subnets (the mask is
set to 32 and therefore you have full IP matching).  Is the message
source IP in the address_dump?

Regards,
Ovidiu Sas

-- 
VoIP Embedded, Inc.
http://www.voipembedded.com

On Thu, Feb 2, 2012 at 11:52 AM, Duane Larson <duane.larson at gmail.com> wrote:
> This is what I see
>
> Proxy01:/var/log# opensipsctl fifo address_dump
>   15 <173.XXX.XXX.XXX,3, 5060, 0, NULL, NULL>
>   20 <216.82.224.202,2, 5060, 0, NULL, NULL>
>   34 <64.2.142.15,4, 5060, 0, NULL, NULL>
>   50 <216.82.225.202,2, 5060, 0, NULL, NULL>
>   63 <173.XXX.XXX.XXX,10, 5060, 0, NULL, NULL>
>   85 <173.XXX.XXX.XXX,10, 5060, 0, NULL, NULL>
> Proxy01:/var/log#
> Proxy01:/var/log#
> Proxy01:/var/log#
> Proxy01:/var/log#
> Proxy01:/var/log# opensipsctl fifo subnet_dump
>
>
> So the subnet_dump is empty.
>
>
>
>
> On Thu, Feb 2, 2012 at 10:48 AM, Ovidiu Sas <osas at voipembedded.com> wrote:
>>
>> Check the in memory cache:
>> http://www.opensips.org/html/docs/modules/devel/permissions.html#id293903
>> See "address_dump" and "subnet_dump".
>>
>> At start up, opensips will cache everything in memory.
>>
>> Regards,
>> Ovidiu Sas
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>>
>> On Thu, Feb 2, 2012 at 11:38 AM,  <duane.larson at gmail.com> wrote:
>> > I just upgraded my b2bua opensips server to the latest trunk version and
>> > now
>> > my if statements using "check_source_address" from the permissions
>> > module
>> > isn't working. I have the following set up
>> >
>> > loadmodule "permissions.so"
>> >
>> > modparam("permissions","db_url","mysql://adfasdf:dfasdfasd@108.XXX.XXX.XXX/opensips")
>> >
>> >
>> > if (check_source_address("2") || check_source_address("3") ||
>> > check_source_address("4")) {
>> >
>> > The INVITE comes from my SIP Proxy and worked before the upgrade without
>> > issue
>> >
>> >
>> >
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:check_src_addr_3: Looking for : <2, 173.XXX.XXX.XXX,
>> > 5060,
>> > 1> in tables
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:hash_match: specified group does not exist in hash table
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:match_subnet_table: subnet table is empty
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:check_src_addr_3: Looking for : <3, 173.XXX.XXX.XXX,
>> > 5060,
>> > 1> in tables
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:hash_match: specified group does not exist in hash table
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:match_subnet_table: subnet table is empty
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:check_src_addr_3: Looking for : <4, 173.XXX.XXX.XXX,
>> > 5060,
>> > 1> in tables
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:hash_match: specified group does not exist in hash table
>> > Feb 1 22:41:01 proxy01 /usr/local/sbin/opensips[30163]:
>> > DBG:permissions:match_subnet_table: subnet table is empty
>> >
>> >
>> >
>> >
>> > This is what I have in the database
>> > Proxy01:/var/log# opensipsctl db show address
>> >
>> > +-----+-----+----------------+------+------+-------+---------+--------------+
>> > | id | grp | ip | mask | port | proto | pattern | context_info |
>> >
>> > +-----+-----+----------------+------+------+-------+---------+--------------+
>> > | 3 | 2 | 216.XXX.XXX.202 | 32 | 5060 | any | NULL | NULL |
>> > | 258 | 4 | 64.XXX.XXX.15 | 32 | 5060 | any | NULL | NULL |
>> > | 1 | 10 | 173.XXX.XXX.XXX | 32 | 5060 | any | NULL | NULL |
>> > | 2 | 10 | 173.XXX.XXX.XXX | 32 | 5060 | any | NULL | NULL |
>> > | 257 | 3 | 173.XXX.XXX.XXX | 32 | 5060 | any | NULL | NULL |
>> > | 4 | 2 | 216.XXX.XXX.202 | 32 | 5060 | any | NULL | NULL |
>> >
>> > +-----+-----+----------------+------+------+-------+---------+--------------+
>> >
>> >
>> >
>> > I am not sure if OpenSIPS is really querying the mysql database because
>> > I
>> > don't really see any connections from the server when a call is made.
>> > How
>> > could this be possible? When I start OpenSIPS I see that it talks to the
>> > database.
>> > _______________________________________________
>> > Users mailing list
>> > Users at lists.opensips.org
>> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> >
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> --
> *--*--*--*--*--*
> Duane
> *--*--*--*--*--*
> --
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list