Strange security behavior

Hi!

Here’s a small description of my setup.

Asterisk 1.6.0.20
I have a PAP2T, a SIP client on my iphone and x-lite on my Mac.

I configured my sip.conf file like this:

[code]local_sip
callevents=yes
context=internal
contactdeny=0.0.0.0/0.0.0.0
contactpermit=192.168.2.0/255.255.255.0

linksys_line2
type=friend
secret=mypassword
host=dynamic

iphone
type=friend
secret=mypassword
host=dynamic

x_lite
type=friend
secret=mypassword
host=dynamic[/code]

So, every entry inherit the contactdeny/contactallow setting.

The little trick, is that my network is not under 192.168.2.0, but under 192.168.1.0. I’m doing tests, so the expected behavior is that all my devices are not allowed to register.

So… when my devices tries to register, I see the following warning in asterisk console:
[Jan 23 22:03:20] WARNING[2964]: chan_sip.c:10800 parse_register_contact: Host ‘192.168.1.103’ disallowed by contact ACL (violating IP 192.168.1.103)

Cool. I try my iPhone. I can’t do calls. I try my PAP2T. I can’t do calls. I try x-lite. I CAN make calls. When X-Lite starts, I see the same warning message as the others. I type 0 then enter in x-lite and I can hear the message The person you are calling is unavailable (because I don’t have a 0 extension) and I see this in the console;

== Using SIP RTP CoS mark 5
[Jan 23 22:05:38] NOTICE[2964]: chan_sip.c:18002 handle_request_invite: Call from ‘x_lite’ to extension ‘0’ rejected because extension not found.

What do I miss? Why Asterisk says that the host is disallowed BUT this host can do calls anyway?

Thanks

VB