Localhost gateway

Using Asterisk as a SIP/IAX gateway for X-Lite running on the same system


If you are travelling a lot and want to use a notebook computer for making VoIP calls through your Asterisk server back in the office or at home, you may encounter situations where SIP simply doesn't work, either because of NAT traversal issues or due to the way in which the hotel or WiFi hotspot you happen to be visiting is set up. In most cases IAX will still work where SIP has long given up. Since you cannot run two programs that will bind to the same port at the same time you need to tweak your settings a little.

If you aren't sure where to put the following config snippets, append them to the end of sip.conf and extensions.conf, respectively.

Asterisk SIP configuration


callerid="Fred Flintstone"<555-1234>

Asterisk Diaplan configuration

exten => s,1,NoOp(Incoming call)
exten => s,2,Goto(Powerbook,xlite,2)
; include various services
include => national
include => international
include => demo ; This permits you to dial 500 to verify that your X-Lite softphone is properly configured
; dial local X-Lite soft phone
exten => xlite,1,NoOp(incoming call for local X-Lite)
exten => xlite,2,Dial(SIP/xlite,60,r)
exten => xlite,3,Hangup

X-Lite softphone configuration

According to Xten, X-Lite is EOL (End Of Line) so there should be little to no changes from the images below. These images were made using a plain vanilla install of X-Lite 2.0 release 1103m build stamp 14266.

Preferences >> System Settings >> Network


Preferences >> System Settings >> SIP Proxy >> [Default]


Preferences >> Advanced System Settings >> SIP Settings



The example configuration has been tested with Asterisk and X-Lite on a Powerbook running MacOSX (v.10.3.9). However, it should be possible to use the same or similar setup with Asterisk and a different SIP soft phone on Linux or BSD and possibly with AstWind and X-Lite on a Wintel notebook.

For platforms other than X-Lite, ensure that the following remains true:

Softphone settings

System settings
Auto Detect IP: Off
Listen on IP:
Listen SIP Port: 5061
NAT Firewall IP:
Outbound SIP Proxy:

SIP Proxy settings
User Name: xlite
Authorisation User: xlite
Password: (empty)
SIP Proxy:
Send Internal IP: Off
Register: Never

Created by: benjk, Last modification: Fri 06 of May, 2005 (19:44 UTC) by kubark42
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+