Problems with registring a SIP phone on naked asterisk


#1

Hi,

I followed the asterisk intallation instructions and succeded in installing the Asterisk PBX on a hosted Virtual Server.

I, however, get an error when my SIP phone tries to register on the server. There seems to be problems with authentification although I believe I have configured everything and defined the users rightly in the sip.conf.

[quote][roland]
type=friend
secret=roland
username=roland
qualify=yes
nat=yes
host=dynamic
careinvite=no
context=general[/quote]

An extract from the asterisk log files:

Nov 13 12:02:57 NOTICE[30537] cdr.c: CDR simple logging enabled. Nov 13 12:02:57 NOTICE[30537] config.c: Registered Config Engine odbc Nov 13 12:02:57 NOTICE[30537] res_odbc.c: registered database handle 'asterisk' dsn->[asterisk] Nov 13 12:02:57 NOTICE[30537] res_odbc.c: Connecting asterisk Nov 13 12:02:57 WARNING[30537] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified Nov 13 12:02:57 NOTICE[30537] res_odbc.c: res_odbc loaded. Nov 13 12:02:57 WARNING[30537] chan_skinny.c: Failed to bind to 0.0.0.0:2000: Address already in use Nov 13 12:02:57 NOTICE[30537] pbx_dundi.c: No ethernet interface found for seeding global EID You will have to set it manually. Nov 13 22:33:02 NOTICE[30817] chan_sip.c: Registration from 'sip:' failed for '80.134.107.202' - Username/auth name mismatch Nov 13 22:33:03 NOTICE[30817] chan_sip.c: Registration from 'sip:' failed for '80.134.107.202' - Username/auth name mismatch Nov 13 22:33:04 NOTICE[30817] chan_sip.c: Registration from 'sip:' failed for '80.134.107.202' - Username/auth name mismatch Nov 13 22:33:06 NOTICE[30817] chan_sip.c: Registration from 'sip:' failed for '80.134.107.202' - Username/auth name mismatch

Can anyone please help me? You can access the server and fix it if you can:

OS: Fedora Core 3
IP-Address: 85.25.40.19
Server Name: vs2040019.vserver.de
User: root
Password: yipifa83

Thanks in advance,
Roland.


#2

[quote=“pedros09”]
[roland]
type=friend
secret=roland
username=roland
qualify=yes
nat=yes
host=dynamic
careinvite=no
context=general[/quote]
It’s generally not a good idea to have qualify=yes set for phones - most of them don’t like it. Try qualify=no . This probably won’t fix your problem though.

Have you checked you’ve got the phone configured with the same username as you’ve got in sip.conf?

You’re mad! Your server’s probably been turned into a spam relay by now!


#3

Thanks for the tip WillKemp but it does not seem to be working. Any other ideas?

Roland.


#4

would be helpful to add the debug ouput of the SIP commands.
type

sip debug

to see them. Most likely, the phone doesnt send the same username/password as you have in the config file. What kind of phone is it?


#5

I tried using sip debug and had some more inconsclusive output:

[code]— (13 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to 192.168.2.101 : 5060 (non-NAT)
Transmitting (no NAT) to 192.168.2.101:5060:
SIP/2.0 404 Not found
Via: SIP/2.0/UDP 192.168.2.101;branch=z9hG4bK-92a2da853d7b1588f0082ba43c0331a7;received=80.134.75.225
From: sip:;tag=33ea44da
To: sip:;tag=as09a6ae33
Call-ID: 1634cd68a09479538e6e821f9a881091
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: sip:85.25.40.19
Content-Length: 0


Nov 14 22:16:51 NOTICE[13186]: chan_sip.c:10793 handle_request_register: Registration from ‘sip:’ failed for ‘80.134.75.225’ - Username/auth name mismatch
Scheduling destruction of call ‘1634cd68a09479538e6e821f9a881091’ in 15000 ms
Destroying call ‘1634cd68a09479538e6e821f9a881091’[/code]

I used the sipxezPhone and I don’t get the sent username and password displayed in the CLI console.

Thanks,
Roland


#6

I’m currently logged in your asterisk server;
look at my configuration in your sip.conf [200]
I’ve noticed that you use contexts general and internal for your sip friend but there are no such contexts in your extension.conf.
Maybe you make some mistake configuring your softhphone.
PLEASE CHANGE YOUR ROOT PASSWORD
C.