X-Lite 3.0 and Asterisk, within the same LAN

The ultra-simple X-Lite <-> Asterisk connection, within the same LAN, no issues of trying to make it past a router or DSL modem or dynamic addressing (well, at least, none such issues YET…)…

I have read the applicable section of the O’Reilly book (AsteriskTFOT) and the sample configuration in sip.conf, and searched this forum and the CounterPath forum, and so far haven’t been able to get XLite to connect … get “Registration Error 408 - Request Timeout”.

I have some more research to do before I actually come on here and ask you folks for specific step-by-step help, but in the meantime, do any of you have any excerpts from your sip.conf and extensions.conf files that are known to work with XLite 3.0 on the same LAN, that you don’t mind sharing with me?

If you’d rather not post them here on the forum, please send them to me at xlite@netis.colo.mv.net.

Thanks much for your help, and I’ll post here again with whatever I end up with that works.

in x-lite- turn off STUN and set network type to open internet

in x-lite- turn off STUN and set network type to open internet

There appear to be no such options in X-Lite 3.0 Perhaps there were options like that in earlier versions of X-Lite.

The only STUN settings I can find are “Discover server” and “Use specified server” and I have tried them both, with “Use specified server” set to stun.counterpath.net (recommended by the CounterPath support people).

As for “network type”, I can’t find anything like that; the closest thing I can find is something having to do with proxys for sending outbound.

Here is an example entry from my sip.conf file. I have X-Lite working both on the LAN and from remote locations. This is the entry for the X-Lite phone that is within my LAN.

[2000]
context=default
type=friend
username=2000
secret=2000
nat=yes
host=dynamic
canreinvite=no
qualify=yes

You may not need all of these for your setup.

.

OK … I have researched through the TFOT book, the X-Lite 3.0 book, this forum, and the CounterPath forum, and so far still getting “Registration Error 408 - Request Timeout”.

Asterisk sip.conf settings are:

[general]
realm=192.168.1.15 ; the IP address of my Asterisk server; also tried it with no "realm"
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

[janet_xlite1]
type=friend
secret=abcdefgh
nat=no ; On the LAN (no NAT router between server and client)
host=dynamic
canreinvite=no
context=BNP_xlite1

Relevant Asterisk extensions.conf settings are:

[BNP_xlite1]
exten => 611,1,Answer
exten => 611,n,Echo
… this is the standard initial test configuration suggested by the AsteriskTFOT book, so that if you pick up the handset and dial 611, everything you say echoes back to you. I used this in initial setup of my POTS port with analog phone and it worked first time.

X-Lite 3.0 settings are:

Account:
Display Name: Janet (this will become Janet’s phone when these setups are complete and working)
User Name: janet_xlite1 (matches the “janet_xlite1” section name in sip.conf … is that what I should use?)
Password: abcdefgh (matches “secret” in sip.conf)
Authorixation user name: janet_xlite1 (???)
Domain: 192.168.1.15
Register with domain and receive outgoing calls: CHECKED
Send outbound via: target domain

Topology:
IP address: Use local IP address (also tried “Discover global address”)
STUN server: Discover server (also tried “Use specified server: stun.counterpath.net”)
Enable ICE: CHECKED (also tried it unchecked)

Presence:
Mode: Disabled (also tried “Peer to Peer”)

Advanced: left these at their defaults.

A question regarding User Name, Password, and Authorization User Name: Do any of these relate to the Linux login userID and password, or do they both relate to the Asterisk login and password (“janet_xlite1” and “abcdefgh”, respectively)? If the latter, why have both a User Name and an Authorization User Name?

[2000]
context=default
type=friend
username=2000
secret=2000
nat=yes
host=dynamic
canreinvite=no
qualify=yes

Questions…

  1. Does “context=default” refer to the context in extensions.conf that receives calls from X-Lite? In my example posted a short time ago, that would be “BNP_xlite1”.

  2. The SIP configuration section in the TFOT book doesn’t mention anything about a username for the simplest configuration. I assumed (probably incorrectly) that the section name (“janet_xlite1”) is the username. In any case, I tried adding “username=janet_xlite1” and that didn’t help.

  3. You have “nat=yes”. From what I read in the documentation, that shouldn’t be needed if both server and client are on the same network and the same side of the NAT box. In any case, I tried it with both and it seems not to make any difference.

  4. You have “qualify=yes”. The Asterisk sample sip.conf file says that “Xlite sends NAT keep-alive packets, so qualify=yes is not needed”. In any case I tried it both ways with no change.

I figured it was because I haven’t RTFM’d enough (well, probably still haven’t RTFM’d enough…). I can tell this’ll be fun when I start the process of actually making this work from the outside. :smile:

You’re asking good questions, but anything inside extensions.conf wont matter one bit if the client cant even register.

Here is a very simple sip.conf file to look over and I have verified this works. Pay special attention to the [general] section, more specifially the externip and localnet fields[code][general]

context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
externip = yourexternaladdress.dyndns.org
localnet=192.168.1.100/255.255.255.0

[101] ;grandstream phone
type=friend
secret=123456
host=dynamic
dtmfmode=info
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <101>
mailbox=101

[103] ;xlite on PC
type=friend
secret=123456
host=dynamic
dtmfmode=rfc2833
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <103>
mailbox=101

[/code]

I’m guessing its timing out because it doesn’t know on which network and subnet to look for a server.

Use IAX softphone to test with…for that matter just give up on SIP and use IAX Life will be sweeter…

Hi, My name is Bubba and I have been SIP free for a year now…things are brighter now I can see where I am going…
Gone all those Iptables…
crappy Home routers that would only forward ten ports…
the cisco 501 pix which forget the config over night…
peace and weekend’s without “Help, I can’t get my X-Lite to connect”…

Here is a very simple sip.conf file to look over and I have
verified this works. Pay special attention to the [general]
section, more specifially the externip and localnet fields

Thanks. Sorry to say I have to go away for a couple of days … would have liked to try this before I leave but my wife is at the doorway tapping her foot wanting to know when I’m going to get off the %^$*# computer :smile: … but I will try this on Saturday and get back to you.

Thanks… :smile:

benutne wrote:

Here is a very simple sip.conf file to look over and I have
verified this works. Pay special attention to the [general]
section, more specifially the externip and localnet fields

Good afternoon, benutne.

Following is my entire sip.conf file, which I copied verbatim from your example and then tailored in a couple of places (marked in the following copy):

[general]

context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
externip = 192.168.1.15 ; <========= IP number of my Asterisk server
localnet=192.168.1.0/255.255.255.0 ; <== network where both XLite and Asterisk reside

[101] ;grandstream phone
type=friend
secret=123456
host=dynamic
dtmfmode=info
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <101>
mailbox=101

[103] ;xlite on PC
type=friend
secret=123456
host=dynamic
dtmfmode=rfc2833
context=internal
qualify=yes
canreinvite=no
callerid=“Ben Utne” <103>
mailbox=101

= = = = = = =

X-Lite 3.0 is configured as follows:

SIP Account Settings
…Account
…Display Name: Test Client
…User name: 103 ; <=== matches “xlite on pc” section name on sip.conf
…Password: 123456 ; <==== matches “secret” in “xlite on pc” section on sip.conf
…Authorization user name: 103
…Domain: 192.168.1.15 ; <==== IP of Asterisk host
…“Register with domain…” - CHECKED
…Send outbound via: Target domain ; <==== also tried “domain”
…Dialing plan: <the default dialing plan provided on installation of XLite 3.0>
…Topology
…IP address: Use local address ; <==== also tried “Discover global address”
…STUN server: use specified server stun.counterpath.net ; <==== also tried “Discover server”
…Enable ICE: CHECKED
…Use Xtunnels: Never
…Presence
…Mode: Disabled ; <==== also tried “Peer-to-peer”
…Advanced: left at their defaults

= = = = = = = =

XLite 3.0 and Asterisk are on the same subnet, no routers or firewalls or NAT servers in between. Asterisk is 192.168.1.15 and XLite 3.0 is on 192.168.1.3.

Windows XP Firewall is turned off on the host running XLite.

I make sure XLite is set up as indicated above, then ht Close (on SIP Account Settings), and I get:
Discovering network
Registering
(long timeout, then…)
Registration error 408 - Request timeout

So, making no progress, and haven’t received any response from the CounterPath support people or user’s forum.

I guess I’m out of ideas… :frowning:

Do you have a firewall on your linux box ?

In the asterisk CLI, enable “sip debug”

Now try to register the phone.

Can you see SIP debug on screen ?

What you need to do is go to forums.digium.com/viewtopic.php? … ight=drwho to make sure your network settings are okay.

What you need to do is go to forums.digium.com/viewtopic.php? … ight=drwho to make sure your network settings are okay.

did nobody read this thread forums.digium.com/viewtopic.php?t=8879 before chest thumping ?

Asterisk firewall rules
voip-info.org/wiki-Asterisk+firewall+rules

Sample Asterisk Firewall Rules

IPTables

This is an example on how to configure a Linux IPTables firewall for Asterisk:

SIP on UDP port 5060. Other SIP servers may need TCP port 5060 as well

iptables -A INPUT -p udp -m udp --dport 5004:5082 -j ACCEPT

IAX2- the IAX protocol

iptables -A INPUT -p udp -m udp --dport 4569 -j ACCEPT

IAX - most have switched to IAX v2, or ought to

iptables -A INPUT -p udp -m udp --dport 5036 -j ACCEPT

RTP - the media stream

iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT

MGCP - if you use media gateway control protocol in your configuration

iptables -A INPUT -p udp -m udp --dport 2727 -j ACCEPT