N95 on internal local sip server. Problem Connecting

Here’s my problem.

I have built a sip server at home in order to teach myself the basics of how they work etc. I’ve set up a small network with 1 PC running asterisk (Firewall disabled for now) as the sip server, 1 d-link wireless access point (totaly open for now), a hardware sip phone and one laptop running 3 softphones.

I can call between all of them and leave voicemail etc as normal. All phones register to the asterisk server as soon as they are connected to the network as i would expect.

Now here’s my next step. I have a Nokia N95 with sip settings that i would like to register to my sip server as if it were another extension. However, although i have set up the access point for my little network, and set up the sip settings the same as i did for all the other phones, when i try to make a call the N95 comes back with an error message saying “Unable to connect to the connection network”. If i monitor the wireless access point when this is happening, the N95 can be seen connecting to the Wireless access point and then disappearing again after a short time (a few seconds), there is no activity on the asterisk console during this time, as if the N95 is not even trying to register to the sip server.

If I “enable sip set debug” in the asterisk console, this is the dialogue i get:

<— SIP read from 192.168.0.54:5060 —>
REGISTER sip:192.168.0.31 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.54:5060;branch=z9hG4bKn386uoorn1hc692qt6b0pt1;rport
From: sip:304@192.168.0.31;tag=cfr6uopmt5hc7edlt6b7
To: sip:304@192.168.0.31
Call-ID: JHZLoW_eoIfj6eCmJCR77sUzsSG6vp
CSeq: 803 REGISTER
Contact: sip:304@192.168.0.54
Max-Forwards: 70
User-Agent: Nokia RM-159 V 12.0.013
expires=3600
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.0.54 : 5060 (NAT)

<— Transmitting (no NAT) to 192.168.0.54:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.54:5060;branch=z9hG4bKn386uoorn1hc692qt6b0pt1;received=192.168.0.54;rport=5060
From: sip:304@192.168.0.31;tag=cfr6uopmt5hc7edlt6b7
To: sip:304@192.168.0.31
Call-ID: JHZLoW_eoIfj6eCmJCR77sUzsSG6vp
CSeq: 803 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:304@192.168.0.31
Content-Length: 0

<— Transmitting (no NAT) to 192.168.0.54:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.54:5060;branch=z9hG4bKn386uoorn1hc692qt6b0pt1;received=192.168.0.54;rport=5060
From: sip:304@192.168.0.31;tag=cfr6uopmt5hc7edlt6b7
To: sip:304@192.168.0.31;tag=as37d8a719
Call-ID: JHZLoW_eoIfj6eCmJCR77sUzsSG6vp
CSeq: 803 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="457f01da"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘JHZLoW_eoIfj6eCmJCR77sUzsSG6vp’ in 32000 ms (Method: REGISTER)

Scheduling destruction of SIP dialog ‘zY_6Cr3goIeL-6VZLHzw5b-QH1N0F3’ in 32000 ms (Method: REGISTER)
Really destroying SIP dialog ‘zY_6Cr3goIeL-6VZLHzw5b-QH1N0F3’ Method: REGISTER