Instruction to laboratory 1

Transkrypt

Instruction to laboratory 1
LECTURE:
LECTURER:
YEAR OF STUDY:
SEMESTER:
COURSE:
Sygnalling Systems and Management
dr inż. Krzysztof Wajda ([email protected]),
mgr inż. Grzegorz Rzym ([email protected])
IV
winter
Electronics & Telecommunication
LABORATORIUM 1 – Setup and basic configuration of Asterisk BPX on Linux
1. VM setup
Please download Asterisk Virtual Machine from http://kt.agh.edu.pl/~rzym/lectures/TISSiZ/VMAsterisk.zip and extract archive. Then, please start VM with default properties (after
the question about VM relocation please select ‘I’ve copied it’ and skip installation of
VMWare-Tools).
2. Setup the Asterisk BPX on Debian 7
To install Asterisk on Debian 7 please follow the sequence of commands as root user (login
and password will be provided during laboratory exercises):
$su
#apt-get update
#apt-get install linux-headers-`uname -r` libxml2-dev ncurses-dev
libsqlite3-dev sqlite3 build-essential automake autoconf bison flex
libtool libncurses5-dev libssl-dev subversion svn-buildpackage uuiddev
Next, please unpack archives containing DAHDI and Asterisk sources (placed in
/home/student directory) using following commands:
#tar –xf dahdi*
#tar –xf asterisk*
After that please compile and install DAHDI and Asterisk software following the sequence:
#cd dahdi*
#make
#make install
#make config
#/etc/init.d/dahdi start
#cd ..
#rm –rf dahdi*
#rm asterisk*.tar.gz
#cd aster*
#./configure
#make menuconfig
Please select app_meetme from applications
menu! To exit press the ‘q’ and save file.
#make
#make install
#make samples
#make config
1
LECTURE:
LECTURER:
YEAR OF STUDY:
SEMESTER:
COURSE:
Sygnalling Systems and Management
dr inż. Krzysztof Wajda ([email protected]),
mgr inż. Grzegorz Rzym ([email protected])
IV
winter
Electronics & Telecommunication
Now, you should have properly installed Asterisk software. Please start Asterisk daemon by
using the command:
#/etc/init.d/asterisk start
Questions to the report:
1) What is DAHDI?
2) What does the command make menuconfig during Asterisk installation? What
changes are possible?
3) What is app_meetme application?
3. Asterisk CLI
Please type the following to connect to the asterisk server:
#asterisk –vvvvvvr
After running the above command you’ll see (or something similar):
Connected to Asterisk 11.5.1 currently running on pbx (pid = 1799)
CLI>
Congratulations! You have a running PBX. Please list available commands.
Questions to the report:
4) What does the –vvvvvvr parameter of Asterisk command?
5) What happens when you change the number of repetitions of the letter ‘v’ in the
Asterisk command? What is the minimum and maximum number of repetitions of
letter ‘v’?
6) What commands list the number of peers and users configured in the PBX? Please
place the results of proper commands.
7) What is a different between peer and user?
8) How the BPX can be restarted from CLI?
4. Basic configuration
All Asterisk’s configuration files are located in /etc/asterisk directory. Each change of
configuration requires Asterisk’s daemon restart, e.g. with command:
#/etc/init.d/asterisk restart
Please refer to the stucture of sip.conf and extensions.conf file. To make calls the numbers of
users, their passwords and dialplan have to be configured. Please try to find relevant lines of
configuration files.
2
LECTURE:
LECTURER:
YEAR OF STUDY:
SEMESTER:
COURSE:
Sygnalling Systems and Management
dr inż. Krzysztof Wajda ([email protected]),
mgr inż. Grzegorz Rzym ([email protected])
IV
winter
Electronics & Telecommunication
Example configuration
Please create backup of sip.conf and extensions.conf file e.g., running:
#mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.bak
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.bak
Then, please create new sip.conf file with the following content:
[general]
context = default
bindport = 5060
bindaddr = 0.0.0.0
tcpbindaddr = 0.0.0.0
tcpenable = yes
[group1]
type = peer
context = group1
secret = 1234
insecure = invite
host = dynamic
canreinvite = no
dtmfmode = rfc2833
disallow = all
allow = ulaw
transport = udp
[1001](group1)
callerid = OneOne <1001>
[1002](group1)
callerid = OneTwo <1002>
[1003](group1)
callerid = OneThree <1003>
This configuration contains three users with numbers: 1001, 1002, 1003. Each of them
belongs to the group1 group. Please pay attention to the group settings – important to
configure your softphone (especially the password = secret).
3
LECTURE:
LECTURER:
YEAR OF STUDY:
SEMESTER:
COURSE:
Sygnalling Systems and Management
dr inż. Krzysztof Wajda ([email protected]),
mgr inż. Grzegorz Rzym ([email protected])
IV
winter
Electronics & Telecommunication
Next, you should create new extensions.conf file in order to allow to make calls, e.g.:
[general]
static=yes
writeprotect=no
[default]
[group1]
exten => 1001,1,Answer()
same=> n,Dial(SIP/1001,20,tr)
same=> n,Hangup
After that please restart asterisk service:
#/etc/init.d/asterisk restart
Questions to the report:
9) Please describe with details configured Dialplan (extensions.conf file)
5. Installation and configuration of Windows softphone (X-Lite)
To make call you have to install software that supports SIP protocol. The recommended
program will be installed on Windows. Please download http://www.counterpath.com/x-litedownload/ and install it (don’t create desktop shortcut and uncheck the automatic start of
application with the operating system). Sample configuration for X-lite softphone is shown in
the Figure 1.
6. Traffic and signaling observation (the most important part of
lecture!)
Traffic should be observed by using Wireshark on Windows or tcpdump on Linux. Please try
to make call with asterisk CLI enabled:
#asterisk –vvvvvvr
and follow the steps indicated by the Asterisk CLI.
Questions to the report:
10) Please briefly describe each step of call establishment process using proper lines from
Asterisk CLI and Wireshark (flow graph is welcome).
4
LECTURE:
LECTURER:
YEAR OF STUDY:
SEMESTER:
COURSE:
Sygnalling Systems and Management
dr inż. Krzysztof Wajda ([email protected]),
mgr inż. Grzegorz Rzym ([email protected])
IV
winter
Electronics & Telecommunication
Figure 1: Example X-Lite configuration
Important note: Domain IP is IP address of VM with Asterisk preinstalled. User name and
password are placed in Asterisk’s configuration file (sip.conf).
5

Podobne dokumenty