Localhost gateway

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

Introduction

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

/etc/asterisk/sip.conf
[general]
port=5060

[xlite]
port=5061
host=127.0.0.1
type=friend
qualify=no
reinvite=no
canreinvite=no
context=Powerbook
callerid="Fred Flintstone"<555-1234>

Asterisk Diaplan configuration

/etc/asterisk/extensions.conf
[incoming]
exten => s,1,NoOp(Incoming call)
exten => s,2,Goto(Powerbook,xlite,2)
;
[Powerbook]
; 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

Image


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

Image


Preferences >> Advanced System Settings >> SIP Settings

Image

Note

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: 127.0.0.1
Listen SIP Port: 5061
NAT Firewall IP: 127.0.0.1
Outbound SIP Proxy: 127.0.0.1


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


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

Introduction

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

/etc/asterisk/sip.conf
[general]
port=5060

[xlite]
port=5061
host=127.0.0.1
type=friend
qualify=no
reinvite=no
canreinvite=no
context=Powerbook
callerid="Fred Flintstone"<555-1234>

Asterisk Diaplan configuration

/etc/asterisk/extensions.conf
[incoming]
exten => s,1,NoOp(Incoming call)
exten => s,2,Goto(Powerbook,xlite,2)
;
[Powerbook]
; 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

Image


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

Image


Preferences >> Advanced System Settings >> SIP Settings

Image

Note

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: 127.0.0.1
Listen SIP Port: 5061
NAT Firewall IP: 127.0.0.1
Outbound SIP Proxy: 127.0.0.1


SIP Proxy settings
User Name: xlite
Authorisation User: xlite
Password: (empty)
Domain/Realm: 127.0.0.1
SIP Proxy: 127.0.0.1
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+