Message: Disconnected from Asterisk Server

I’m using the X-Lite 3.0 softphone to connect to my Asterisk-1.4.2 box. For some reason when my phone registers I get kicked out of the Asterisk CLI and receive a message that says “Disconnected from Asterisk server”. The phone registers just fine but kicks me out.

It will not kick me out if I remove ‘qualify=yes’ from my sip.conf file.
sip.conf and extensions.conf file are below.

************sip.conf file **************

[code][general]

[1000]
type=friend
context=phones
host=dynamic
nat=yes
qualify=yes

[2000]
type=friend
context=phones
host=dynamic[/code]

***************extensions.conf file ********************

[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming_calls]

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()

[phones]
include => internal

I’m working my way through the ‘Asterisk: The Future of Telephony’ book and just noticed (when trying to verify whether or not calls were coming in via the ‘incoming’ context) I get kicked out of CLI when placing calls to.

I restarted asterisk by typing ‘service asterisk stop’ then ‘service asterisk start’. Now when my phone registers it kicks me out and outputs the following:
/usr/sbin/safe_asterisk: line 111: 6532 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.

I must have had a bad hidden bit in my sip.conf file or my extensions.conf file b/c reinstalling to Asterisk-1.4.17 didn’t help.
So I copied the two sample files back in to place and started over.

Seems to be working now.

Hope this helps anyone searching for this error.