Asteriskv6

From SOWNWiki

Jump to: navigation, search

Asterisk v6 is a port of Asterisk designed to operate on IPv6 networks. The port is maintained by Viagénie. It is available for download from http://www.asteriskv6.org In order to make asterisk protocol independent several source code changes have been made but currently only the SIP channel has been ported.

Currently two versions of asterisk v6 are available asteriskv6-20070409 and asteriskv6-20080107 although limited documentation is available it seems that the former version is based on asterisk 1.4.x and the latter based on the currently beta asterisk 1.6.x. For the sown setup it is necessary to read configuration from a database using the asterisk realtime system. This requires the correct version of asterisk add-ons maintained by Digium.

Currently we are using asteriskv6-20080107 based on the new version of asterisk with the appropriate asterisk add-ons, namely asterisk-addons-1.6.0-beta2. During testing it was found that the 1.4.x version of asterisk v6 would not work with the database connection and therefore required the use of beta code.

Contents

Database Setup

In order to use the realtime database with asterisk v6 several changes had to be made to the table. Firstly the size of the IP address field had to be increased to accommodate IPv6 addresses. Secondly a new field not present in the 1.4.x version of asterisk now seems to be required. This “defaultuser” field was also added. The database table description can be found below

FieldTypeNullKeyDefaultExtra
idint(11)NOPRINULLauto_increment
name varchar(80)NOUNI
host varchar(31)NO
natvarchar(5)NOno
typeenum('user','peer','friend') NOfriend
accountcodevarchar(20)YESNULL
callgroupvarchar(10)YES NULL
calleridvarchar(80)YESNULL
canreinvitechar(3)YESyes
contextvarchar(80)YESNULL
dtmfmodevarchar(7)YESNULL
insecurevarchar(4)YESNULL
mailboxvarchar(50)YESNULL
md5secretvarchar(80)YESNULL
secretvarchar(80)YESNULL
setvarvarchar(100)YESNULL
disallowvarchar(100)YES all
allowvarchar(100)YESilbc;gsm;ulaw;alaw
ipaddrvarchar(40)YESNULL
port smallint(5) unsignedNO0
regservervarchar(100)YESNULL
regsecondsint(11)NO0
usernamevarchar(80)NO
defaultuservarchar(20)YESNULL

Useful Tools

IPv6 VOIP is rare and finding tools to help with deployment and testing can be difficult. The following sections contain a list of compatible tools found to work with our installation

Linphone

Linphone is a fully featured IPv6 capable VOIP soft phone that works under Linux (a Windows beta is in development). IPv6 support can be enabled by ticking the use IPv6 box in the Linphone preferences. Linphone is available as a Debian package. It was noticed that the version in the Ubuntu repositories was an old version (v1.7.1) whereas the latest Debian package available was v2.1.0.

SIPP

The SIP Performance tool is designed to stress test sip servers by initiating calls based on XML scripts. It is IPv6 capable and can be run on the command line, useful when you are operating on a machine without X. The following command can be used to start a basic IPv6 test, initiating 10 calls per second to the extension 1 on the machine with IPv6 address 2001:630:d0:f700::250

./sipp [2001:630:d0:f700::250] -sn uac -i [2001:630:d0:f700::250] -s 1 -d 1000 -mi [2001:630:d0:f700::250]

When connecting SIPP to asterisk a corresponding entry must be in sip.conf. An example entry can be found below, the host should be replaced with the IPv6 address of the machine the SIPP client is running on. Authentication is also possible but would require the use of a different SIPP profile

[test]
type=friend
context=testing
user=sipp
host=2001:630:d0:f700::127
canreinvite=no
disallow=all
allow=ulaw

Testing

In order to test the asteriskv6 installation several different scenarios need to be considered. In these initial tests, client were connected to the same SOWN node, although there is nothing to suggest that this would not work across the entire SOWN network.

asteriskv6test.png

IPv4 to IPv4 calls

Setup

This was tested with a call between the following VOIP clients:

  • SJphone build 1.65.377a on Windows XP SP2
  • XLite version 3.0 release 1011b build 39984 on Mac OS X 10.5.2

Results

The call was successful, with SIP re-invites causing the RTP streams to be sent directly between the two clients, after approximately 10 seconds.

IPv6 to IPv4 calls

Setup

This was tested with a call between the following VOIP clients:

  • Linphone 1.7.1 on Ubuntu 7.10 using gnome (IPv6)
  • SJphone build 1.65.377a on Windows XP SP2 (IPv4)

Results

The call was successful, with the RTP streams travelling via the server.

IPv4 to IPv6 calls

Setup

This was tested with a call between the following VOIP clients:

  • SJphone build 1.65.377a on Windows XP SP2 (IPv4)
  • Linphone 1.7.1 on Ubuntu 7.10 using gnome (IPv6)

Results

The call was successful, with the RTP streams travelling via the server.

IPv6 to IPv6 calls

Setup

This was tested with a call between the following VOIP clients:

  • Linphone 1.7.1 on Ubuntu 7.10 using gnome
  • Linphone 1.7.1 on Ubuntu 7.10 using kde-4

Results

The call was successful, with the RTP streams travelling via the server. There seems to be some issue with sending the SIP re-invites, which we are currently investigating.

Further investigation has shown that calls can switch randomly from via asterisk to direct even when a call is in progress. The reason for this is not currently known and is under investigation