xlite client fails to authenticate to asterisk server

I just got asterisk running on my linux server and I'm trying to establish a connection with an xlite client on my LAN.  When xlite attempts to log on, asterisk displays this error:
chan_sip.c:10879 handle_request_register: Registration from 'My Name <sip:2007@my.domain>' failed for' - User name / auth name mismatch

Following the O'Reilly book on Asterisk, my sip.conf file looks like this:
(the lan is nat'd, but the connection is internal - I'm not testing that part of the network yet, although my pix allows 5060 and 5004 connections)


My extensions.conf file shows:
exten => 100,1,Dial(SIP/2007)
exten => 611,1,Echo()

And my xlite log file shows this:

© 2004 Xten Networks, Inc. All rights reserved.

X-Lite release 1105d build stamp 99999

License key: 7BAE08E072302C24E8D2D3887CD42FAC

Established SIP protocol listen on:




Discovered Blocked Firewall


SEND TIME: 2059337154


REGISTER sip:my.domain SIP/2.0

Via: SIP/2.0/UDP;rport;branch=z9hG4bK398DABCFD4D0DA05780C978E8CBBE29D

From: My Name <sip:2007@my.domain>;tag=1362010897

To: My Name <sip:2007@my.domain>

Contact: "My Name" <sip:2007@>

Call-ID: 0B2AE56E582AF5CE562A69C9A64825E8@my.domain

CSeq: 45073 REGISTER

Expires: 1800

Max-Forwards: 70

User-Agent: X-Lite release 1105d

Content-Length: 0

RECEIVE TIME: 2059337155


SIP/2.0 404 Not found

Via: SIP/2.0/UDP;branch=z9hG4bK398DABCFD4D0DA05780C978E8CBBE29D;received=;rport=5060

From: My Name <sip:2007@my.domain>;tag=1362010897

To: My Name <sip:2007@my.domain>;tag=as706d5f7b

Call-ID: 0B2AE56E582AF5CE562A69C9A64825E8@my.domain

CSeq: 45073 REGISTER

User-Agent: Asterisk PBX


Contact: <sip:2007@>

Content-Length: 0

My xlite configuration looks pretty straightforward, but if you need I can send entries for that too.  Let me know what's wrong, thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi klukac

Under the extension header, use type=friend

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I suggest you also have a look at the Diax IAX based client. It is much easier to setup and as it used the IAX client there are far fewer problems running it remotely with firewalls and NAT.
klukacAuthor Commented:
Frabble I had tried that earlier and many more asterisk errors appeared.  Here they are:
*CLI> Apr  9 11:31:24 NOTICE[19256]: chan_sip.c:11389 sip_poke_noanswer: Peer '2007' is now UNREACHABLE!  Last qualify: 0
Apr  9 11:31:54 ERROR[19256]: chan_sip.c:6401 register_verify: Peer '2007' is trying to register, but not configured as host=dynamic
Apr  9 11:31:54 NOTICE[19256]: chan_sip.c:10879 handle_request_register: Registration from 'Christine Kluka <sip:2007@meucci.us>' failed for '' - Username/auth name mismatch
Apr  9 11:32:02 NOTICE[19256]: chan_sip.c:9714 handle_response_peerpoke: Peer '2007' is now REACHABLE! (5ms / 2000ms)
Apr  9 11:32:14 ERROR[19256]: chan_sip.c:6401 register_verify: Peer '2007' is trying to register, but not configured as host=dynamic
Apr  9 11:32:14 NOTICE[19256]: chan_sip.c:10879 handle_request_register: Registration from 'Christine Kluka <sip:2007@meucci.us>' failed for '' - Username/auth name mismatch

This time, after following your advice and changing the setting back to type=friend, I changed my account in sip.conf to show host=dynamic and xlite shows that I'm logged in.  

Now I'm trying to make an actual call, starting with an echo test (all I get is a ring tone or a busy signal) but that's another question, wouldn't want to push my luck too far ;)  

But before closing this one out, I'd like to understand why a dynamic host is key to sip authentication - it seems to me that it would be easier to authenticate from a static address than from a dynamic one, although it would be unusual to get incoming calls from fixed ips.  

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Here's my understanding of the references I could find ...

The configuration file uses common variables for the different client types. Type "user" is an entry for handling calls placed with Asterisk, type "peer" is an entry for Asterisk to send calls and type "friend" internally creates both "user" and "peer" types.

Usually the host value will be an IP address or FQDN of the client, however, to allow a peer to register (which is what you're configuring the X-Lite login settings and sip.conf extension settings for) the host value must be set to dynamic. It's a successful registration that provides the IP address/port that Asterisk uses to send calls for that extension.

Good luck with the rest of the configuration. I'm using AMP which hides all that stuff from me :)
klukacAuthor Commented:
Thanks - the Asterisk book from O'Reilly, which came recommended with my TDM400 card, says that you can limit an endpoint to a single IP address by replacing dynamic with the IP address.  That may be true, but not the way the rest of the options are set up in the book (for sip.conf etc)...
You have to be sure that the host is even dinamic or your static ip address of the computer ur running xlite. The other thing i suggest u should double check is the username and secret. U probably should include a line defining the username for 2007 sip extension,in sip.conf

username = yourusername

and fill the requested field for the username in the xlite gui
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Voice Over IP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.