+ All Categories
Home > Technology > Ip telephony system sip

Ip telephony system sip

Date post: 09-May-2015
Category:
Upload: morshed-alam
View: 1,588 times
Download: 5 times
Share this document with a friend
123
Independent University, Bangladesh (IUB) IP Telephony System with Call Center and Mail Server Solution An undergraduate internship report submitted by Muhammad Morshed Alam (Student ID: 0910380) In consideration of the partial fulfillment of the requirements for the degree of BACHELOR OF SCIENCE in ELECTRICAL AND ELECTRONIC ENGINEERING Department of Electrical and Electronic Engineering Spring 2013
Transcript
Page 1: Ip telephony system  sip

Independent University, Bangladesh (IUB)

IP Telephony System with

Call Center and Mail Server Solution

An undergraduate internship report submitted by

Muhammad Morshed Alam (Student ID: 0910380)

In consideration of the partial fulfillment of the requirements for the degree of

BACHELOR OF SCIENCE

in

ELECTRICAL AND ELECTRONIC ENGINEERING

Department of Electrical and Electronic Engineering

Spring 2013

Page 2: Ip telephony system  sip

ii

IP Telephony System with

Call Center and Mail Server Solution

An undergraduate internship report submitted by

Muhammad Morshed Alam (Student ID: 0910380)

has been approved on April 7, 2013

______________________________

Dr. Feroz Ahmed

Internship Supervisor & Associate Professor

Department of Electrical and Electronic Engineering

School of Engineering & Computer Science

Independent University, Bangladesh

Page 3: Ip telephony system  sip

iii

ACKNOWLEDGEMENTS

All praises go to Allah, the almighty, for the successful completion of this internship

and fulfillment of author’s dream into reality. However, thanks and gratitude are also due

to the following persons for their continuous support in completing this internship and in

preparing this report.

My thanks is due to my internship supervisor Dr. Feroz Ahmed, Associate Professor,

School of Engineering and Computer Science, Independent University Bangladesh for his

active cooperation and for valuable time towards enhancing the understanding of the

systems and preparing this report.

I am highly grateful to Mr. Fakrul Alam Pappu, Chief Technical Officer (CTO) of

Dhakacom Limted, Mr. Mahabub Hasan Pavel, System Engineer, Dhakacom Limited. I

would like to express my thanks and gratitude to them for their cooperation and help

without their help it would not have been possible for me to learn so many things and work

so closely of an enterprise system.

Muhammad Morshed Alam

April 7, 2013

Dhaka, Bangladesh

Page 4: Ip telephony system  sip

iv

ABSTRACT

The growing excitement surrounding the transport of telephony services over traditional

data networks such as the Internet, corporate-enterprise intranets and new service provider

extranets has led to the development of cost efficient gateway equipment based on

embedded systems that converts analog telephony information such as voice and fax into

packet data suitable for transport over IP. As a result, the long-time promise of being able

to replace or enhance the traditional PBX by combining voice and data services onto a

single network can now finally be realized. In order to do so, a very low-cost telephony

device capable of directly exchanging IP packets with the data network is required. Due to

the overwhelming demand for faster digital communication, there has been a rapid research and

development in the medium of Ethernet applications. This has been done through the exploitation

of the properties of the medium, namely bandwidth and capacity. Application of Ethernet includes,

IP telephones, video conferencing, information sharing etc.

Development of this 'IP Telephone' will require the development of a 'system on a chip'

which combines digital signal processing functions, microcontroller functions, analog

interface, telephone user interface, network interface. This report looks at the functional

requirements, design of an IP Telephone, and examines the implementation issues that

must be considered.

The practical implementation tasks of IP Telephone like installing & configuring asterisk,

elastix & also the mail server installation and configuration have done successfully.

Page 5: Ip telephony system  sip

v

TABLE OF CONTENTS

Acknowledgement iii

Abstract iv

List of Figures xi

List of Tables xiv

Chapter 1 Introduction

1.1 Origin of the Report 1

1.2 My Chosen Company 2

1.3 Description of the Work Plan Phases 3

1.4 History of Dhakacom Limited 4

1.5 Group over View 5

1.6 Affiliation and Memberships 5

1.7 Network Diagram of DhakaCom NOC 6

1.8 National Wide Coverage Map 7

Chapter 2 Basic Concept of IP Telephony

2.1 Overview of IP Telephony 8

2.1.1 Voice over Internet Protocol (VOIP) 9

2.1.2 Advantage of IP Telephony 10

2.1.3 Disadvantage of IP Telephony 11

2.2 Standardized Protocols 11

2.3 Understanding VOIP Related Protocols 12 2.3.1 The Open Systems Interconnection (OSI) Model 12

2.4 Session Imitation Protocol (SIP) 13

2.4.1 SIP Addressing 13

2.4.2 SIP Methods 14

Page 6: Ip telephony system  sip

vi

2.4.3 SIP Responses 14

2.4.4 SIP Components 15

2.4.5 SIP Servers 15

2.4.6 Similar Domain Communication 18

2.4.7 Dissimilar Domain Communication 19

2.4.8 SIP Headers 20

2.4.9 SIP Header Description 20

2.5 Session Description Protocol (SDP) 21

2.5.1 SDP Header 22

2.5.2 SDP Header Description 22

2.6 Transport Control Protocol (TCP) 24

2.6.1 TCP Header 24

2.7 User Datagram Protocol (UDP) 25

2.7.1 UDP Header 25

2.8 Real-time Transport Protocol (RTP) 26

2.8.1 RTP Body (Payload Type) 26

2.8.2 RTP Header 27

2.9 Relationship between Protocols 28

2.10 The Voice Transfer Process at IP Telephony 30

2.11 Available Codec’s for Encoding Data 32

2.12 Simple Mail Transfer Protocol (SMTP) 33

2.13 Post Office Protocol (POP) 33

Page 7: Ip telephony system  sip

vii

2.14 Internet Message Access Protocol (IMAP) 33

Chapter 3 Understanding Linux, Elastix, Asterisk & Call Center

3.1 Introduction to Linux 34

3.2 The Main Directories commonly used all Platforms 35

3.3 Important Files 36

3.4 Some Useful Command in Linux 37

3.5 Some Advanced Shell Features & Command 38

3.6 Text Editing and Extraction Command 39

3.6.1 Most Useful Commands for vi or vim 39

3.7 Some Commands for User, Group & Security 40

3.8 Some Useful Network Commands 40

3.9 Introduction to Elastix 41

3.9.1 Important Parts of Elastix 41

3.9.2 Initial Installations of Elastix 42

3.9.3 Asterisk & Elastix Software Configuration Requirements 43

3.9.4 Solving a Practical Problem through Elastix PBX 43

3.9.5 To solve this problem I have to follow the following steps 43

3.9.6 Dial Patterns 52

3.9.7 Caller ID Number 52

3.9.8 DID Number 52

3.9.9 Call Back System at Elastix 59

3.9.10 to setup callback system we need to follow 4 steps 59

3.9.11 Follow Me 62

3.10 Elastix in Command Mode 63

Page 8: Ip telephony system  sip

viii

3.10.1 A SIP Extension Format 64

3.10.2 A SIP Trunk Format 64

3.10.3 Asterisk Manager CLI Commands 65

3.11 Understanding Asterisk at Ubuntu 67 3.11.1 Introduction 67

3.11.2 Basic Asterisk Configurations 67

3.11.3 Installing Asterisk on Linux Server 67

3.11.4 Asterisk File Locations 68

3.11.5 Asterisk Configurations Details 69

3.11.6 SIP.Conf 69

3.11.7 extensions.conf 71

3.12 Dual Tune Multi Frequency (DTFM) Mode 71

3.12.1 DTMF Frequencies 72

3.13 Network Address Translation (NAT) 73

3.14 SIP Configuration Details 73

3.15 Call Center at Elastix 74 3.15.1 Introduction to Call Center at Elastix 74

3.15.2 Features of Elastix Call Center Module 74

3.15.3 Installing Call Center Module at Elastix 74

3.15.4 Configuration of Call Center Module 75

Chapter 4 IP Phone Connection Diagram & Billing and Accounts Software

4.1 Connection Diagram of Dhakacom with Other 89

4.1.1 International Internet Gateway (IIG) 89

Page 9: Ip telephony system  sip

ix

4.1.2 International Gateway (IGW) 89

4.1.3 Interconnection Exchange (ICX) 89

4.1.4 Bangladesh Internet Exchange (BDIX) 90

4.2 A Corporate IP Phone Connection Solution 91

4.3 Configuration of ATA 92

4.4 Configuration of IP Telephone 94

4.5 Billing & Account Software 95

4.5.1 Billing Server 95

4.5.2 Active Call List 97

4.5.3 Call Duration 98

Chapter 5 Mail Server Installation at Ubuntu

5.1 Introduction 99

5.2 Mail Transfer Agent (MTA) 99

5.2.1 Postfix 99

5.2.2 Installation of Postfix at Ubuntu 99

5.2.3 Configuration of Postfix 100

5.3 Mail Delivery Agent (MDA) 101

5.3.1 Dovecot 102

5.4 Webmail 103

5.4.1 Squirrelmail 103

5.4.2 Installation of Squirrelmail 103

5.4.3 Sending Mail to Test Mail Server 105

Page 10: Ip telephony system  sip

x

Chapter 6 Conclusion 107

References 108

Appendices

Appendix A 109

Page 11: Ip telephony system  sip

xi

LIST OF FIGURES

Figure Page

Figure-1.1: Network Diagram of DhakaCom 6

Figure-1.2: National wide coverage map of DhakaCom Ltd. 7

Figure- 2.1: A SIP call session between 2 SIP phones – without SIP PROXY 15

Figure- 2.2: SIP Architecture 16

Figure-2.3: Similar domain communication between 2 SIP phones 18

Figure-2.4: Different domain communication between two SIP phones 19

Figure-2.4: TCP Header 24

Figure-2.5: UDP Header 25

Figure-2.6: RTP Header 27

Figure -2.7: Relationship between protocols 29

Figure – 2.8: Basic idea of IP telephony voice processing 31

Figure- 3.1: Assigning IP address to server 44

Figure- 3.2: Selecting DHCP mode 44

Figure- 3.3: Giving DNS of connecting network to the Elastix server 45

Figure- 3.4: Remote Connection to my server through SSH software 45

Figure- 3.5: SSH software screen after login 46

Figure- 3.6: Screen after giving IP at Mozilla Firefox 47

Figure-3.7: Elastix login page 48

Figure-3.8: After login at Elastix 48

Figure-3.9: Adding SIP extension at Elastix 49

Page 12: Ip telephony system  sip

xii

Figure-3.10: Creating an extension at Elastix 50

Figure-3.11: Creating a SIP Trunk 51

Figure-3.12: Uploading a voice at WAV format to Elastix 53

Figure-3.13: Creating an announcements 53

Figure-3.14: Creating Interactive Voice Response (IVR) 54

Figure-3.15: Creating Ringer Groups 55

Figure-3.16: Configuring Incoming Route 56

Figure-3.17: Configuring Outbound Route 57

Figure -3.18: Login to the soft dialer 58

Figure-3.19: Soft Dialer after login 58

Figure-3.20: Creating DISA for callback system 59

Figure-3.21: Creating Callback at Elastix 60

Figure-3.22: Configuring the incoming route for the callback system 61

Figure-3.23: Configuring “follow me” at elastix 62

Figure-3.24: Asterisk configurations files 63

Figure-3.24: DTMF frequencies & with character 72

Figure-3.25: Creating agents at elastix call center 75

Figure-3.26: Creating forms at call center for collecting data 76

Figure-3.27: Building queue at elastix PBX 77

Figure-3.28: Selecting queue for ingoing calls at call center 78

Figure-3.29: Creating groups for agents 79

Figure-3.30: Selecting agent console for group permissions 80

Figure-3.31: Creating users for agent login 80

Figure-3.32: CSV file with customers cell number & name 81

Figure-3.33: Creating outgoing campaigns 82

Figure-3.34: Agent console page at call center module 83

Figure-3.35: Giving agent password for agent login through soft dialer 84

Figure-3.36: Agent connected with customer -1 according to the uploaded CSV file 84

Page 13: Ip telephony system  sip

xiii

Figure-3.37: Call Script at agent 85

Figure-3.38: Saving data to the CSV file through the Call Form by the agent 86

Figure-3.39: CSV file after downloading form the elastix server 87

Figure-3.40: Agent login page during no active call 88

Figure-4.1: Connection Diagram of Dhakacom IP Phone to Other operators 90

Figure-4.2: Connection Diagram of DhakaCom to Client Local LAN 91

Figure-4.3 Analog Telephone Adapter (ATA) 93

Figure-4.5: Assigning IP address at ATA 94

Figure-4.6: Grand Stream IP Telephone 95

Figure-4.7: Billing Server Overview 96

Figure-4.8: Active Call List 97

Figure 4.9: Call duration 98

Figure-5.1: Login to my mail server 104

Figure-5.2: My mail server after login using user name & password 105

Figure-5.3: The received main send form root 106

Page 14: Ip telephony system  sip

xiv

LIST OF TABLES

Table Page

Table -1.1: Work plan phase 4

Table – 2.1: Open System Interconnection (OSI) Model 12

Table – 2.2: SIP INVITE & RESPONSE Header 20

Table – 2.3: The table of codec with required bandwidth 32

Table – 3.1: Operating System (OS) & their kernel type 34

Table – 3.2: Directories of Linux & their respective purpose 35

Table – 3.3: Important file location in Linux 35

Table – 3.4: Some useful command in Linux and their respective purpose 36

Table - 3.5: Various purpose of ‘ls’ command 37

Table – 3.6: Some advanced shell features & command in Linux 38

Table-3.7: Some text editing and extraction command 39

Table – 3.8: Some essentials commands for vi/vim commands 39

Table -3.9: Some essential commands for user, group & security 40

Table -3.9: Some essential commands for user, group & security 41

Table – 3.10: Some useful network command & their purpose 41

Table – 3.11: Dial Pattern 52

Page 15: Ip telephony system  sip

1

Chapter 1

Introduction

1.1 Origin of the report

Internship is a partial requirement of graduation program. It gives a great opportunity for the

students to have some practical and excellent ideas about working field. The main and challenging

task is to understand the working environment and to prepare Internship Report by which a

graduate can reflect the ability in the field of engineering efficiently. Senior students (who have

finished more than 120 credits) have to go for internship under a particular advisor selected by

the University authority. Students work in different companies and after a certain period they

need to submit their report.

This course helps the students to gain knowledge that they learned in their classes into practical

field and help them to know about the current situation of their field while they are finishing

their degree. It also helps them to distinguish the knowledge that they have learned through their

study and the additional concepts that they have to learn for their practical field. This provides a

tremendous opportunity to be accustomed with work group and their subject for future study.

This report relates to the development of “IP telephony System and Call Center Solutions”. It

also fulfils the internship requirements for Bachelor of Engineering in Electronic and

telecommunication.

Page 16: Ip telephony system  sip

2

1.2 My Chosen Company

DhakaCom Limited (A sister concern of Partex Group) has been chosen for the internship

program. DhakaCom is providing Internet and Data Communication services and solutions in

Bangladesh since 1997. It also has Dialup Internet access, Home Internet (Fiber to the Home)

,High speed Internet access -Fiber & Wireless Broadband ,Corporate WAN connectivity, Web

site development, domain registration and hosting, Server collocation, Corporate VPN solutions,

Wi-Fi Services and Solutions, Hotspots, Anti spam & Antivirus , Network & Server solutions,

Video Surveillance & Conference, Carrier services, Security Solutions and IP telephony Service.

Highly efficient, skilled and trained IT professionals that persevere to keep the service up and

running run it.

So it is a suitable place for working with them as an intern, and also as a telecommunication

Engineer there are many networking tools which can be extracted from them. That is why this

organization has been chosen for the internship program.

Project: IP Telephony System With Call Center & Mail Server Solution

Duration 12 (Twelve) Weeks

System and Network Development Team

Developed by: Muhammad Morshed Alam

Manager: A.K.M. Shamsuzzaman

Inspectors: Muhammad Yeasir Arafat

Page 17: Ip telephony system  sip

3

1.3 Description of the Work Plan Phases

Topics: Description:

System analysis To understand and define systems requirements as well as preparing

necessary documents:

• Objects and Scope

• Project Standard

• Requirement Specification

Understanding Open Source

Operating System

To understanding open source operating System Likes Ubuntu, Centos:

• Operating System Install

• Learned basic Command

• Concept of Asterisk

• Install Asterisk in Ubuntu and Work on Asterisk

Understanding Open Source IP

PBX System

Based on Centos Operating System I learned Elastix. This includes:

• How to Install Elastix.

• Learn command for Elastix

• Make a open source IP PBX System

• Understanding Advance features on Elastix.

Understanding advance

knowledge on IP telephony

System

• Understanding Telephone System in Bangladesh.

Call Center Software Develop

• Call Center Software Develop in Elastix: Creating Agent

Page 18: Ip telephony system  sip

4

Mail Server • Installation & configuration of e-mail server at ubuntu

Duration: Total 12 weeks in Dhakacom Limited Report Writing Prepare documents for the presentation.

Table -1.1: Work plan phase

CCoommppaannyy PPrrooffiillee

1.4 History of DhakaCom Limited

DhakaCom Limited (DhakaCom) is a business venture of the Partex Holdings. DhakaCom is a

leading ISP in Bangladesh providing Internet, Enterprise Data Communication and Value Added

Services. It is well known for its dedicated service, effective technical support & friendly

customer care.

Dhakacom was setup in 1997 and was in full commercial operations and services at its own

premise, Navana Tower Gulshan Circle-1- a center point of commercial area of Dhaka.

DhakaCom is recognized as the best IT Company in terms of Dedicated Service, Friendly

Customer Service & Communication Solutions.

Started with Dialup, DhakaCom now offers reliable DSL, Optical-fiber & Wireless Broadband

services. Over the years, DhakaCom has built extensive network covering prime areas of the

Metropolis, the Industrial Areas & EPZs (Export Processing Zone). DhakaCom services are

available at Dhaka, Chittagong, Sylhet, Comilla, Gazipur, Narayanganj, Tangail, Savar, etc. The

company is formed with the best technological advances and equipment to provide some services

in this country which has never been introduced before. It is built for the data-intensive era of

communications. The utmost target of the company is to be the friendliest ISP to its customers

around the country.

DhakaCom is connected to the Global Communication Network via its own Satellite Link

(VSAT) connected to SingTel’s Backbone in Singapore. DhakaCom is also amongst first few

privileged ISPs connected to “The Information Super High Way” SEA-ME-WE-4, the first

submarine cable system in Bangladesh [20].

Page 19: Ip telephony system  sip

5

DhakaCom is a trusted name among its users which consists of large Corporations,

Multinationals, Financial Institutes, Banks, Garments, Textiles, Universities, NGOs, Software

Developers, BPOs, Telcos, ISPs, Cyber Cafés, etc. It is also a reliable provider amongst its

SMEs, SOHOs & Home Users [20].

1.5 Group Overview

Partex Group is among the large Bangladesh private sector manufacturing and service-based

enterprises, owning and operating over twenty units giving value for money to all customers.

Partex was established in 1959 under visionary leadership of its founding chairman Mr. M.A.

Hashem

1.6 Affiliation and Memberships

I) APNIC: IP Address Allocation & ASN

II) ISPAB: EC Member and currently holding Joint General Secretary position

III) BDCERT: Founder member and co-chairman

IV) CSTF: Founder and Adviser

V) BDIX: Active Member [20]

Page 20: Ip telephony system  sip

6

1.7 Network Diagram of DhakaCom NOC

Figure-1.1: Network Diagram of DhakaCom [20]

Page 21: Ip telephony system  sip

7

1.8 National Wide Coverage Map

Figure-1.2: National wide coverage map of DhakaCom Ltd [20].

Page 22: Ip telephony system  sip

8

Chapter 2

Basic Concept of IP Telephony

2.1 Overview of IP Telephony

IP telephony refers to telephone communications over TCP/IP networks. In contrast to the

PSTN, which consists of analog and digital signals over a circuit-switched network, IP telephony

is packet switched. All information to be transmitted over the network is separated into data

packets. Each packet has a header containing its source and destination, a sequence number, a

block of data content, and an error-checking code. Routers and servers direct these packets over

the network until they arrive at their destination. When the packets arrive, the sequence number

is used to reassemble the packets in their original order.

IP Telephones originally existed in the form of client software running on multimedia PCs for

low-cost PC- to-PC communications over the Internet. Most of the focus on IP telephony is

currently centered on two key applications. The first is private business network applications.

Businesses with remotely located branch offices, which are already connected together via a

corporate intranet for data services, can take advantage of the existing intranet by adding voice

and fax services using IP telephony technologies. Businesses are driving the demand for IP

telephony solutions primarily because of the incredible cost savings that can be realized by

reducing the operating costs of managing one network for both voice and data and by avoiding

access charges and settlement fees, which are particularly expensive for corporations with multi-

international sites. Managed corporate intranets do not have the QOS issues, which currently

plague the Internet; thus, voice quality approaches toll quality [21, 22].

Page 23: Ip telephony system  sip

9

The second key application is IP telephony over public networks. This application involves the

use of voice gateway devices designed to carry voice to Internet Service Providers, now known

as Internet Telephony Service Providers, or to the emerging Next Generation Carriers such as

Level 3, which are developing IP networks specifically to carry multimedia traffic such as IP

telephony. ISPs are interested in IP telephony as a way of offering new value-added services to

increase their revenue stream and break out of the low monthly fixed fee structure currently in

place for data services. IP telephony also allows them to improve their network utilization. These

new services include voice and fax on a per-minute usage basis at rates significantly less than

prevailing voice and fax rates for service through the PSTN.

2.1.1 Voice over Internet Protocol (VOIP)

"Voice-over-IP" (VoIP) technology enables the real-time transmission of voice signals &

multimedia sessions like video as packetized data over IP network that employ the Session

Initiation Protocol (SIP), Session Description Protocol (SDP), Transmission Control Protocol

(TCP), Real-Time Transport Protocol (RTP), User Datagram Protocol (UDP), and Internet

Protocol (IPv4) suite [2].

.Advanced Services of IP Telephony

• Video, real time voice communication, email, instant messaging (IM), fax, web

conference, call back service, voice mail, IVR (Interactive Voice Response), call

recording and follow me service etc.

• Reduced Network Costs

Page 24: Ip telephony system  sip

10

• Reduced bandwidth usages per call by using different encoding algorithm like G729 &

G.711 uses 32 & 64 kbps per call. IP Telephony codec can use anywhere from 32 kbps to

5.3 kbps per call [16].

2.1.2 Advantage of IP Telephony

Some advantages of IP Telephony are given below:

• Low call rate

• Extend the functionality of the corporate IP voice, video and data solutions to remote

office locations.

• Lower equipment administration costs

• Centralized network control and management

• Increased customer satisfaction through the use of distributed call center applications

• Reduces infrastructure cost and complexity

• Increased communications capabilities and productivity for remote and mobile

employees

• Mobility: a user can move an IP phone from location to location, state to state while still

keeping the same telephone number and set of feature [16].

Page 25: Ip telephony system  sip

11

2.1.3 Disadvantage of IP Telephony

Some disadvantages of IP Telephony are given below:

• Internet Requirement: IP phones must have access to the Internet to work.

• Quality of Service (QoS): Quality of Service is a major issue in VOIP implementations.

The issue is how to give warranty that packet traffic for a voice or other media

connection will not be delayed or dropped due to interference from other lower priority

traffic.

Things to consider are:

• Latency: Delay for packet delivery

• Jitter: Variations in delay of packet delivery

• Packet loss: Too much traffic in the network causes the network to

drop packet [17]

2.2 Standardized Protocols

There are two Protocols for IP Telephony System, One is H.323 which is widely used in PSTN

telephone system in our country another protocol is SIP which is used in IP Telephone System in

DhakaCom Limited. Here, I only discuss for SIP because I only used this in my Systems.

Signaling protocol to establish presence, locate users, set up, modify and tear down sessions.

Media Transport Protocols for transmission of packetized audio/video. In chapter 2 I will explain

all the protocols with their header related with VOIP [14, 9, 1 & 2].

Page 26: Ip telephony system  sip

12

2.3 Understanding VOIP Related Protocols 2.3.1 The Open Systems Interconnection (OSI) Model

It was designed by International Organization for standardization (ISO) & it is a seven layers

model.

OSI (Open System Interconnection ) Layers Data: Layers: Functions: Examples: Host Layers

Data

7. Application

Network process to application

SIP, DHCP, DNS, RTP, SMTP, POP3, IMAP

Data

6. Presentation

Data translation, encryption, decryption & compression

Data

5. Session

To establish, maintain & synchronize the interaction between communicating systems

SDP

Segments

4. Transport

End-to-End connections, provides reliable & unreliable delivery & performs error correction before retransmit

TCP, UDP

Media Layers

Packets

3. Network

Path determination & logical addressing

IP (IPv4 -32 bits, IPv6 -128 bits)

Frames

2. Data Link

Physical addressing (MAC & LLC)

Bits

1. Physical

Media, signal & binary transmission

Table – 2.1: Open System Interconnection (OSI) Model [1 & 5]

Page 27: Ip telephony system  sip

13

2.4 Session Imitation Protocol (SIP)

Session Initiation Protocol (SIP), an application-layer control (signaling) protocol for creating,

modifying, and terminating sessions with one or more participants. This session included internet

telephone calls, multimedia conferences, instant messaging, voice, video, interactive games, and

virtual reality etc [19].

It provides mechanisms to:

• Establish a session

• Maintain a session

• Modify and Terminate a session

2.4.1 SIP Addressing

• A SIP address is identified by a SIP URL (Uniform Resource Locator).

• These are globally accessible addresses. Callers use this address to establish real-time

communication with callers.

• Examples of SIP URLs:

sip:[email protected]

sip:[email protected]

• Must include host, may include user name, port number, parameters (e.g., transport), etc.

Basic scope of SIP is to exchange:

• IP addresses

• Port Numbers (by which a system can receive data)

SIP uses email-style addressing. For example-sip:[email protected]:5060 [19]

Page 28: Ip telephony system  sip

14

2.4.2 SIP Methods

• INVITE – Initiates a call by inviting user to participate in session.

• ACK - Confirms that the client has received a final response to an INVITE

request.

• BYE - Indicates termination of the call.

• CANCEL - Cancels a pending request.

• REGISTER – Registers the user agent.

• OPTIONS – Used to query the capabilities of a server.

• INFO – Used to carry out-of-bound information, such as DTMF digits[19]

2.4.3 SIP Responses

• 1xx - Informational Messages: such as 100 Trying, 180 ringing, 181 Call forwarded, 182

Queued and 183 Session Progress etc.

• 2xx - Successful Responses: such as 200 OK.

• 3xx - Redirection Responses: such as 302 Moved Temporarily, 300 Multiple Choices,

301 Moved Perm, 302 Moved Temp, and 380 Alternative Serv etc.

• 4xx - Request Failure Responses: such as 400 Bad Request, 401 Unauthorized, 403

Forbidden, 404 Not Found, 405 Bad Method, 415 Unsupp. Content, 420 Bad Extensions

and 486 Busy Here etc.

• 5xx - Server Failure Responses: such as 503 Service Unavailable, 504 Timeout, 501 Not

Implemented and 500 Server Error etc.

• 6xx - Global Failures Responses: such as 600 Busy Everywhere, 603 Decline, 604

Doesn’t Exist and 606 Not Acceptable etc [19].

Page 29: Ip telephony system  sip

15

Figure- 2.1: A SIP call session between 2 SIP phones – without SIP PROXY [9]

2.4.4 SIP Components

SIP User Agents: It consists of

• User Agent Clients (UAC):

A client application that initiates a call & issues SIP requests.

• User Agent Servers (UAS):

A server application that receives a call & receives SIP requests, and generates

a response that accepts, rejects, or redirects the request.

• UAC is the only SIP component that can create an original request

• Phones – acts as UAC or UAS. Soft phones (PCs that have phone capabilities

installed) and Cisco SIP IP phones can initiate SIP requests and respond to

requests [19].

2.4.5 SIP Servers

• Proxy server

• Location server

• Redirect server

• Registrar server

Page 30: Ip telephony system  sip

16

Figure- 2.2: SIP Architecture [21]

SIP Proxy Server

• Acts both as a server and a client for the purpose of making requests on behalf of

other clients.

• Receives SIP messages, forwards to next SIP server.

• Can perform functions such as authentication, authorization, network access

control, routing meaning that its job is to ensure that a request is sent to another

the targeted user.

• Interprets rewrites or translates a request message before forwarding it [19, 21].

Page 31: Ip telephony system  sip

17

SIP Redirect Server

• Used during session initiation. Determine the address of the called device & then

returns this information to the calling device.

• Does not accept or terminate calls.

• Does not initiate its own SIP request.

• Generates SIP all 3xx redirect responses to locate other entities & redirects callers

to other servers [19, 21].

SIP Registrar Server

• A server that accepts REGISTER requests and places the information it receives

(the SIP address and associated IP address of the registering device) in those

requests into the location service for the domain it handles.

• It acts like HLR in GSM technology.

• Maintains user’s whereabouts at a Location Server

• Typically co-located with a proxy server or a redirect server and may offer

location services

• May also support authentication [19, 21, 22]

SIP Location Server

• Used by a SIP redirect or proxy server to obtain information about a called party’s

possible location.

Page 32: Ip telephony system  sip

18

2.4.6 Similar Domain Communication between two SIP Phones

Figure-2.3: Similar domain communication between 2 SIP phones [19]

2.4.7 Dissimilar Domain Communication between two SIP Phones

Page 33: Ip telephony system  sip

19

Figure-2.4: Different domain communication between two SIP phones [19]

Page 34: Ip telephony system  sip

20

2.4.8 SIP Headers

INVITE: sip:[email protected]/301

Response: SIP/301 200 OK

Via: SIP/201/UDP 172.16.3.42:5060 From: <sip:[email protected]> To: <sip:[email protected]> Call -ID:[email protected] Cseq: 1 INVITE Contact: <sip:[email protected]> Content-Type: application/sdp Content-Length: 134

Via: SIP/301/UDP 192.169.16.2:5060 From: <sip:[email protected]> To: <sip:[email protected]> Call-ID: [email protected] Cseq: 1 INVITE Contact: <sip:[email protected]> Content-Type: application/sdp Content-Length: 134

SDP (Session Description Protocol): SDP (Session Description Protocol):

V=0 O=201 28908 28908 IN IP4 172.16.3.42 S=Session SDP C=IN IP4 100.101.102.103 T=0 0 M=audio 49 172 RTP/AVP 0 A=rtpmap: 0 PCMU/8000

V=0 O=301 28908 28908 IN IP4 192.168.16.2 S=Session SDP C=IN IP4 110.111.112.113 T=0 0 M=audio 3456 172 RTP/AVP 0 A=rtpmap: 0 PCMU/8000

Table – 2.2: SIP INVITE & RESPONSE Header [19, 17, 21]

2.4.9 SIP Header Description

Call-ID

• Provides a globally unique identifier to distinguish specific invitations or multiple

registrations of the same user

• Typically uses a 32-bit cryptographically random numbers

• Call-ID: [email protected]

Page 35: Ip telephony system  sip

21

CSeq or command sequence

• Needed in both request messages as well as response messages

• Need to increment this when a user with the same Call-ID wants to send different SIP

methods or content

• When sending responses to requests, CSeq should be the same

• CSeq: 1 INVITE

Content-Type

• Provides information about media type of message body

• Content-Type: application/sdp

2.5 Session Description Protocol (SDP)

When initiating multimedia teleconferences, voice-over-IP calls, streaming video or other

sessions, there is a requirement to convey media details, transport addresses, and other session

description metadata to the participants. SDP provides a standard representation for such

information.

An SDP session description includes the following:

• Session name and purpose

• Time(s) the session is active

• The media comprising the session

• Information needed to receive those media (addresses, ports, formats, etc.)

An SDP session description includes the following media information:

• The type of media (video, audio, etc.)

• The transport protocol (RTP/UDP/IP, H.320, etc.)

• The format of the media (H.261 video, MPEG video, Voice etc.) [21,22]

Page 36: Ip telephony system  sip

22

2.5.1 SDP Header

An example SDP description is: v=0 o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5 s=SDP Seminar i=A Seminar on the session description protocol u=http://www.example.com/seminars/sdp.pdf [email protected] (Jane Doe) c=IN IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 49170 RTP/AVP 0 m=video 51372 RTP/AVP 99 a=rtpmap:99 h263-1998/90000 [15] 2.5.2 SDP Header Description

Protocol Version ("v= o")

The "v=" field gives the version of the Session Description Protocol. This memo defines version

0.

Origin ("o=")

Format: o= <username> <session ID> <version> <net type> <address type> <address>

The "o=" field gives the originator of the session (her username and the address of the user's

host) plus a session identifier and version number:

Session Name ("s=") The "s=" field is the textual session name.

Session Information ("i=") The "i=" field provides textual information about the session. There MUST be at most one

session-level "i=" field per session description, and at most one "i=" field per media. The "i="

field is intended to provide a free-form human-readable description of the session or the purpose

of a media stream.

Page 37: Ip telephony system  sip

23

URI ("u=") A URI is a Uniform Resource Identifier as used by WWW clients. The URI should be a pointer

to additional information about the session. This field is OPTIONAL, but if it is present it

MUST be specified before the first media field. No more than one URI field is allowed per

session description.

Email Address ("e=") e=<email-address> The "e=" line specify contact information for the person responsible for the conference. This is

not necessarily the same person that created the conference announcement. If an email address or

phone number is present, it MUST be specified before the first media field. More than one email

or phone field can be given for a session description.

Connection Data ("c=")

c=<nettype> <addrtype> <connection-address>. The "c=" field contains connection data. • IP address of the session

• Very critical when communicating with clients behind NATs

• Example of an IPV4 address session

c=IN IPV4 192.168.0.2

Timing ("t=") t=<start-time> <stop-time>. The "t=" lines specify the start and stop times for a session.

Attributes ("a=")

a=<attribute>

a=<attribute>:<value>

Attributes are the primary means for extending SDP. Attributes may be defined to be used as

"session-level" attributes, "media-level" attributes, or both.

Media Descriptions ("m=") • m: media name and transport address

• Describe type of media

Page 38: Ip telephony system  sip

24

• Format : <media> <port> <no. of ports> <transport> <fmt list>

For example: m=audio 23456 RTP/AVP 0

• When RTP is used for port, fmt list is list of integers that specify the codec that can be

used.

2.6 Transport Control Protocol (TCP)

It is a transport layer, connection orientated & reliable protocol. TCP offers full-duplex service,

where data can flow in both directions at the same time through the virtual connection. TCP is a

reliable transport control protocol because it uses an acknowledgement to check the safe and

sound arrival of data.

• Connection-oriented protocol- because it requires handshaking to set up end-to-end

communications.

• Reliable – TCP manages message acknowledgment, retransmission and timeout. Multiple

attempts to deliver the message are made.

• Ordered – if two messages are sent over a connection in sequence, the first message will

reach the receiving application first. When data segments arrive in the wrong order, TCP

buffers delay the out-of-order data until all data can be properly re-ordered and delivered

to the application.

• Heavyweight – TCP requires three packets to set up a socket connection, before any user

data can be sent. TCP handles reliability and congestion control [1, 2].

2.6.1 TCP Header

TCP Header Octet 0 1 2 3 Bit 0 to 7 8 to 15 16 to 23 24 to 31

Source Port Destination Port Sequence Number Acknowledgement Number (if ACK set) Checksum Urgent Pointer Options

Figure-2.4: TCP Header [1]

Page 39: Ip telephony system  sip

25

Source port (16 bits): identifies the sending port.

Destination port (16 bits): identifies the receiving port.

Checksum (16 bits): The 16-bit checksum field is used for error-checking of the header and data.

2.7 User Datagram Protocol (UDP)

UDP is a connectionless, unreliable transport layer protocol that has no flow & error control.

The advantage of UDP is sending a small message using UDP takes much less interaction

between the sender & receiver than using TCP. UDP is used in conjunction with the Real Time

Transport Control Protocol (RTP) to provide a transport layer mechanism for real time data.

UDP provides multiplexing of data from application layer via port numbers and integrity

verification via checksum of the header and payload [1, 2 & 8].

2.7.1 UDP Header

Figure-2.5: UDP Header [1, 8]

The UDP header consists of 4 fields, each of which is 2 bytes (16 bits).The use of the fields

"Checksum" and "Source port" is optional in IPv4 (pink background in table).

Page 40: Ip telephony system  sip

26

2.8 Real-time Transport Protocol (RTP)

The Real-time Transport Protocol (RTP) defines a standardized packet format for real time

delivering of audio and video over IP networks. RTP is used in conjunction with the RTCP (Real

–time Transport Control Protocol).

Protocol Components:

The RTP specification describes two sub-protocols:

• The data transfer protocol, RTP, which deals with the transfer of real-time data. RTP

header functions are timestamps for synchronization, sequence numbers for packet loss

and reordering detection, the payload format which indicates the encoded format of the

data is the security encryption via encoding, media content type etc.

• A control protocol, RTCP, is used to specify quality of service (QoS), feedback and

synchronization between the media streams.

• An optional signaling protocol such as H.323 or Session Initiation Protocol (SIP).

• An optional media description protocol such as Session Description Protocol [6].

2.8.1 RTP Body (Payload Type)

Can carry multimedia in arbitrary encoding

• RFC2833: DTMF

• RFC3016: MPEG-4

• RFC3385: comfort-noise

• RFC3351: basic audio (GSM, G.711, G.729, …)and video (H.261, H.263, …)

• RFC3952: Ilbc (Internet Low Bit Rate Codec)

• RFC4298: Broadvoice [6]

Page 41: Ip telephony system  sip

27

2.8.2 RTP Header

Figure-2.6: RTP Header [1, 2 & 6]

Version: (2 bits) Indicates the version of the protocol. Current version is 2.

P (Padding): (1 bit) Used to indicate if there are extra padding bytes at the end of the RTP

packet.

X (Extension): (1 bit) Indicates presence of an Extension header between standard header and

payload data. This is application or profile specific.

CC (CSRC Count): (4 bits) Contains the number of CSRC identifiers (defined below) that

follow the fixed header.

M (Marker): (1 bit) Used at the application level and defined by a profile. If it is set, it means that the current data has some special relevance for the application.

PT (Payload Type): (7 bits) Indicates the format of the payload and determines its interpretation

by the application. This is specified by an RTP profile. For example, see RTP Profile for audio

and video conferences with minimal control (RFC 3551).

Sequence Number: (16 bits) the sequence number is incremented by one for each RTP data

packet sent and is to be used by the receiver to detect packet loss and to restore packet sequence.

Page 42: Ip telephony system  sip

28

Timestamp: (32 bits) Used to enable the receiver to play back the received samples at

appropriate intervals. When several media streams are present, the timestamps are independent in

each stream, and may not be relied upon for media synchronization.

SSRC: (32 bits) Synchronization source identifier uniquely identifies the source of a stream.

CSRC: Contributing source IDs enumerate contributing sources to a stream which has been

generated from multiple sources.

2.9 Relationship between Protocols Related with IP Telephony

From above description of all protocols related with IP telephony the SIP & SDP used for

signaling, RTCP used with RTP for voice transport with mentioning available codec (the

encoding format of voice), it uses TCP or UDP for transporting at transport layer where data is in

segment format.

Transport Control Protocol (TCP)

It is an IP protocol that allows packet retransmission, packet order management and

receipt acknowledgement.

To achieve this goal, TCP carries additional information that adds weight to the packet.

That is why it is not recommended for real time applications like voice.

User Datagram Protocol (UDP)

UDP is another transport protocol.

It divides information into packets called datagrams.

This protocol doesn't care if the data arrives with errors or if it doesn´t arrive at all. That

is the main difference with TCP.

This is why it introduces little extra weight to the IP packet which makes it ideal for real-

time applications like voice.

Page 43: Ip telephony system  sip

29

Then internet protocol IP version 4 which is a 32 bit logical addressing is used for transmitting

data in packet format at network layer. So the relations with these protocols are given bellow

through a figure:

Figure -2.7: Relationship between protocols [22]

Page 44: Ip telephony system  sip

30

2.10 The Voice Transfer Process at IP Telephony

The steps to transfer the voice over the IP networks are given below:

• IP telephony means transmission of voice over IP networks. The basic steps for

transmitting voice over IP network are listed below and illustrated in Figure-1.

• Audio from microphone or line input is A/D (Analog to digital conversion of voice)

converted at audio input device.

• The samples are copied into memory buffer in blocks of frame length.

• The IP telephony application estimates the energy levels of the block of samples.

• Then the voice samples are encoded by the coded with the selected algorithm like GSM,

G.711 and G.729 etc.

• Some header information is added to the block to transport the voice over the IP network.

• The block with headers is written into socket interface (UDP).

• The packet is transferred over a physical network and received by the peer.

• The header information is removed, block of audio is decoded using the same algorithm

it was encoded, and samples are written into a buffer.

• The block of samples is copied from the buffer to the audio output device.

• The audio output device D/A converts (Digital to analog conversion of voice) the

samples and outputs them [22].

Page 45: Ip telephony system  sip

31

Analog Voice

Figure – 2.8: Basic idea of IP telephony voice processing [22]

So this process requires simple five steps:

• Voice digitalization

• Voice processing

• Voice coding using different codec

• Packet preparation and

• Sending them to the packet based network.

01010101………

Sampling & Quantization

Page 46: Ip telephony system  sip

32

2.11 Available Codec’s for Encoding Data

To encode data or voice several algorithms are used these algorithm is called codec. After

encoding it is transmitted over RTP. Encoding can sever to reduce the change of errors, as well

as to minimize the amount of bandwidth used [19].

Table – 2.3: The table of codec with required bandwidth [19]

Page 47: Ip telephony system  sip

33

2.12 Simple Mail Transfer Protocol (SMTP)

Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-mail)

transmission across Internet Protocol (IP) networks. It is a application layer protocol. SMTP uses

TCP port 25.

An SMTP transaction consists of three command/reply sequences (see example below.) They

are:

1. MAIL command, to establish the return address. This is the address for bounce

messages.

2. RCPT command, to establish a receiver of this message. This command can be issued

multiple times, one for each recipient. These addresses are also part of the envelope.

3. DATA to send the message text [1, 2 & 3].

2.13 Post Office Protocol (POP)

Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail

clients to receive or recover e-mail from a remote server over a TCP/IP connection. The POP

protocol has been developed through several versions, with version 3 (POP3) being the current

standard. Emails are downloaded to user's machine unless they specifically leave a copy on the

server. You can view previous load messages even when you are not connected to the Internet [1,

2 &3].

2.14 Internet Message Access Protocol (IMAP)

The Internet Message Access Protocol (commonly known as IMAP) is an Application Layer

Internet protocol that allows an e-mail client to access e-mails stay on the server. This allows

access from multiple clients such as a web interface and fat clients like Microsoft Outlook on a

remote mail server. You must be connected on a network that can access the server [1, 2 & 3].

Page 48: Ip telephony system  sip

34

Chapter 3

Understanding Linux, Elatix, Asterisk & Call Center

3.1 Introduction to Linux

In this chapter I will explain the command that I have used to do my work in Linux. Some

operating systems kernel supports Linux that are given bellow:

Operating System: Kernel Type: Description:

Ubuntu Linux User-friendly Linux

distribution based on Debian

Fedora Linux Free community-based

distribution that serves as a test

bed for new technologies that

feed into Red Hat Enterprise

Linux

CentOS Linux Free binary-compatible clone

of Red Hat Enterprise Linux

Redhat Enterprise Linux Linux Popular commercial Linux

distribution created by Red Hat,

Inc.

Table – 3.1: Operating System (OS) & their kernel type [21, 4]

Page 49: Ip telephony system  sip

35

Linux supports for all the latest hardware and provides a user-friendly installation process. Linux

is made with one thought in mind: Everything is a file.

3.2 The table below lists the main directories commonly used across all platforms

In Linux file systems lowest folder root / contains the following folders:

Directory:

Purpose:

/etc Host-specific system configuration

/bin Essential user command binaries (for use by all

users)

/boot Static files of the boot loader, only used at system

startup

/opt Add-on application software packages

/usr usr is the second major section of the filesystem.

/usr is shareable, read-only data

/var /var contains variable data files. This includes

spool directories and files, administrative and

logging

data, and transient and temporary files.

/root

Home directory of the root user

/proc System information stored in memory mirrored as

files.

/lib

Shared libraries used by various programs

/dev

Device files

Table – 3.2: Directories of Linux & their respective purpose [4]

Page 50: Ip telephony system  sip

36

3.3 Important Files

This table shows the some important files & their purpose:

File: Purpose:

/etc/passwd

User account settings

/etc/group

Group settings

/etc/hostname

System host name setting

/etc/resolv.conf

DNS setting

/etc/hosts.deny

Network hosts not allowed to connect to the system

/var/log/messages

Kernel messages log file

/etc/inittab

System startup settings

Table – 3.3: Important file location in Linux [4]

3.4 Some Useful Command in Linux

Command: Purpose:

whatis

Display a description of the specified

command

ls

List the contents of a directory

pwd

Display the current/working directory.

cd

Change (navigate) directories. For example ‘cd

/etc/asterisk’, by this command we can go to to

view asterisk configuration files.

tree

Display the contents of a directory in a tree

hierarchy format.

date Displays the date and time.

Page 51: Ip telephony system  sip

37

Table – 3.4: Some useful command in Linux and their respective purpose [4]

The command ‘ls’ purpose is the list the files of the current directory. This command can use in

various format with various purpose that are given below:

Command: Purpose:

ls -l List the file in details

ls -la List the hidden files

ls -lh List file sizes in "human readable format" (KB, MB, etc.)

ls -d [DIRECTORY]

List only the specified directory (not its contents)

Table - 3.5: Various purpose of ‘ls’ command [4]

cal Display a calendar on the command line.

Clear Clear the contents of the current screen.

exit

Exit the current shell. Logout Logout of the system.

History Display commands that have recently been executed.

Reboot Reboot the system file

Display the file type of the specified file.

date -s HH:MM

Set the time (HH is for hour & MM is for minute )

date -s MM/DD/YYYY

Set the date, month & year

Page 52: Ip telephony system  sip

38

3.5 Some Advanced Shell Features & Command

Command: Purpose:

mv [source path] [Destination Path]

Move or rename files and directories. For

example:

mv /var/www/index.html /root/index.html

Here the command the ‘mv’ moves the

index.html files from the variable directory to

root.

cp [Source path] [Destination path]

Copy files from one directory to another

directory

rm [a specific directory file path]

remove files from the specific directory

mkdir rmdir

Create & remove directories.

ln -s [Source path] [Destination path]

Create links (shortcuts) to files or directories. For example: the command ‘ln -s /usr/share/squirrelmail/ /var/www/index.php’ creates a symbolic link for the file index.php between usr & var directories.

Table – 3.6: Some advanced shell features & command in Linux [4]

3.6 Text Editing and Extraction Command

Command: Purpose:

vi/vim

Full featured text editor. For example vim /etc/resolv.conf in ubuntu edit the file for DNS configuration setting.

Page 53: Ip telephony system  sip

39

cat

Concatenate files and display their contents. For example the command ‘cat /etc/elastix.conf’ gives the root & admin password of elastix.

Table-3.7: Some text editing and extraction command [4]

3.6.1 Most Useful Commands for vi or vim

Key (s) Function: Key(s) Function:

:w Save Yy Copy current line

:x Save & exit R Replace text before

cursor

:q Quit R Replace text after

cursor

I Insert text before

I Insert text after

A Append text before

A Apped text after

Table – 3.8: Some essentials commands for vi/vim commands [4]

3.7 Some Commands for User, Group & Security

Command: Purpose:

Sudo Run a single command as a different user

Su Switch user account

Who Display who is login in the system

Whoami Display current user identity

Chmod Change file & directory permissions

Page 54: Ip telephony system  sip

40

Passwd Change passwords

Useradd

userdel

Create user account

Delete user account

Finger Display information about user account

Table -3.9: Some essential commands for user, group & security [4]

3.8 Some Useful Network Commands

Command: Purpose:

hostname -f Displays the systems hostname

Ifconfig Display network interfaces. Such as IP,

Broadcast address etc.

Iwconfig Display wireless network interfaces

ifup/ifdown Enable/disable network interfaces

ping www.goole.com Gives the TTL (Time to Live) response if the

server connected with internet.

Route Display & configure TCP/IP route

Ssh Client for connecting to remote server via SSH

protocol (Secure Shell Protocol)

Mail Send email to local & remote users.

Setup Setting IP through DHCP or statically with

default gateway & DNS in centos based Linux.

service network restart or

/etc/rc.d/init.d/network restart

Restart the network interfaces in centos based

Linux

vi /etc/network/interfaces Setup IP via DHCP or statically in Ubuntu

vi /etc/resolv.conf Setup DNS as nameserver at ubuntu

/etc/init.d/networking restart Restart the network interfaces at ubuntu

Table – 3.10: Some useful network command & their purpose [4]

Page 55: Ip telephony system  sip

41

3.9 Introduction to Elastix

Elastix is a collection of best open source programs and tools which are combined together and

finally create a comprehensive IP PBX powered by asterisk that provide free communication

system via IP network. It is designed properly and gives you a PBX system that can compete

with others, not only because of PBX part but also because it is capable of creating a powerful

system with other products and programs.

3.9.1 Important Parts of Elastix

• Asterisk: as the core PBX (Private Branch Exchange), digium is most well-known

product

• VTigerCRM and SugarCRM: as a communication system with customers

• A2Billing: program to pay bills of Asterisk

• Flash operator panel: operator console which is like monitor display.

• Hylafax: a software fax system

• Openfire: a server with dialogue system, sending text and telephone network

• Conferencing: is an controlling devise

• freeBPX: an application tool for Elastix

• A report system: part of Elastix that provide CDR (Call Detail Report) report

• Postfix: a popular mail server

• CentOS: it is a version of Linux that elastix support as the command mode. By using

this platform of Linux (CentOS), elastix company provide supports for reporting,

diagnosing the hardware, network setting, module of updating software, backup

module, managing users and other modules.

• By using the PBX of Elastix we can create extension, trunks, IVR (Interactive

Voice Response), follow me, callback, DISA (Direct Inward System Access),

incoming route & outgoing route of a call etc. [11,13]

Page 56: Ip telephony system  sip

42

3.9.2 Initial Installations of Elastix

The version of elastix that I have installed for my work is Elastix-2.3. I have downloaded the

ISO file of elastix from the site is given bellow:

http://www.elastix.org

After downloading the ISO file I need to follow the following steps as given bellow:

• Burn the ISO image that I have just downloaded to a blank CD.

• Ensuring PC will boot from the CD. If necessary change the BIOS settings I have to

enable this.

• NOTE: This will erase all data on the hard drives of the PC.

• Boot Elastix box with the CD in the CD Drive and press enter. After a few seconds, the

following screen will appear. You press F2 to see the various options. However, it is not

really necessary. Just press [Enter] to start the installation.

For installing Elsatix in my PC I have to take help from the on line tutorials that I will mentions in the

reference [3].

Once Elastix has been installed, we may log in to elastix using username as root which is a

directory of Linux & root password that I have given during installation, if we need to do any

command line task.

[root@elastix ~]#

Page 57: Ip telephony system  sip

43

3.9.3 Asterisk & Elastix Software Configuration Requirements

After successful installation of elastix, to configure my PBX at elastix the requirements are given

below:

• By creating only extension at elastix PBX users can communicate within the similar

domain or in a similar network.

• But to integrate my PBX with other network and also with the mobile operators like

Grameen Phone, Banglalink, Robi etc., we need connect with ICX (Interconnection

Exchange). Dhakacom has connection with BTCL through multiplexing device (E1) &

this company also have VOIP license from the government. Therefore BTCL has given a

prefix of 09611 for creating the IP numbers & these numbers are registered at a SIP

register server which is 202.4.97.11.

• I can connect my PBX with others systems by creating trunks at elastix which requires a

registered VOIP number and the corresponding secret number that has given at SIP

registered server of dhakacom. For research and development purpose I have used three

VOIP number with prefix 09611 such as 09611689530, 09611689531, 09611689532.

3.9.4 Solving a Practical Problem through Elastix PBX

Dhakacom authority has given me a number 09611689532, through this number I have to create

200 to 208, total 9 extensions in Elastix PBX. For this 9 extensions (200 to 208) I have to create

an IVR by this a caller can get connection through a voice that asked him to press 1 to get

connection with extension 200, press 2 to get connection with extension 201, sequentially press 9

to get connection with extension 208 & if the caller press 0 then the IVR voice will repeat again.

3.9.5 To solve this problem I have to follow the following steps

Step-1: Getting connection to the Elastix server by SSH (Secure Shell Protocol) software

(for command mode)

After successful installation of Elastix, I need to assign an IP address for my server. To do this I

have to give the command “setup”, after that go the Network configuration option to give IP

address.

Page 58: Ip telephony system  sip

44

Figure- 3.1: Assigning IP address to server

In network configuration I have selected DHCP (Dynamic Host Configuration Protocol) mode to

get the IP automatically not statically.

Figure- 3.2: Selecting DHCP mode

Page 59: Ip telephony system  sip

45

Giving DNS (Domain Name Service) to my server of connecting network:

Figure- 3.3: Giving DNS of connecting network to the Elastix server

To restart my server, I have to give the command “service network restart” at elastix server.

Then by the command “ifconfig” I can get server IP address. Now I can remotely connect to the

server through SSH software using server IP address & password:

Figure- 3.4: Remote Connection to my server through SSH software

Page 60: Ip telephony system  sip

46

Figure- 3.5: SSH software screen after login

Step-2: Login to Elastix Graphically

In order to login at graphical mode of Elastix, I have to give my IP address: 172.16.1.111, at

Mozilla Firefox.

Page 61: Ip telephony system  sip

47

Figure- 3.6: Screen after giving IP at Mozilla Firefox

After clicking at “I understand the Risk”, I can get the following page as given bellow. There I

have to give: user name: admin, Password: 123456 (that I have given during installation of

Elastix).

Page 62: Ip telephony system  sip

48

Figure-3.7: Elastix login page

Then I can login to the graphical mode of Elastix as bellow figure:

Figure-3.8: After login at Elastix

Page 63: Ip telephony system  sip

49

Now, I have to click on the PBX option to create Extension, Trunks, IVR, Inbound Route,

Outbound Route, Ringer Groups, callback etc.

Step-3: Creating Extension

We need to create a few SIP extensions. Therefore you should select “Generic SIP Device” from

the device drop-down list then click “Submit”.

Figure-3.9: Adding SIP extension at Elastix

Page 64: Ip telephony system  sip

50

Figure-3.10: Creating an extension at Elastix

Here, we need to give display name, extension number, a secret & the outbound CID number. By

following the same way I have created other extensions.

Page 65: Ip telephony system  sip

51

Step-4: Creating Trunks

Trunk is used for connecting Elastix with outside and other systems. As we have a number

09611689532, therefore we have to create only a single Trunk. SIP trunk is used for connecting

to Gateways and VoIP providers with SIP protocol. Here I mentioned how to open a SIP trunk

through a picture.

Figure-3.11: Creating a SIP Trunk

Page 66: Ip telephony system  sip

52

3.9.6 Dial Patterns

The dial patterns is the group or pattern of digits that asterisk uses to check if the number marked

by the internal extension “goes” with the pattern configured on the outgoing route and in this

way an extension can determine the channel through which the call will be sent.

There are rules on how to specify dial pattern, which we indicate below:

Pattern Description

X Represents any digit 0-9

Z Represents any digit 1-9

N Represents any digit 2-9

[1237-9] Represents any digit between brackets

. Represents one or more characters

| Separates the number on the left from the dialed

number. For example: 9|NXXXXXX should

represent the dialed numbers as “92234567” but

should only pass “2234567”

Table – 3.11: Dial Pattern [11]

3.9.7 Caller ID Number

CID Number is the Caller ID or phone number from which the call received by Elastix

originated. If this field is left blank, then it will refer to incoming calls with any Caller ID.

3.9.8 DID Number

DID is Destination-Inward-Dial. DID number will normally be the phone number for dhakacom

it is like 09611689532, the caller dialed to reach another destination.

Page 67: Ip telephony system  sip

53

Step-5: Creating Interactive Voice Response (IVR)

(IVR) interactive voice response is said to digital receptionist. An IVR plays the recorded text to

the caller and ask them to press the key to connect to an organization, work group, a person or

etc. Then IVR send the call to the destination.

To setup IVR at first I have to upload a voice file with WAV format to the Ealstix for this I have

to click at system recordings. Then I have found a screen as given bellow:

Figure-3.12: Uploading a voice at WAV format to Elastix

After upload the voice, I have to click to the Announcements at elastic. It is used for recorded

messages for IVR. It should be recorded already and added to the message list of freepbx from

system recordings. At announcements I have found a screen as given bellow:

Figure-3.13: Creating an announcements

Page 68: Ip telephony system  sip

54

Here, I have to add a Description, at Recording I have to select the voice for IVR that I have

uploaded to my system.

After that I have to go to the IVR, there I have found a screen as given bellow figure:

Figure-3.14: Creating Interactive Voice Response (IVR)

Here I have to add the Announcement that contains the voice that I have created earlier & then I

have to choose the extensions for the connection with press 1 for 200, press 2 for 201 & so on.

But to hear the IVR voice again the caller has to press 0.

Page 69: Ip telephony system  sip

55

Step-6: Add Ringer Groups

Ring group is a group of extensions that ring by external incoming calls simultaneously. You can

add your mobile number if you want (you should have a trunk and a route, if you want your

mobile phone ring).you can have a ring group for per incoming trunk or have one ring group for

all trunks.

Figure-3.15: Creating Ringer Groups

Here, I have to select all the extensions 200 to 208 to create the ringer group to get the

simultaneous call. Here I can add my cell phone number to get phone.

Page 70: Ip telephony system  sip

56

Step-7: Add incoming Route

This is where the behavior of incoming calls from all trunks is being handled. When an incoming

call from PSTN, from any mobile operator or VoIP trunk is received, asterisk needs to know

where to direct it. It can be directed to a ring group, an extension, Digital Receptionist (IVR) or

Queue. For this purpose, Inbound Route needs to be set up. Select the Inbound Routes selection

in the left bar of the screen. As I want to hear the IVR voice for all kind of incoming calls for this

we will redirect all the incoming calls to the IVR.

Figure-3.16: Configuring Incoming Route

Page 71: Ip telephony system  sip

57

Step-8: Add Outbound Route

An outbound route works like a traffic cop giving directions of road to users to use a specific

path or route to reach a predefined destination.

Every time you dial a number, asterisk will do the following in strict order:

• Examine the number you dialed.

• Compare the number with the dial pattern that you have defined in your route 1. If

matches, it will initiate the call using that specific trunk. If it does not, it will compare the

number with the pattern you have defined with route 2 and so on.

• Pass the number to the appropriate trunk to make call.

Figure-3.17: Configuring Outbound Route

Page 72: Ip telephony system  sip

58

Step -8: Login to the extensions that I have created earlier through the soft dialer

For this I have to download a soft dialer form www.dhakacom.com, the name of the soft dialer is

pangolin.

Figure -3.18: Login to the soft dialer

Here I have to give extension number, password that I have given during creating extension &

my server IP address with the default switch port number 5060 fixed for SIP protocol. Then I can

login my extension, through this I can make call & receive a call through the IVR voice if the

user press 1, as I have logged at extension 200.

Figure-3.19: Soft Dialer after login

Page 73: Ip telephony system  sip

59

3.9.9 Call Back System at Elastix

A callback will hang up on the caller and then call them back, directing them to the selected

destination. It is used in situation that the caller cannot access to the VoIP endpoint and do not

want to pay the cost of long distances. This is useful for reducing mobile phone charges while

inbound calls are significantly cheaper than outbound calls. Destination of callback can be any

resources defined in PBX (like extension, voicemail, IVR, queue or…) or be used like a complex

with DISA, which explained later, that caller receive a beep sound and be able to dial.

3.9.10 to setup callback system we need to follow 4 steps

1. Creating DISA

DISA is Direct Inward System Access. By creating DISA any one can make call through a

password (PIN) from home (mobile) through his/her office IP PBX number. For having DISA or

the service of accessing to dial tone from outside, click on menu in left side of the page on the

DISA, below the internal option and configuration as follow:

Figure-3.20: Creating DISA for callback system

Page 74: Ip telephony system  sip

60

2. Creating Callback

To create callback I have to click on menu in left side of the page on the callback. Then I have

found the page as given bellow:

Figure-3.21: Creating Callback at Elastix

Here I have given my cell phone number to get auto callback form elastix server for this I have

to set DISA as the destination after callback.

Page 75: Ip telephony system  sip

61

3. Creating Inbound Route

At inbound route that I have discussed earlier I have to give my cell phone number as the caller

ID, a VOIP number as DID number & then i have to set the destination of the incoming call at

callback that I have created for my cell phone number.

Figure-3.22: Configuring the incoming route for the callback system

Page 76: Ip telephony system  sip

62

3.9.11 Follow Me

Follow me is another feature of elastix that provides a user if he/she is not present at office &

then the incoming calls at his/her IP PBX number will forward to his/her mobile by configuring

follow me. Here I have mention my cell number followed by the # key by choosing a particular

extension as like as the bellow figure:

Figure-3.23: Configuring “follow me” at elastix

Page 77: Ip telephony system  sip

63

3.10 Elastix in Command Mode

Form above discussion we can see that, I have done my work at elastix in graphical mode via

GUI (Graphical User Interface) using my server IP address at mozila firefox. But we can monitor

our work at command mode of centos based Linux platform using some useful command.

Suppose the extension, trunk, follow me, callback, IVR etc the features of elastix PBX that I

have created in graphical mode, I can check this in command mode either I have done it

successfully or not, which give an opportunity to me to monitor my system.

As elastix is a open source PBX system powered by asterisk we have to go to asterisk

configuration files through cd (change directory) command as like as bellow command:

[root@rnd ~]# cd /etc/asterisk

Then the command ‘ls’ list the entire asterisk configuration as like as following figure:

Figure-3.24: Asterisk configurations files

Page 78: Ip telephony system  sip

64

Now we want to see the SIP extension & SIP trunk configuration files. To view this I have to give the following command:

[root@rnd asterisk]# vim sip_additional.conf

3.10.1 A SIP Extension Format

[100]

deny=0.0.0.0/0.0.0.0

secret=1234

dtmfmode=rfc2833

canreinvite=no

context=from-internal

host=dynamic

type=friend

nat=yes

port=5060

qualify=yes

dial=SIP/100

mailbox=100@device

permit=0.0.0.0/0.0.0.0

callerid=device <100>

faxdetect=no

3.10.2 A SIP Trunk Format

[Morshed]

host=202.4.97.11

username=09611689531

secret=79965586628

type=peer

insecure=port,invite

dtfmmode=rfc2833

Page 79: Ip telephony system  sip

65

disallow=allow

allow=g729

allow=g711

context=from-trunk-sip-Morshed

3.10.3 Asterisk Manager CLI Commands

Here we can monitor out PBX system by using some commands:

[root@rnd asterisk]# asterisk -cvvr

Asterisk 1.8.7.0, Copyright (C) 1999 - 2011 Digium, Inc. and others.

Created by Mark Spencer <[email protected]>

Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.

This is free software, with components licensed under the GNU General Public

License version 2 and other licenses; you are welcome to redistribute it under

certain conditions. Type 'core show license' for details.

=========================================================================

== Parsing '/etc/asterisk/asterisk.conf': == Found

== Parsing '/etc/asterisk/extconfig.conf': == Found

Connected to Asterisk 1.8.7.0 currently running on rnd (pid = 2546)

Verbosity is at least 3

rnd*CLI> sip show registry

Host dnsmgr Username Refresh State Reg.Time

202.4.97.11:5060 N 09611689532 45 Registered Wed, 03 Apr 2013 10:41:53

202.4.97.11:5060 N 09611689531 45 Registered Wed, 03 Apr 2013 10:41:53

Page 80: Ip telephony system  sip

66

2 SIP registrations.

rnd*CLI> sip show peers

Name/username Host Status

100 (Unspecified) UNKNOWN

101 (Unspecified) UNKNOWN

200/200 172.16.3.60 OK (38 ms)

201 (Unspecified) UNKNOWN

202 (Unspecified) UNKNOWN

Morshed/09611689531 202.4.97.11 5060 Unmonitored

Morshed2/09611689532 202.4.97.11 5060 Unmonitored

5 sip peers [Monitored: 1 online, 3 offline Unmonitored: 2 online, 0 offline]

rnd*CLI> sip show channels

Peer User/ANR Call ID Format Hold Last Message Expiry Peer

202.4.97.11 09611689531 63495abb293cb1b 0x0 (nothing) No <guest>

202.4.97.11 09611689532 3c616d277cbcde4 0x0 (nothing) No <guest>

2 active SIP dialogs

Similarly some other LCI command such as

• sip show users: shows the SIP extensions with password

• sip reload: reload sip.conf files

Command to restart the asterisk:

• service asterisk restart

Page 81: Ip telephony system  sip

67

3.11 Understanding Asterisk at Ubuntu 3.11.1 Introduction

Asterisk is open source PBX (Private Branch Exchange) telephony system software. It is runs on

virtually any Operating System (OS) like ubuntu, centos, Fedora etc. It supports most of the

VOIP protocols like SIP, H.323 etc. It is also support many different hardware telephony cards.

3.11.2 Basic Asterisk Configurations

There are so many versions in Asterisk. Mostly we use 1.4 & 1.6 version.

3.11.3 Installing Asterisk on Linux Server

To install asterisk first we need to install Linux server. For this I have used Ubuntu Linux server

12.4 version. After successfully installation of Ubuntu server, I have to run following commands:

To login at ubuntu server I have give username: rnd & password:123456, that I have given

during installation.

#sudo su ; to enter the sudo to run sudo command as the different user

Then I have to give sudo password that I have given during installation.

#vi /etc/network/interfaces ; to assign IP address

Here I set it as DHCP (Dynamic Host Configuration Protocol) to set network interface

dynamically

#vi /etc/resolv.conf ; to give DNS (Doamin Name service as nameserver)

#etc/init.d/networking/restart ; network interface restarting command

#ping www.google.com ; to check the server is connected with internet

Then I got the TTL (Time to Live) responses, meaning that the server is connected with internet.

Page 82: Ip telephony system  sip

68

#apt-get update ; to update my ubuntu kernel

#apt-get upgrade ; to upgrade my ubuntu kernel

To install asterisk at ubuntu server I have to run following command

#apt-get install asterisk ; to install the asterisk at ubuntu

#cd /etc/asterisk ;to go to the asterisk configuration files

#ls ;list the asterisk configuration files

#asterisk –cvvvvvvvvvvr ; to go to asterisk CLI command window

#arp –v ; to check the version of asterisk that I have installed

3.11.4 Asterisk File Locations

• /etc/asterisk/ - Asterisk configuration files

• /var/lib/asterisk/ - contains the astdb, firmware and keys

• /usr/share/asterisk/sounds - in built asterisk sound prompts

• /var/spool/asterisk/ - temporary files and voicemail files

• /var/log/asterisk/ - Asterisk log files

• /var/log/asterisk/cdr-csv/ - Asterisk call detail records [17,22]

Page 83: Ip telephony system  sip

69

3.11.5 Asterisk Configurations Details

Text based configuration files

• sip.conf

• extensions.conf

3.11.6 SIP.Conf

Here I have opened two extensions 400 & 401 and a trunk under the DID number 09611689532.

# cd /etc/asterisk

# vim sip.conf

SIP Registration Method

register => 09611689532: [email protected] ; to register the SIP trunk at asterisk

[202.4.97.11] (Creating SIP trunk)

username=09611689532

secret=74152698393

type=friend

caller id = 09611689532

host=202.4.97.11

port=5060

nat=yes

dtfmmode=rfc2833

insecure=very

Page 84: Ip telephony system  sip

70

canreinvite=no

disallow=all

allow=g723.1

allow=g729

allow=ulaw

allow=alaw

allow=gsm

[400] (user SIP extension 400)

type=friend

user=400

callerid=09611689532

secret=1234

context= my-phones

allow=all

host=dynamic

[401] (user SIP extension 401)

type=friend

user=401

callerid=09611689532

secret=1234

context= my-phones

allow=all

host=dynamic

Page 85: Ip telephony system  sip

71

3.11.7 extensions.conf

To give the incoming and outgoing route for the extension that I have created I need to add these

files are given below at extensions.conf file:

#vim extensions.conf

[outgoing_calls] ; to give the path for outgoing calls

exten => _X.,1,Dial(SIP/${EXTEN}@202.4.97.11)

exten => _X.,n,Hangup()

[incoming calls] ; to give the path for outgoing calls

static=yes

exten=>_01XXXXXXXXX,1,Set(CALLERID(num)=09611689532)

exten=>_01XXXXXXXXX,2,Dial(SIP/202.4.97.11/${EXTEN})

exten=>_01XXXXXXXXX,3,Hangup()

exten=>_+8801XXXXXXXXX,1,Set(CALLERID(num)=0961168${CALLERID(num)})

exten=>_+8801XXXXXXXXX,2,Dial(SIP/202.4.97.11/${EXTEN})exten=>_+8801XXXXXX

XXX,3,Hangup()

exten=>_02XXXXXXX,1,Set(CALLERID(num)=0961168${CALLERID(num)})

;exten=>_+8801XXXXXXXXX,1,Set(CALLERID(num)=09611689701)exten=>_02XXXXXX

X,2,Dial(SIP/202.4.97.11/${EXTEN})

exten=>_02XXXXXXX,3,Hangup()

exten=>_096XXXXXXXX,1,Set(CALLERID(num)=0961168${CALLERID(num)})

exten=>_096XXXXXXXX,2,Dial(SIP/202.4.97.11/${EXTEN})

exten=>_096XXXXXXXX,3,Hangup()

[my-phones]

exten => 400,1,Dial(SIP/400) ; for internal call

exten => 401,1,Dial(SIP/401) ; for internal call

include => outgoing_calls

include => incoming_calls

Page 86: Ip telephony system  sip

72

Then I have to restart my asterisk by using following command:

# cd /etc/asterisk

# service asterisk restart

# asterisk –cvvr

• module reload

• sip show registry (show the registered trunk)

• sip show users (show the available extension 400 & 401)

3.12 Dual Tune Multi Frequency (DTFM) Mode

• DTMF used for telecommunication signaling to find out the dialed key press by the used

by using default frequency in 2 dimensional method.

• They are two simultaneous mixed tones.

• They are used to send digits or certain characters through an analog line.

3.12.1 DTMF Frequencies

Each key or character represents by 2 dimensional frequencies as like as following figure:

Figure-3.24: DTMF frequencies & with character [22]

Page 87: Ip telephony system  sip

73

3.13 Network Address Translation (NAT)

In networking the private IP addresses using mask get internet connection via a real IP address.

This concept is known as Network Address Translation. Actually NAT is the modification of IP

address. In asterisk nat=yes, enable all the fake extension that I have created (400 & 401) to the

internet under the trunk which is at real IP in that case it is 202.4.97.11.

3.14 SIP Configuration Details

• allow = <codec> : Allow codec’s in order of preference (Use DISALLOW=ALL first,

before allowing other codec’s)

• disallow = all : Disallow all codec’s (global configuration)

• context = <context name>: The context in section of an endpoint is used to route calls

from that endpoint to the wanted destination. The context body is located in

extensions.conf.

• dtmfmode = inband|info|rfc2833 (global setting). Default is rfc2833.

• host = dynamic for default, hostname or a particular IP Address. It is the domain or host

name for the SIP server.

• secret: If Asterisk is acting as a SIP Server, then this SIP client must login with this

Password (A shared secret).

• type = user | peer | friend:

peer: A SIP entity to which Asterisk sends calls (a SIP provider for example).

user: A SIP entity which places calls through Asterisk (A phone which can place calls only). Users authenticate to reach services with their context.

friend: An entity which is both a user and a peer. This make sense for most desk handsets and other devices.

• port: SIP port of the client by default it is 5060.

• nat =yes | no: the value yes activate the network address translation mode.

• canreinivte: yes | no: canreinvite = yes : allows RTP media direct canreinvite = no: deny re-invites message

Page 88: Ip telephony system  sip

74

• insecure=port | invite:

insecure = port: Allow matching of peer by IP address without matching port number.

insecure = invite: Do not require authentication of incoming INVITEs.

insecure= port, invite ; (meet both criterions) [22,14,15]

3.15 Call Center at Elastix 3.15.1 Introduction to Call Center at Elastix

Call center module is one of the add-ons of Elastix that can be installed optionally. This module allows having a call center with dynamic queue by defining an agent. This module has different part and services such as browser page of agents, do automated calls advertising (Telephone marketing), Very detailed reports of agents, their operation and performance etc.

Call Center module is a basic implementation of an administrator for a call center. A group of people (called agents) take calls managed by the software and fill forms with the results of their dialogue with the person contacted (contact).

3.15.2 Features of Elastix Call Center Module

• Two modes of operation. They are: in the outbound mode, load a list of phone numbers as Microsoft excel csv file, and the system starts to generate calls to be connected with the agents through a line of Asterisk. In the way of incoming calls, prepares a queue to receive calls coming into the system.

• You can define forms that will be used to gather information from the call. You can associate multiple forms with a single campaign.

• Download the information collected through the forms in CSV format. • Various reports. • Callback Login. • Monitoring Campaigns.

3.15.3 Installing Call Center Module at Elastix

Install it by go to Elastix > Addons > Call Center > Install. Wait for a while until the process

finish.

Page 89: Ip telephony system  sip

75

3.15.4 Configuration of Call Center Module

To configure call center module I have to follow a few steps are given bellow:

Step-1: Opening agents

This allows us to enter the data of the people going to operate the system and have been named

agents. Each agent must have a number and password assigned in order to make or receive calls.

Figure-3.25: Creating agents at elastix call center

To open agent go to call center < click at agent option. Here I have to agent number, name, and

password.

Page 90: Ip telephony system  sip

76

Step-2: Creating Forms

To create forms click at forms of call center module. This window allows the creation of forms,

which are created with the objective of collecting data to run a campaign and make calls from the

agent console.

Figure-3.26: Creating forms at call center for collecting data

Step-3: Build queue for incoming & outgoing call

The meaning of queue is the same that we all know. Whenever your request is more than the

resources or service providers, you need a queue. In the other word, in call center if you want to

reply to the callers with limited number of receptionists, you need a queue. When the

receptionists are busy, you keep the callers in queue until one can answer. This is the main task

of queue.

Page 91: Ip telephony system  sip

77

Queues are designed for receiving calls in a call center. They allow monitoring of calls received

by an agent and help to determine if a call was connected successfully or failed to be received.

To build queue I have to go PBX < click at queue & then I have seen a window as bellow figure:

Figure-3.27: Building queue at elastix PBX

Page 92: Ip telephony system  sip

78

Here I have to give the agent number that I have created in step-1. Similarly I have created

another queue for outgoing calls.

Step-4: Select queue for incoming calls

After creating queue at incoming call I have to select the queue at ingoing calls of call center

module as like as bellow figure.

Figure-3.28: Selecting queue for ingoing calls at call center

Step-5: Creating Groups

We need to allow agents to login into our Elastix system to view the agent’s console. This

console will tell the agent which incoming queue coming from, how long is the call durations,

what type of calls that coming in and much more. This will be configured later. Go to Elastix >

System > Users > Groups > Create New Groups. Enter information as below figure:

Page 93: Ip telephony system  sip

79

Figure-3.29: Creating groups for agents

This group that I have created above has to permissions to see only the agent console. For this I

have to go at Group permissions & select agent console icon for this group.

Figure-3.30: Selecting agent console for group permissions

Page 94: Ip telephony system  sip

80

Step-6: Creating users

This will be used by call center agents to login into Elastix system to view campaign, calls and

also view the phone book. Here I have to assign the agent extension & password that I have

given at step-1 for agent login to the soft dialer. Go to Elastix > System > Users > Create New

User and enter agent details as below figure:

Figure-3.31: Creating users for agent login

Step-7: Creating CSV files at Microsoft excel

At Microsoft excel I can create CSV files it contains the customers cell numbers & name. By

uploading this CSV file to the system I can generate auto calls to the customers. As bellow

figure:

Page 95: Ip telephony system  sip

81

Figure-3.32: CSV file with customers cell number & name

Step-8: Creating outgoing campaigns to upload CSV file to the system

Every incoming calls and outgoing calls that agents will call/receive need to be through a

campaign. Inside this campaign, we will insert which queue, which form and some description

for the caller’s type. Go to Elastix > Call Center > Ingoing Calls > Ingoing Campaigns >

Show Filter > Create New Campaign and enter required details as screenshot below:

Page 96: Ip telephony system  sip

82

Figure-3.33: Creating outgoing campaigns

Page 97: Ip telephony system  sip

83

Step-9: Login at agent

To login at call center agent, go to call center<click agent console. Then I have found the

following figure:

Figure-3.34: Agent console page at call center module

Here I can select my agent number & SIP extension number. Now I have to login at extension

100, using soft dialer through password & my server IP address. When I click at enter of agent

console (above figure), I will get a call automatically at extension 100 form anonymous. After

receiving this call I can login to the agent by using agent password following by the # key as the

bellow figure:

Page 98: Ip telephony system  sip

84

Figure-3.35: Giving agent password for agent login through soft dialer

After successful login at agent, the agent will make call according to the uploaded CSV file cell

number at outgoing campaigns & If the customer receive the call I will see bellow figure:

Figure-3.36: Agent connected with customer -1 according to the uploaded CSV file

Page 99: Ip telephony system  sip

85

The script that I have written during creation of outgoing campaigns, agent can see this by

clicking at call script. Script provides steps or information for the agent to follow during the

campaign; example: Hi, I am from Dhaka com limited …... etc. The script will depend on the

type of campaign being conducted as like as bellow figure:

Figure-3.37: Call Script at agent

Page 100: Ip telephony system  sip

86

The agent can save data from the customers by clicking at Call From as like as the figure shown

below:

Figure-3.38: Saving data to the CSV file through the Call Form by the agent

When the call is finished the system will generate next call according to the CSV file & for this

the agent can do the same thing that mentioned above steps.

Left side of above figure we can see some options that a agent can use such as hang-up the call,

take break for this the admin have to create a particular break time, transfer call to the other

agents or another extension and agent can logout form the system by clicking at end session.

The data that CSV file contains we can download it form outgoing calls & ingoing calls as like

as bellow figure:

Page 101: Ip telephony system  sip

87

Figure-3.39: CSV file after downloading form the elastix server

Similarly agents can save data for all incoming calls. If there are no calls the agent login page

shows no active calls as like as the figure:

Page 102: Ip telephony system  sip

88

Figure-3.40: Agent login page during no active call

Caution: The number 09611689532 that assigned for the agent extension (100), must have an

incoming route & outgoing route that discussed earlier but the destination of the incoming route

must be set at queue that assigned for all incoming calls.

Page 103: Ip telephony system  sip

89

Chapter 4

IP Phone Connection Diagram, Billing and Accounts

Software

4.1 Connection Diagram of DhakaCom IP Phone with Other Telecom Company

DhakaCom IP Phone is connected to Other Local Operator of Bangladesh like Grameen Phone,

Robi, CityCell etc. DhakaCom also Connected with IIG, IGW, ICX, BDIX. Here, I describe

below:

4.1.1 International Internet Gateway (IIG)

Mango

4.1.2 International Gateway (IGW)

• Novotel Ltd

• Bangla Trace Communications Ltd

• Mir Telecom

4.1.3 Interconnection Exchange (ICX)

• M & H Telecom

• Getco Telecommunication Ltd

• BTCL

Page 104: Ip telephony system  sip

90

4.1.4 Bangladesh Internet Exchange (BDIX)

• DhakaCom Ltd

• BracNet

• Agni

• Link3

InternetTire 1 networks

PoP #1

Tire 2 NetworksIP Backbone MANGO

Tire 3 Network (multi-homed ISP )

Peering IXP

Transit

Transit

Internet users (business, consumers, etc)

IGW- Bangla Trac,

Novotel, Mir Telecom

ICX- Getco and M&H

Mobile Phone Operators(6)

BTCL

Tire 2 Networks IP Backbone

Figure-4.1: Connection Diagram of Dhakacom IP Phone to Other operators.

Page 105: Ip telephony system  sip

91

4.2 A Corporate IP Phone Connections Solutions

A client can easily do SIP trunk with his/her old traditional PBX or can do a IP PBX with a

server which OS is Elastix.

Figure-4.2: Connection Diagram of DhakaCom to Client Local LAN

Clients can use analog phones and Fax machine using Analog Telephone Adapter (ATA) which

connects the analog device with the IP network.

Page 106: Ip telephony system  sip

92

4.3 Configuration of Analog Telephone Adapter (ATA)

In DhakaCom we use Grand stream Handy Tone 486 adapter. For Configure the ATA, connect

the ATA with your Laptop. In the laptop set LAN IP address as DHCP. Then go to Mozilla

Firefox, put a IP 192.168.2.1 and press enter. We get a graphical view, and then we give a

password “admin” (default).

Figure-4.3 Analog Telephone Adapter (ATA) [18, 2]

Page 107: Ip telephony system  sip

93

After giving Password, we show many options and configure them according to the given figure:

Figure-4.4: Configuration of ATA

Page 108: Ip telephony system  sip

94

Figure-4.5: Assigning IP address at ATA

After configuring ATA press “update” and “reboot”. After complete the reboot go again in the

page and click on status page and see what is the SIP registrations status. When we connected to

the internet status should be “YES”.

4.4 Configure IP Telephone

In DhakaCom we use Grand stream GXP 280 for voice phone. For Configure the GXP 280 ,

connect the phone with your Laptop. In laptop set IP address as DHCP. Then go to Mozilla

Firefox , put a IP 192.168.2.10 and press enter. We get a graphical view, then we give a

password “admin”.

Other configurations as like as ATA configurations.

Page 109: Ip telephony system  sip

95

Figure-4.6: Grand Stream IP Telephone [20]

44..55 BBiilllliinngg aanndd AAccccoouunnttss SSooffttwwaarree

4.5.1 Billing Server

For Billing and Database purpose dhakacom have created a server which is connected to switch.

Billing Server address is http://billing.dhakacom.com/IPTSP. Basically this server IP address is

202.4.97.11. Here, all clients of IP phone connected to this server.

Page 110: Ip telephony system  sip

96

Figure-4.7: Billing Server Overview

Here we can generate new IP phone number, recharge phone balance, creates DID extensions,

call routing method, Operational report, Call log, Active registration list can be seen.

Page 111: Ip telephony system  sip

97

4.5.2 Active Call List

Here, we can see the current active call list as like as following figure:

Figure-4.8: Active Call List

Page 112: Ip telephony system  sip

98

4.5.3 Call Duration

Figure 4.9: Call duration

We can get more open source billing Software from this website

http://www.cio.com.au/article/324595/5_open_source_billing_systems_watch/

Now, modify, as your wish.

Page 113: Ip telephony system  sip

99

Chapter 5

Mail Server Installation at Ubuntu

5.1 Introduction

Setting up an email server is a difficult process involving a number of different programs, each

of which needs to be properly configured. The best approach is to install and configure each

individual component one by one, ensuring that each one works, and gradually build my mail

server.

5.2 Mail Transfer Agent (MTA)

A Mail Transfer Agent (MTA) is the program which receives and sends out the email from your

server, and is therefore the key part. The default MTA in Ubuntu is Postfix [12].

5.2.1 Postfix

Postfix is the default Mail Transfer Agent (MTA) for Ubuntu. It requires for sending mail from

the server. Here I will explain how to install and configure postfix and set it up as an SMTP

(Simple Mail Transfer Protocol) server using a secure connection [12].

5.2.2 Installation of Postfix at Ubuntu

After successful installation of Ubuntu, I have to update & Upgrade my operating system (OS).

To do this I have to run following command:

# sudo apt-get upgrade

# sudo apt-get update

In order to install postfix package with SMTP I have run following command:

Page 114: Ip telephony system  sip

100

# sudo apt-get install postfix

5.2.3 Configuration of Postfix

To re-configure postfix:

# sudo dpkg-reconfigure postfix

Insert the following details:

• General type of mail configuration: Internet Site

• System mail name: rnd.morshed.net

• Root and postmaster mail recipient: <admin_user_name>

• other destinations for mail: rnd, localhost. localdomain, localhost

• Force synchronous updates on mail queue?: No

• Local networks: 127.0.0.0/8 172.16.0.0/16 202.4.100.35/32

• Mailbox size limit (bytes): 0

• Local address extension character: +

• Internet protocols to use: ipv4

To configure the mailbox format for Maildir:

sudo postconf -e 'home_mailbox = Maildir/'

I also need to issue this as well:

sudo postconf -e 'mailbox_command ='

This will place new mail in /home/username/Maildir. So I will need to configure my Mail

Delivery Agent (MDA) to use the same path.

The configuration parameters will be stored in /etc/postfix/main.cf file.

# vi /etc/postfix/main.cf [10, 12 ]

Page 115: Ip telephony system  sip

101

myhostname = rnd

mydomain = rnd.morshed.net

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

mydestination = rnd, localhost.localdomain, , localhost

relayhost =

mynetworks = 127.0.0.0/8 172.16.0.0/16 202.4.100.35/32

mailbox_command =

mailbox_size_limit = 0

recipient_delimiter = +

inet_interfaces = all

inet_protocols = ipv4

home_mailbox = Maildir/

To add the transport domain, I have to edit transport file & give my local domain by the

command:

# vi /etc/postfix/transport

morshed.net local:

.morshed.net local:

To active my domain at ubuntu server run the commad:

# postmap /etc/postfix/transport

Now I have to restart the postfix by the command:

# /etc/init.d/postfix restart

Page 116: Ip telephony system  sip

102

5.3 Mail Delivery Agent (MDA)

In order to allow me or others to download or receive email from other locations, I need to setup

IMAP (Internet Message Access Protocol) or POP3 (Post Office Protocol 3) server.

5.3.1 Dovecot

Dovecot is a Mail Delivery Agent, written with security primarily in mind. It supports the major

mailbox formats: mbox or Maildir. It is a simple and easy to install MDA. Here I will explain

how to set it up as an IMAP or POP3 server [12].

Installation of dovecot at ubuntu server:

To install dovecot at ubutu server I have run the command:

# sudo apt-get install dovecot-imapd dovecot-pop3d

In order to mention the protocols (POP3 & IMAP) that I have to use for receiving mail & the

mail location directory (maildir) , I have to edit dovecot configuration file (dovecot.conf) by the

command:

# vi /etc/dovecot/dovecot.conf

protocols = pop3 pop3s imap imaps

mail_location = maildir:~/Maildir

To restart the dovecot, run the command:

# /etc/init.d/dovecot restart

Page 117: Ip telephony system  sip

103

5.4 Webmail

Webmail permits me and my email users to view their email via their web browser from

anywhere in the world. Webmail needs to setup a MTA, a MDA and LAMP server (Linux-

Apache- MySQL - PHP) [12].

5.4.1 Squirrelmail

Webmail is software which allows you to view email from any computer, anywhere in the world,

through your web browser. Squirrelmail is a simple, fast and popular webmail package. This

guide will explain how to setup webmail on server, for use either within the home network, or

outside

5.4.2 Installation of Squirrelmail

To install squirrelmail in my ubuntu server, run the command:

# apt-get install squirrelmail

To go to the squuirrelmail directory run the command:

# cd /usr/share/squirrelmail/configTo run the index.php file (mail server login page) which is at usr/share/squirrelmail directory we need to move the file index.html from the /var/www directory to do this job run the following command:

# mv /var/www/index.html /root/index.html (to move index.html file form /var/www to /root directory)

# ln -s /usr/share/squirrelmail/ /var/www/index.php (to create a symbolic link of file index.php between /usr/share/squirrelmail & /var/www directory)

To configure my mail server logo, welcome message run the command:

./conf.pl

Page 118: Ip telephony system  sip

104

To restart the squirrelmail server run the command:

# /etc/init.d/apache2 restart

To add user on my mail server run the commad:

# adduser morshed

Here I can give all the data of morshed like username, password etc. of a particular user.

Now using my valid domain or Linux server IP address at Mozilla Firefox we can login to my

mail server:

Figure-5.1: Login to my mail server

Page 119: Ip telephony system  sip

105

Figure-5.2: My mail server after login using user name & password

5.4.3. Testing Mail Server by Sending a Mail By Using Commad

root@rnd:/home/rnd# mail morshed@rnd

Subject: Test of Mail Server

Hi This is a test Message of morshed mail server

Page 120: Ip telephony system  sip

106

Cc: morshed@rnd

Figure-5.3: The received main send form root

# tail -f /var/log/mail.log ; command to check mail path & trouble shooting

# mailq ; command to check mail on queue

Page 121: Ip telephony system  sip

107

Chapter 6

Conclusion

IP telephony presents one of the most interesting developing technologies. We believe new

companies and services will arise in the next couple of years. Introduction of ADSL

(Asymmetric Digital Subscriber Line) and other high speed network accesses will provide IP

telephone to the user’s homes. Nevertheless, IP bandwidth for home use will not be satisfactory

for years to come. This is why we believe development emphasis will be on PSTN —IP inter-

operation and deployment of new services. Many protocols implementations will be joined with

SIP products and the way we communicate will change forever.

Page 122: Ip telephony system  sip

108

References

[1] Data Communications & Networking, Behrouz A.Forouzan, 3rd Edition (2007-2008).

[2] Cisco Certified Network Associate Study Guide, Todd Lammle,6th Edition (2007)

[3] Elastix Easy Installation Guide, Hamid Kafiullah

[4] Introduction to the command line to the Fat-Free Guide to Unix and Linix commands, 2nd

edition.

[5] http://en.wikipedia.org/wiki/OSI_model, accessed on 2 February, 2013.

[6] http://en.wikipedia.org/wiki/Real-time_Transport_Protocol, accessed on 3 February, 2013.

[7] http://en.wikipedia.org/wiki/Transmission_Control_Protocol, accessed on 3 February, 2013.

[8] http://en.wikipedia.org/wiki/User_Datagram_Protocol, accessed on 3 February, 2013.

[9] http://www.3cx.com/pbx/voip-faq/, accessed on 10 February, 2013.

[10] www.ububtu.com, accessed on 7 March, 2013.

[11] www.elastix.org, accessed on 13 March, 2013.

[12] www.ubuntucomunity.com, accessed on 26 March, 2013.

[13] www.elastixforums.org/, accessed on 27 March, 2013.

[14] Jonny Martin and Daniel Griggs, Asterisk - Advanced Configuration, APRICOT2009 VoIP

Workshop Manila, February 2009

[15] Jony Martin, “Asterisk Tutorial”, Apricot, Citylink, Asterisk

[16] Jonny Martin and Daniel Griggs,” VoIP Quality of Service - Basic Theory”, APRICOT2009

VoIP Workshop Manila, February 2009

Page 123: Ip telephony system  sip

109

[17] Jonny Martin and Daniel Griggs, “Introduction to Telephony”, APRICOT2009 VoIP

Workshop Manila, February 2009

[18] Anders Borg and Abiro, “IP Telephony Tutorial” revision 4, September 25, 2000

[19] Ruwan Lakmal Silva, “Introduction to SIP Architecture”, APRICOT

[20] www.dhakacom.com, accessed on 16 January, 2013.

[21] Cheung Ming Cheung, “Voice Over IP Gateway for Internet Telephony”, BSc Information

Technology Final Year Project Report 2001/2002 at The Hong Kong Polytechnic University

[22] Hoh Yong Yik, “IP Telephone”, Submitted for the Bachelor of Engineering (Honours)

in the division of Electrical Engineering at University of Queensland (October 2002)

Appendix A: Software

• Ubuntu Linux Server 12.4 LTS (For Operating System)

• Centos 5.5 (For Operating System)

• Asterisk (For Open Source telephony)

• Elastix (For a IP PBX System)

• Microsoft Windows Paint (For designing the background of the Inventory Management

System and for image transfer and designing of the report and documentation)

• Microsoft Visio 7.0 (For design a Network Diagram)

• MS Word (For the documentation of this report)

• Elastix (For call center Solutions)

• Pangolin , PortGo & 3-Cx ( For Soft Dialer)

• SSH Secure Shell Client & Putty ( For remote connection)


Recommended