Can not login to sip on a fresh install

hello,
I am trying to try freepbx for a while on a ubuntu 8.04.
Before i had a working asterisk installation which i tested with some
softphones without any problem.

And i decided to try freepbx too.
I made the necessary installation stes without any error accourding to the
guide at http://colt45.chemlab.org/?p=55
Everything worked well.
Now i have a working freepbx but!!
I am trying to add a sip or iax user to use with this installation.
What i did is click on extensions.
and select add generic sip device.
Typed a user extension (for ex 6000)
Typed a display name (test)
left blank the rest till sip config.
gave a password for sip secret (1234)
and default value for dtmf was rfc2833
And submitted.
After i submitted this value, when i enter to this extension properties, i
can see
secret 1234
canreinvite no
context from-internal
host dynamic
type friend
nat yes
port 5060
qualify yes
dial SIP/6000
mailbox 6000@device

the rest is empty.

Everything seems as supposed to be.But,
when i try to logon to asterisk with my sipphone. It gives a protocol error.
Not only talking yet i couldnt manage to register the sip phone to this
system.
Any help will be appreciated.

heres the debug for my connection.

<— SIP read from 139.179.14.201:46469 —>
REGISTER sip:139.179.14.250 SIP/2.0
Via: SIP/2.0/UDP 139.179.14.201:46469;rport;branch=z9hG4bKU7pjDycDcypvB
Max-Forwards: 70
From: sip:[email protected];tag=UQZ30D7vcK7DD
To: sip:[email protected]
Call-ID: cb0ea428-3579-122c-e5be-001a4d675fd3
CSeq: 107685077 REGISTER
Contact: sip:[email protected]:46469
User-Agent: Telepathy-SofiaSIP/0.5.8 sofia-sip/1.12.9
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, UPDATE
Supported: timer, 100rel, path
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 139.179.14.201 : 46469 (NAT)
gobris*CLI>
<— Transmitting (NAT) to 139.179.14.201:46469 —>
SIP/2.0 404 Not found
Via: SIP/2.0/UDP
139.179.14.201:46469;branch=z9hG4bKU7pjDycDcypvB;received=139.179.14.201;rport=46469
From: sip:[email protected];tag=UQZ30D7vcK7DD
To: sip:[email protected];tag=as14b83373
Call-ID: cb0ea428-3579-122c-e5be-001a4d675fd3
CSeq: 107685077 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0

When i checked via asterisk cli,
database show command shows this entries…

/AMPUSER/200/cidname : Oguzhan Kayhan
/AMPUSER/200/cidnum : 200
/AMPUSER/200/device : 200
/AMPUSER/200/noanswer :
/AMPUSER/200/outboundcid :
/AMPUSER/200/password :
/AMPUSER/200/recording : out=Adhoc|in=Adhoc
/AMPUSER/200/ringtimer : 0
/AMPUSER/200/voicemail : novm
/CW/200 : ENABLED
/DEVICE/200/default_user : 200
/DEVICE/200/dial : SIP/200
/DEVICE/200/type : fixed
/DEVICE/200/user : 200

But sip show users and iax2 show users commands returns empty…
So It seems freepbx doesnt add the users to asterisk or asterisk doesnt check the freepbx users.

With a clean/empty install you’ll not have any sip or IAX devices defined, due to that there will not be any calls in the dial plan when asterisk loads up initially to say load the chan_sip and chan_iax modules. Once you create a extension using one of those protocols there is then code. But asterisk doesn’t always load the module while in the middle of operating or durring a dial plan reload, so a amportal restart might be needed to get it to stop and restart asterisk and reload the config and modules correctly the very first time.