xlite client fails to authenticate to asterisk server

Posted on 2006-04-08
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

    Hi klukac

    Under the extension header, use type=friend
    LVL 36

    Expert Comment

    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

    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 <>' 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 <>' 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.  

    LVL 15

    Assisted Solution

    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

    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

    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

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Every year the snow affects people and businesses. According to the Federation of Small Businesses (FSB), in 2009, UK businesses lost an estimated £1.2bn ( because of bad weather. This article was c…
    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…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now