Sip registration, Unable to get own IP address, SIP disabled

Well I’ve just installed Asterisk, and using x101p clone card, i can even receive calls, but i am having trouble using sip, and softphones.

The Xtenlite Softphone that i installed can not register with asterisk server.

on asterisk cli when i run

sip reload it returns following errors.

Sep 1 21:24:08 WARNING[14373] acl.c: Cannot connect
Sep 1 21:24:08 WARNING[14373] chan_sip.c: Unable to get own IP address, SIP disabled

the contents of sip.conf is as under :
the sip.conf :

[general]
context=default
srvlookup=yes

[qasim]
type=friend
secret=welcome
qualify=yes
nat=no
host=dynamic ; (Asterisk is installed on system with ip : 192.1.168.10)
canreinvite=no
context = internal

EOF

now when i try to register from xtenlite softphone on machine (192.168.1.12) it says registration time out.
and while it tries to register, the asterisk CLI dont display any alerts or anything. it seems that nothing is happening.

both the systems can ping each other.

do you have host=0.0.0.0 in sip.conf?

thanks for posting reply…

well i’ve tried with both using all lines
host=0.0.0.0 ; or host=dynamic or host= 192.168.1.10
localnet=192.168.1.10/255.255.255.0
realm=192.168.1.10

but none of the above worked, i’ve iptables installed, but i ran additional commands to enable sip packets (commands described in sip firewall at www.voip-info.org) go thru, but nothing seems to be working.

each time i run

> sip.reload
Sep 1 21:24:08 WARNING[14373] acl.c: Cannot connect
Sep 1 21:24:08 WARNING[14373] chan_sip.c: Unable to get own IP address, SIP disabled

i got the same error…

my sip.conf is :

sip.conf :
[general]
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
externip = 192.168.1.10 ;(Asterisk server’s ip)
localnet=192.168.1.0/255.255.255.0 ;(Local Lan address) i’ve also tried interchanging above two fields.
realm=192.168.1.10

[101] ;grandstream phone
type=friend
secret=123456
host=dynamic
dtmfmode=info
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <101>
mailbox=101

[103] ;xlite on PC
type=friend
secret=123456
host=dynamic
dtmfmode=rfc2833
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <103>
mailbox=101

HELP IS NEEDED

hmmm bindaddr=0.0.0.0 is what i had meant and you have it…

externip= should NOT be a 192.168, it shoudl be the external address of your network. You can find this by going to www.ipchicken.com .
leave realm blank unless you need it…

Are you sure your * box has network connectivity? what do you get for ifconfig (at unix prompt not * CLI)?

Well because im only connected to Lan with the ip 192.168.1.10 and ping is working just fine , i guess network connectivity is good.

while i dont have internet support on asterisk server, im only on Lan without any internet support. and the only computer which im attached to pc2(192.168.1.12) can be pinged and vice versa. On pc2 ive installed windows xp with xlite sip phone.

i just cant understand why its giving me this error,

Sep 1 21:24:08 WARNING[14373] acl.c: Cannot connect
Sep 1 21:24:08 WARNING[14373] chan_sip.c: Unable to get own IP address, SIP disabled

Does Apache Server has any effect on it?

can u tell me how to turn off iptables on debian?
whats realm?

realm is a SIP thing, all sip addresses are supposed to be user@realm, with realm being globally unique. In reality this doesn’t happen, and realm defaults to ‘asterisk’ which is fine 99% of the time.

try putting your asterisk box’s 192.168 IP into bindaddr…

thanks …

the bindaddr trick worked at last…!!!
hope it wont cause any future problems…!!!