I am using Asterisk 1.6
sip.conf
[general]
allowguest=yes
bindaddr=0.0.0.0
bindport=5060
externhost=sip.myhost.org
localnet=192.168.11.0/24
directmedia=no
alwaysauthreject=yes
[hosta]
type=peer
context=hosta
insecure=invite,port
host=hosta
nat=route
[hostb]
type=friend
context=hostb
host=hostb
port=5061
secret=mysecret
username=asterisk
fromuser=asterisk
when hostb establish a sip call to hosta@sip.myhost.org (no authentication call) I would expect this call will connect into context “hosta” in extensions.conf, but the result is that Asterisk reported caller attempt to access extension “hosta” in context “hostb” but of course there is no such extension defined in context “hostb”
Is that mean when calling host not match with “host=”, Asterisk will automatically connect caller to the matching context of “host=”? What if no “host=” match the calling host, e.g. the calling host is from hostc ?