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.
Main Topics
Browse All TopicsI 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 10.0.1.106' - 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)
[general]
context=default
srvlookup=yes
[2007]
type=user
secret=hello
qualify=yes
nat=no
host=10.0.1.106
canreinvite=no
context=internal
My extensions.conf file shows:
[internal]
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: 7BAE08E072302C24E8D2D3887C
Established SIP protocol listen on: 10.0.1.106:5060
SIP: 10.0.1.106:5060
RTP: 10.0.1.106:5004
NAT: 10.0.1.106
Discovered Blocked Firewall
PROXY#0: 10.0.1.104:5060
SEND TIME: 2059337154
SEND >> 10.0.1.104:5060
REGISTER sip:my.domain SIP/2.0
Via: SIP/2.0/UDP 10.0.1.106:5060;rport;bran
From: My Name <sip:2007@my.domain>;tag=1
To: My Name <sip:2007@my.domain>
Contact: "My Name" <sip:2007@10.0.1.106:5060>
Call-ID: 0B2AE56E582AF5CE562A69C9A6
CSeq: 45073 REGISTER
Expires: 1800
Max-Forwards: 70
User-Agent: X-Lite release 1105d
Content-Length: 0
RECEIVE TIME: 2059337155
RECEIVE << 10.0.1.104:5060
SIP/2.0 404 Not found
Via: SIP/2.0/UDP 10.0.1.106:5060;branch=z9h
From: My Name <sip:2007@my.domain>;tag=1
To: My Name <sip:2007@my.domain>;tag=a
Call-ID: 0B2AE56E582AF5CE562A69C9A6
CSeq: 45073 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:2007@10.0.1.104>
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.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
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 '10.0.1.106' - 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 '10.0.1.106' - 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.
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 :)
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
Business Accounts
Answer for Membership
by: FrabblePosted on 2006-04-08 at 19:28:14ID: 16409880
Hi klukac
Under the extension header, use type=friend