Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


xlite client fails to authenticate to asterisk server

Posted on 2006-04-08
Medium Priority
Last Modified: 2012-06-21
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.
Question by:klukac
LVL 15

Accepted Solution

Frabble earned 2000 total points
ID: 16409880
Hi klukac

Under the extension header, use type=friend
LVL 36

Expert Comment

ID: 16411224
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.

Author Comment

ID: 16412020
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.  

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 15

Assisted Solution

Frabble earned 2000 total points
ID: 16413767
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 :)

Author Comment

ID: 16430472
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)...

Expert Comment

ID: 22375193
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my office we had 10 Cisco 7940G IP phones that were useless as they were showing PROTOCOL APPLICATION INVALID when started. I searched through Google and worked for a week continuously on those phones, and finally got them working. This is a di…
Hey there Heard about jingle, the add on for XMPP that enables point to point audio between two XMPP clients. No server config necessary. Actually quite a cool feature. However, how good is it if you can not use those voice capabilities to do a P…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question