SIP not registered?

Hi,
I’m trying to call Asterisk server from an SJphone softphone and have followed steps outlined in a tutorial from asteriskguru.com (http://www.asteriskguru.com/tutorials/sjphone_softphone.html).
However, upon softphone’s startup, after a brief attempt to register, it shows a message on the display:
-SIP not registered. Host address [IP address of the machine where softphone is installed] NAT/Firewall blocked
I have turned off windows firewall (softphone’s host is a WinXP Home machine) and the third-party firewall that is also installed is off. Asterisk is up and running on my Linux box with no error messages.
When I dial Asterisk server, I get the message that the softphone is trying to register but that goes on and on, and call is never made…
Details about the network:
-Two machines in simple file sharing network directly connected via crossover. IP addresses statically set. One of the 2 machines acts as an Asterisk server (under CentOS 4.2) the other is just a Windows XP Home box. Both machines can ping themselves and each other succesfully.
The “plan” is to dial Asterisk from the softphone on Win machine and from there use options in extensions.conf.
The conf files:
-sip.conf

[mysjphone]
type=friend
context=tryoutvoip
host=[IP address of the Win machine where softphone is installed]
dtmfmode=inband
username=mysjphone
secret=blabla

-extensions.conf

[tryoutvoip]
exten => s,1,Answer()
exten => s,n,Playback(hello-world)
exten => s,n,Dial(Zap/1/somephonenumber)

-softphone’s settings (SJsoftphone)

name of profile: asterisk
profile type: “Calls through SIP proxy”
“Registered with proxy” box checked
proxy domain: asterisk server’s IP address

How to fix this and what am I doing wrong?

Asterisk CLI output:

-NOTICE[797]: chan_sip.c:11043 handle_request_register: Registration from ‘sip:mysjphone@asterisk_host_ip_address’ failed for ‘asterisk_host_ip_address’ -Username/auth name mismatch

Exaclty what the error says. Asterisk is not recieving the proper user id and pass. It is receiving something other than what it thinks is the proper user id and pass. Also try changing name of profile from asterisk to sjphone.

hi,
I have installed Asterisk server and Xlite client on the same machine, but i have this error message:

Aug 28 11:23:14 NOTICE[4522]: chan_sip.c:9169 handle_request_register: Registration from ‘5678 sip:5678@10.1.3.39’ failed for ‘10.1.3.39’

SIP.conf:

[general]
port=5060 ; Port to bind to
bindaddr=0.0.0.0 ; Address to bind SIP channel to
context=ser

autocreatepeer=yes
register =>5678:1234@10.1.3.39:5060

[5678]
type=friend
username=5678
secret=1234
host=10.1.3.39
;host=dynamic
canreinvite=no

Extesions.conf:

[ser]
exten => 5678,1,Dial(SIP/5678,20)
exten => 5678,2,Voicemail2(u5678)
exten => 5678,3,MusicOnHold()
exten => 5678,102,Voicemail2(b5678)
exten => 5678,103,Hangup

pleaise, help me to solve this problem

[quote=“nabil”]hi,
I have installed Asterisk server and Xlite client on the same machine, but i have this error message:

Aug 28 11:23:14 NOTICE[4522]: chan_sip.c:9169 handle_request_register: Registration from ‘5678 sip:5678@10.1.3.39’ failed for ‘10.1.3.39’

SIP.conf:

[general]
port=5060 ; Port to bind to
bindaddr=0.0.0.0 ; Address to bind SIP channel to
context=ser

autocreatepeer=yes

[/quote]
Remove the following line. This is only if you are trying to register your server with some one else.

Above you need to add context=ser

[quote=“nabil”]
Extesions.conf:

[ser]
exten => 5678,1,Dial(SIP/5678,20)
exten => 5678,2,Voicemail2(u5678)
exten => 5678,3,MusicOnHold()
exten => 5678,102,Voicemail2(b5678)
exten => 5678,103,Hangup

pleaise, help me to solve this problem[/quote]

OK, username/secret pair in sip.conf and username/password in softphone settings correspond, same on each side. How/where are the user/passwords set so that when Asterisk checks, it registers softphone correctly?

:smiley: On the other hand… when the current softphone is changed for very common XLite and host field in sip.conf is set to dynamic, things seem to work… although IP addresses are set statically?!?
Anyway… as SIP client is getting registered, I am able to get the voip-to-landline context in extensions.conf by dialing an IP address… and continue to be amazed by how this Star does so much so well… any medals for Mr. Spencer yet? :wink: :smiley:

thank you for your help,

i have done what u have suggested to me but the problem persist;
Aug 29 11:11:50 NOTICE[4585]: chan_sip.c:9169 handle_request_register: Registration from ‘5678 sip:5678@192.168.1.3’ failed for ‘192.168.1.3’

sip.conf:
[general]
port=5060 ; Port to bind to
bindaddr=0.0.0.0 ; Address to bind SIP channel to
context=ser

[5678]
type=friend
username=5678
secret=1234
host=dynamic
canreinvite=no
context=ser

extensions.conf:

[ser]
exten => 5678,1,Dial(SIP/5678,20)
exten => 5678,2,Voicemail2(u5678)
exten => 5678,3,MusicOnHold()
exten => 5678,102,Voicemail2(b5678)
exten => 5678,103,Hangup

the Xlite client configuration is:
SIp proxy:[default]
[default]
Enabled:yes
display name :5678
username:5678
Authorisation user: 5678
password: 1234
domain/realm:192.168.1.3
sip proxy: 192.168.1.3
out bound proxy:192.168.1.3

best regards

You might also make sure that this is not a nat issue by entering the following line in your sip.conf under your extension number: “nat=yes”. This solves some quirky things that Asterisk likes to do to people.

i have tested this option(nat=yes) but it doesent change any thing.

i think it isnt a nat problem because i have asterisk server and the Xlite client in the same machine
best regards

Following are the contents from sip.conf

[general]
context=default 
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=10.129.112.168 
srvlookup=yes  
realm=perfnet

[yogesh]
type=friend
username=yogesh
secret=yogesh
host=dynamic
context=student
allow=all

[test]
type=friend
username=test
secret=test
host=dynamic
context=student
allow=all

[anand]
type=friend
username=anand
secret=ananad
host=dynamic
context=student
allow=all

Following are the contents of extension.conf

[student]
extern => 1000,1,Dial(SIP/yogesh)
extern => 1001,1,Dial(SIP/test)
extern => 1002,1,Dial(SIP/anand) 

Problem I want to register two SIP client

  1. Sipura 3000 VoIP adapter (username yogesh from 10.129.112.99)
  2. Ekiga from Dapper (username anand from 10.12.12.9)

When i start the asterisk server Sipura gets authenticated without any problem. But Ekiga client is not registering it self.

Following are the output from both Asterisk and ekiga

Asterisk output

Sep 5 00:35:13 NOTICE[22453]: chan_sip.c:11066 handle_request_register: Registration from '<sip:anand@10.129.112.168>' failed for '10.12.12.9' - Wrong password

Ekiga output

2006/09/05 00:37:42.076   5:27.494       SIP Transport:b3a22ad0 SIP     Transaction 8 REGISTER proceeding.
2006/09/05 00:37:42.077   5:27.495       SIP Transport:b3a22ad0 SIP     Waiting for PDU on udp$10.129.112.168:5060<if=udp$10.12.12.9:5061>
2006/09/05 00:37:42.083   5:27.501       SIP Transport:b3a22ad0 SIP     PDU Received on udp$10.129.112.168:5060<if=udp$10.12.12.9:5061>
SIP/2.0 403 Forbidden (Bad auth)
CSeq: 8 REGISTER
Via: SIP/2.0/UDP 10.12.12.9:5061;branch=z9hG4bKcc3ff54e-b63a-db11-893c-000d8797b918;rport;received=10.12.12.9
User-Agent: Asterisk PBX
From: <sip:anand@10.129.112.168>;tag=3c2ff54e-b63a-db11-893c-000d8797b918
Call-ID: 629f5991-b53a-db11-893c-000d8797b918@hamilton
To: <sip:anand@10.129.112.168>;tag=as704ead38
Contact: <sip:anand@10.129.112.168>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

And password is correct ( i have checked at least 20 times)[/u]

Please suggest some solution to it.

I had this same problem and It turned out that when asterisk has a domain registered it gives the same error for wrong password/username. try adding domain= to your sip config and see if this fixes it.

Jag5x5

Yes it worked :laughing: