Вы находитесь на странице: 1из 17

Topic: Implementing Asterisk in Network Environment

Contents
Introduction: ................................................................................................................................ 3

Asterisk: ...................................................................................................................................... 3

Networks Management: An introduction: .................................................................................. 4

Circuit Switched Network: ..................................................................................................... 4

Packet Switched Network: ...................................................................................................... 4

Voice over Internet Protocol (VoIP): .......................................................................................... 5

Call: ......................................................................................................................................... 5

Call Conferencing: .................................................................................................................. 5

Voice Mail: ............................................................................................................................. 6

Call Setup Protocol: .................................................................................................................... 6

Session Initiation Protocol (SIP):............................................................................................ 6

H.323 Protocol: ....................................................................................................................... 7

Text over internet Protocol (ToIP):............................................................................................. 7

Asterisk’s Application Programming Interface API: .................................................................. 8

Asterisk Application API: ....................................................................................................... 8

Asterisk Codec Translator API: .............................................................................................. 8

Asterisk File Format API: ....................................................................................................... 9

Asterisk Channel API: ............................................................................................................ 9

Features of Voice over Internet Protocol (VoIP) .................................................................... 9

Network Security and Asterisk: ................................................................................................ 10

Voice-Video Communication on Mobile Phones: .................................................................... 11

Configuration files of Asterisk.................................................................................................. 12


asterisk.conf: ......................................................................................................................... 13

modules.cnf: .......................................................................................................................... 13

manager.cnf ........................................................................................................................... 13

extensions.cnf: ...................................................................................................................... 13

Sip.conf: ................................................................................................................................ 13

iax.conf: ................................................................................................................................ 13

logger.conf: ........................................................................................................................... 13

rtp.conf: ................................................................................................................................. 13

Conclusion: ............................................................................................................................... 14

References: .................................................................................Error! Bookmark not defined.

List of Figures
Figure 1: SIP based VoIP structure
Figure 2: Asterisk core and its four API; Source: Spencer, 2003
Figure 3: Actual Model for placing voice and video calls using Asterisk Server and PSTN;
Source: Qadeer et al., 2012
Figure 4: Actual model for placing voice and video calls using only the Asterisk Server; Source:
Qadeer et al., 2012.
Introduction:
The literature review is based on exploration of existing literature based on Asterisk, its
application programming interface (API) with the protocols related to voice, text and video in
system and networking environment. In this chapter, Asterisk is being discussed along with
detailed discussion about the features related to asterisk in terms of its services like VoIP (Voice
over internet protocol), ToIP (Text over internet protocol) and voice mails etc. Not only services
but also a brief review of .cnf files and their usage in asterisk is elaborated. An overview of
computer networking & types of networks are given with the discussion on network control and
linkage between asterisk system and networking. Alongside the chapter will help to answer the
core question of the dissertation which is how diverse Asterisk is taking over traditional
telephonic services. After the literature review, methodology of the research will be given which
will highlight and elaborates the steps use in the implementation of Asterisk in network
environment.

Asterisk:
Asterisk is basically a software project, with the help of which the applications of private branch
exchange (PBX) system is possible (Asterisk, 2009). Asterisk, is not a very old technology, its
relatively new and created by Mark Spencer in 1999 and is considered to be the leading product
of Diguim, Inc (Digium®, 2009). The software project Asterisk, is being released to allow dual
software license model. This technology will allow registering licensees either with exclusive
licensed issued by Diguim or with the GNU General Public License (GPL). Since the initiation
of Asterisk, it is remarkably prospered and grown; at the moment it is part of well-known
telephonic structures and gives its support to a range of protocols and technologies. Hardware
support system is very important for Asterisk to get connected with not only standard circuit-
switched telephone networks but also with the standard packet-switch computer networks. This
is the reason that according to Malone, asterisk is not only the most prevalent PBX product but
also the manufacturers claims Asterisk have hold on more than 80% of PBX market (Malone,
2009). The basic software of Asterisk has many features in its PBX system proprieties the main
are voice mail, conference phone calls menu and automatic call distribution. Asterisk is a pioneer
software which facilitates and helps in video, conference and voice calling facility without any
restriction of wired phone (Meggelen, Madsen, & Smith, 2007). It enables the application which
is made in Asterisk environment to communicate through internet. This can be done with the
help of one wired and another wireless technology or both wireless technologies but with the
presence of internet. In simpler words this technology is merging internet and the cellular world
(Camarillo & Garc´ıa-Mart´ın, 2006).

Networks Management: An introduction:


Networking is the gist of internet based communication methods. It is very important to
understand the difference of communication methods which are internet based and telephone
based. Network management is all about client/server approach, it helps to plan, organize,
monitor, taking in to account the activities and to control them (J & Jivica, 2008)
It is also essential to get to know the two main types of networks with which both internet and
telephone communication methods are based on.

Circuit Switched Network:


The connection between the source and endpoint is set up in the circuit switched network prior to
sending any data. The sender local exchange and the destination local exchange needs the unique
address of the source which enables the connection between both senders and the receiver. Once
the source address is being verified and the destination sends back a message, the connection is
free to use and after the use, all the data has been transferred source and destination send the
message to the connection will be cleared for further use. This type of network takes a lot of time
to again set up the connection and hence this reservation created the drawback of time
dependency. Example of circuit switch network is traditional and public telephone networks

Packet Switched Network:


As the name suggests that in packet switched networks data has been divided into chunks to
transfer from node to node by routers and these packed chunks are called packets. Packet data
have been send to each destination as the router reads both source and destination address. Due
to the optimum bandwidth between the two nodes this method is asynchronous. The packet
switched networks are both connection oriented and connectionless. These types of packet
switched networks are described by Halsall in 2006 and stated below (Halsal, 2006):
Connection oriented Packet switched networks is also called virtual circuit switched network as
its working is quite similar to the circuit switched networks. It works within the principles of
circuit switched networks as it also builds connection first between source and destination before
the transfer of any data. The difference lies in the bandwidth, it use packets of bandwidth of each
link and in the established connection every router sends the data in packets to each node.
Whereas unlike circuit linked networks this works in fast pace and need not to wait for dew links
it have high speed of data transfers rate and the example of this type is ATMs which is not only
used for telecommunication but also in bank transfer system.
Connectionless Packet Switched Network is not time dependent. It doesn’t need any physical
connection with the source and destination, alongside no set up is required to initiate the data
sending process, so source can send data any time. Example of connectionless packet switched
network is internet (Halsal, 2006).

Voice over Internet Protocol (VoIP):


For the networking purpose following are the protocols which are useful for the configuration
and running of Asterisk. VoIP technology in simple words is a device which transmits voice over
data via internet using the same procedure which is being used for sending and receiving emails.
The working of VoIP is quite simple. It packaged voices in the form of traffic signals through
internet from one device to another (Olejniczak, 2009). Let's discuss the voicemails and
conferencing applications which are elaborated in Imran & Qadeer paper (Imran & Qadeer,
2009).

Call:
General example of VoIP call can be given as if one person is calling from personal computers
using software based phone like skype etc. to another computer with the similar type of
configuration of software installed in it.

Call Conferencing:
The conference call is one of the features of PBX which facilitates the user to coordinate with
each other via call. It can be used by all users. Every user has the security password which
ensures the privacy and acts like a conference bridge between users. It is not an complicated and
long procedure to enter in the conference call its as simple as dialing an extension from your
phone (Qadeer & Imran, 2008). The feature has many advantages one of them is that it facilitates
the user to do conference call with native codec streaming instead of any zaptel hardware i.e. no
restriction of downsampling. The above mentioned advantages increase the popularity of VoIP
based conferencing.
Voice Mail:
Voice mail is also possible using VoIP. Taking the example of Skype, if any particular person is
using Skype as an VoIP software, voice mail facility enables them to not only call but also left a
voice message if the other person which is using the same configuration of software. The VoIP
allows listening, sending, deleting and forwarding the particular message (Imran & Qadeer,
2009)

Call Setup Protocol:


VoIP use many types of protocols like Session Initiation Protocol (SIP) and H.232 Protocol
which are used in signaling and IP networking process (Al-Sadoon, 2009). These protocols
facilitate Asterisk to connect the server with the destination user and maintain the security
features along with the quality issues. There are specific protocols which are for specific
purpose. In this context two protocols are taken into account because they are mainly used for
calling and texting purpose and they supports and works smoothly.

Session Initiation Protocol (SIP):


SIP is an ASCII based protocol. It has uniform resource identifier (Wu & Aasgaard, 2006). In an
IP network, SIP is a signaling protocol which is used for the establishment of sessions. The
session can be a simple call as discussed earlier or a multimedia conference session which is
collaborative and connected with the help of internet devices and display devices. SIP supports
and give facilities which are as follows (Al-Sadoon, 2009):
 It helps to determine the end system which has been used for communication i.e. location
of user and name translation etc.
 It facilitates the features negotiation process i.e. the exploration of the features which are
available to one station user and making them agree to use the similar features which are
available to both station
 SIP offers both audio and video calling services
 Along with calling and video calling, It offers multimedia conferences and real time
message communication too.
In other words, according to (Rosenberg, 2002): “SIP is a responsive, basic tool for the creation,
modification and termination of sessions that are working independently of the fundamental
transportation of protocols and it doesn’t needs any dependency on the category of session which was
established”. The design structure and layout is like HTTP and SIP is transcript based protocol.
SIP based VoIP session can be elaborated with the help of following diagram.

Figure 1: SIP based VoIP structure


The format of SIP is like an email address and the phone which is being used by user is registered
using the uniform resource identifier (URI). The URI have been stored in the server and its unique
for every user. Server use the same URI each time a particular user calls or requests to send messages
(Mao, Talevskit, & Chang, 2007).

H.323 Protocol:
Video conferencing is another major tool and application which can be utilized by Asterisk.
H.323 Protocol is the International Telecommunication Union (ITU) protocol which was initially
developed to support the IP transportation science for video conferencing (Al-Sadoon, 2009). It
is like a cherry for cake as it tends to add video and voice at the same time.
Both the protocols, (SIP and H.323) have similar features and methodologies and both protocols
use standardized signaling protocols and offers services like video calls, call hole, records and
transfer.

Text over internet Protocol (ToIP):


ToIP is also known as real time text communication. According to the definition of Hellstrom,
ToIP is the communication facility which enables the sender to send the message as soon as the
sender typed it, even if the sender is a fact typist still it can be sent before 500ms which the
maximum delay is allowed to send a text (Hellström, IETF RFC 4103: RTP Payload for Text
Conversation, 2005). There are many technologies which are made specifically public switch
networks can also be used in text-telephones with the limited access to ports.

Asterisk’s Application Programming Interface API:


Asterisk is a middleware between telephonic applications which are operating on the top and the
technologies which are running in the back end. It is very important to learn about the interfaces
of telephony technologies. The telephony technologies are divided into three main types.
According to Spencer the main types are Zaptel hardware, non-Zaptal hardware and packet
voice. Zaptal and non-zaptel hardware integrate the connection of public telephone network with
traditional digital and analog telephone interfaces. The packet voice telephonic technology
incorporates the specific or standard protocols which are used for communication with the
networks which are packet switched and contains interfaces. Packet voice doesn't need any
specialized hardware. Above mentioned SIP and H.323 are the examples of these standard
protocols as asterisk act like a bridge between different types of protocols (Alam, Bose, Rahman,
& Al-Mumin, 2007).
While talking about Asterisk's API there are in total four programming interface which is given
below:

Asterisk Application API:


The telephonic applications which are programmed in individual components and helps Asterisk
in the booting process at the first place are the part of application API. New application files are
very easy to add. The common telephony application is Dial and Voicemail.

Asterisk Codec Translator API:


As the name is saying that codec is a building block which translates particular type of data into
another. When the frame of data departs from Asterisk environment, codec translator translates it
to the particular type of frame. In simple words, if an audio file is sending from one channel
asterisk make sure that the format type is similar to the requested format by the outgoing
channel. If in case, the sending file has a different format than the requested one, Asterisk checks
for the codec to translate in to the requested one. The procedure is only applicable to audios yet
but Hitchcock. (2006) explored and concluded that this functionality can be used in Asterisk for
text as well as videos (Hitchcock, 2006).

Asterisk File Format API:


Formats are responsible for the reading and writing section of Asterisk. It reads or writes media
files to disk, in simple words it is codec but for the internal usage in Asterisk.

Asterisk Channel API:


Channel is a protocol specific API and contains technology drivers like SIP and PSTN. The
functioning of Channel API is like when a call is set up via Asterisk, the incoming data carries
all the protocol specific information and the relevant technology driver is then loaded after
getting the information of incoming data.

Figure 2: Asterisk core and its four API; Source: Spencer, 2003

Features of Voice over Internet Protocol (VoIP)


VoIP technology prospers in 1998 and grows to make calls between phone-to-phone and PC-to-
phone with the help of internet broadband. Nowadays it is very common to make phone calls
using the internet and mobile phones. VoIP has many advantages over telephonic services.
Firstly let's discuss the infrastructure Networking is needed to develop infrastructure. A stable
internet connection and two devices for VoIP infrastructure at home or in office are required.
The two services are the transmitter of voice calls whereas other carries IP packets. For the long
term networking using asterisk features for VoIP, only IP service is needed for joint
infrastructure.
As it is known that normal telephonic services are metered and charge rates according to the time
and duration of calling whereas VoIP technology ensures free calls to other VoIP users as far as
broadband connection is enabled.
The ordinary telephonic services have enabled codec of G.711 and have restricted audio
reliability but the VoIP services have the variety of enabled codec which ensures superior voice
quality. Selection of appropriate Codec enables high quality calls and videos along with the
conference calls facility which not only distinguish Asterisk but also its free of cost facilities
makes it more valuable and dependable for usage (Horn, 2005)

Network Security and Asterisk:


The codded source files which are included in Asterisk system also have “Makefile &
README” (Spencer, 2008) in them which helps the users to secure their networks and security
protocols before running any Asterisk file. Their files are generally less than two to three pages
in length and part of Asterisk documentation and consist of warnings regarding the topic is the
primer foundation of Asterisk security, the use of phone services by unauthorized users may
result in hefty phone bills (ADT, 2009). There are two basic areas of Asterisk which can be
compromised in terms of security
 Network security
 Dialplan Security
In Asterisk environment, network security is related to the restricted access to asterisk
servers of users. Users are not authorized for the enabled to access the back end information
running in the asterisk alongside they have no idea how the networking is working and they
are not able to get the chance to change the networking styles and information sent by the
source via any source device or network.
Dialplan security restricts unauthorized phone services in Asterisk. It controls and
administers the route of incoming calls and actions which should be taken by writing
specific extensions. It is totally extension based and every working will be done by the
specific command written in the back end.
Voice-Video Communication on Mobile Phones:
The paper is presented by Qadeer and his team in 2012 on voice-video communication on mobile
phone and PC using Asterisk Private Branch Exchange (PBX) (Qadeer, Shah, & Goel, 2012).
PDX is a personal phone switchboard which is used to connect one or more than one telephones
on one side with one or more than one telephone lines on the destination side. The thesis is also
about the networking with the use of Asterisk for voice video calling, so this paper can be totally
related to the research taken in to account. According to the writers, Asterisk is an open source
Linux based server and can be used as PBX and it allows custom based designs of modules. It
has a user friendly architecture which can be easily modified or customized to fit in any
organization or user. Also, the researchers highlighted the cost efficiency of Asterisk VoIP
compared to the traditional telephonic devices and networks.The objective of the paper is to
develop an application for any Wi-Fi supported cellular devices with the help of asterisk server
via Wi-Fi regardless of any telephonic network involvement. The model they made has three
components which are Asterisk server, clients and PSTN (local telephone) exchange as shown in
Figure 3.

Figure 3: Actual Model for placing voice and video calls using Asterisk Server and PSTN;
Source: Qadeer et al., 2012

Along with the above model, the researchers have succeeded to


 establish a secure and personal wireless network in the full vicinity of the university
campus
 Successfully incorporated the voice and video calls facility in not only laptops but also in
cell phones which are registered with the same wireless network.
 Using the Asterisk server, in sending SMS among laptops and cell phones which are
connected with the same network.
After that, they establish voice and video calls and faced delays in receiving and sending of
packets alongside they also placed screenshots of their successful project and the original model
which is being used for placing voice and video calls are also given by them and shown below in
Figure 4

Figure 4: Actual model for placing voice and video calls using only the Asterisk Server; Source:
Qadeer et al., 2012
This model looks quite simple and elaborates that using simple Asterisk based module and it is
clearly depicted by Qadeer and his team. In the end, they concluded that this model is not only
successfully implemented in university campus for an experimental basis but also it can be used
and applicable in any organization which is connected over the internet. Not only this but using
both wired LAN and wireless LAN is also a reliable source of communication in any
environment whether its work or educational. Alongside they also highlight that Asterisk is
protected and have a reliable privacy which is dependable and can be used in daily lives.

Configuration files of Asterisk


Structure of Asterisk is solely based on the files which are also known as configuration files and
they are located in /etc/asterisk directory. The important files are (Voip, 2018) These files are
significantly important and will be needed to run the installation process properly. According to
Martin the characteristics of these files are as follows (Martín, 2009; Solarwindz, 2011).

asterisk.conf:
The files with an extension of .cnf and named as asterisk represents the location of the spool,
configuration files and the modules alongside the address to write the log files. It is highly
suggested that one should use the default file location. It can be said that I make the home for
specific files in the directory and help is boot options of the server.

modules.cnf:
The module files with .cnf extension controls and specifies the specific module file which should
or shouldn't be loaded on the start up. The file contains one section of modules for the loading
purpose during the start up.

manager.cnf
In Asterisk, there is a specific manager interface and the files for the configuration of manager
interface are contained in this extension.

extensions.cnf:
The asterisk’s dialplan details are contained in this file.

Sip.conf:
This file is the configuration of the SIP protocol. Endpoint authentication like the source and
service providers is also been configured using these files. Alongside, the decision making
process for the determination of willingness to accept or reject call and decision of which call
should go in dial plan is done by this file.

iax.conf:
It also works like sip.conf and determines IAX@ protocol configuration.

logger.conf:
In this file, log files are organized, it supports the identification and clarification of the specific
files which are generated and the level of log messages are mentioned on each file of Asterisk.

rtp.conf:
this file coordinates with the ports of RTP i.e. real time transport protocol which is used by
Asterisk for the generation and receiving of RTP traffic. The number of protocols uses RTP
protocols for the transportation of media between endpoints. The protocols which use RTP are
SIP, H.323, MGCP etc.

Conclusion:
Asterisk is a network based application which is the need of modern era. In this literature, it is
attempted to explore all the features which are related to Asterisk i.e. its environment, protocols,
extensions. After the keen exploration of literature, it can be concluded that asterisk is the future.
Time is near when asterisk will replace telephonic lines and traditional means of
communications while looking at the daily routines and personal way of living it can't be wrong
to say that technological and wireless communication software which are developed by Asterisk
are slowly creeping in our lives. There are many reasons for this invasion. One is that the VoIP
protocol reduces the cost of communication as compared to normal telephones (Al-Sadoon,
2009). Secondly, VoIP server which is obviously Asterisk is server controlled, no one can invade
inside without permission. There are proper security measures and the session is in the hands of
server its call, conference call or any text message. Also, it has a verity of protocols like SIP and
H.323 which ensures free messages, calls, and video calls too. So it is quite clear that there is no
doubt in it that Asterisk is the future of telephony. In this project, implementation of Asterisk in a
network environment will be done to ensure that the selected sample space also gives their
feedback on this technology, aiming that this thesis will also contribute in literature in best ways.

Research Gap:
During the research, quite a few gaps are found. Asterisk is reliable and successful software
which is being used by the developers and the applications are implemented all over the world.
Although it has practical usage but the publish literature is quiet similar and there are very less
research papers in this field. There is need of published material in the field of integration of
networking with asterisk along with the configuration files elaboration and detailed knowledge
about the applications which are coupled with networking and Asterisk.
Bibliography
Abbasi, T. P. (2005). A comparative study of the SIP & IAX voice protocols. CCECE/CCGEI.
Saskatoon.
Abbasi, T., Prasad, S., Seddigh, N., & Lambadaris, I. (2005). A comparative study of the SIP &
IAX voice protocols. . CCECE/CCGEI. Saskatoon.
ADT. (2009). Security Asterisk Reference Information Version 1.6.1.0. Retrieved November 30,
2018, from Asterisk Development Team:
http://svn.digium.com/svn/asterisk/tags/1.6.1.0/doc/tex/security.tex
Alam, Z. M., Bose, S., Rahman, M. D., & Al-Mumin, A. M. (2007). Small office PBX using
Voice over IP. ICACT.
Al-Sadoon, G. M. (2009). Asterisk open source to implement voice over internet Protocol.
International Journal of Computer Science and Network Security, 9(6).
Asterisk. (2009). Aesterisk. Retrieved November 30, 2018, from The Open Source PBX &
Telephony Platform: http://www.asterisk.org/.
Camarillo, G., & Garc´ıa-Mart´ın, A. M. (2006). The 3G IP Multimedia Subsystem (IMS) :
Merging The Internet And The Cellular Worlds, (2nd ed.). . Chichester, Engliand: Wiley
& Sons.
Digium®. (2009). Digium®. Retrieved November 30, 2018, from The Asterisk Company:
http://www.digium.com
Halsal, F. (2006). Computer Networking and the Internet (5th ed.). Addison Wesley.
Hellström, G. (2005). IETF RFC 4103: RTP Payload for Text Conversation. The internet
Society.
Hellström, G. (2006). IETF RFC 4351: Real-Time Transport Protocol (RTP) Payload for Text
Conversation Interleaved in an Audio Stream. the Internet Society.
Hitchcock, J. (2006). Decorating Asterisk: Experiments in Service Creation for a Multi-Protocol
Telephony Environment UsingOpen Source Tools. Rhodes University.
Horn, F. J. (2005). IPSec-based dynamic security services for the MYSEA environment. MSc
Thesis. Monterey, California: , Naval Postgraduate School.
Imran, A., & Qadeer, M. A. (2009). Conferencing, Paging, Voice Mailing via Asterisk EPBX.
International Conference on Computer Engineering and Technology, 978-0-7695-3521-
0/09.
J, G., & Jivica. (2008). 4G : Functionalities Development and an Analysis of Mobile Wireless
Grid. . Proceeding of First International Conference on Emerging Trends in Engineering
and Technology, (pp. 270-275).
Malone, J. (2009, January 28). Open source PBX is 18% of North America market. Retrieved
November 30, 2018, from No Jitter:
http://www.nojitter.com/showArticle.jhtml?articleID=212903167
Mao, F. N., Talevskit, A., & Chang, E. (2007). Voice over internet protocol on mobile devices.
6th IEEE/ACIS International Conference on Computer and Information Science (ICIS).
Martín, S. G. (2009). Contribution to Asterisk Open Source Project. Universitat Oberta de
Catalunya (UOC).
Meggelen, V. J., Madsen, L., & Smith, J. (2007). Asterisk.the Future of Telephony. Second
Edition. (2nd ed.). 1005 Gravenstein Highway North, Sebastopol, CA: reilly Media, Inc.
Olejniczak, S. P. (2009). VoIP Deployment for Dummies. John Wiley & Sons.
Qadeer, A. M., & Imran, A. (2008). Asterisk Voice Exchange-An alternative to conventional
EPBX. Proceeding of IEEE. ICCEE.
Qadeer, M. A., Shah, K., & Goel, U. (2012). Voice - Video Communication on Mobile Phones
and PCs’ using Asterisk EPBX. International Conference on Communication Systems
and Network Technologies.
Rosenberg, J. (2002). SIP: session initiation protocol. Retrieved November 29, 2018, from RFC
3261, Internet Engineering Task Force.: http://www.rfc-editor.org/rfc/rfc3261.txt.
Solarwindz. (2011, 03 22). My Asterisk Voip Pbx Config Files. Retrieved November 30, 2018,
from Baidu: https://wenku.baidu.com/view/b0b186ff910ef12d2af9e730.html
Spencer, M. (2003). The Asterisk Handbook. Retrieved November 29, 2018, from Diguim:
www.digium.com
Spencer, M. (2008.). The Asterisk(R) open source PBX, README for Asterisk 1.6.1.0. Retrieved
from SVN: http://svn.digium.com/svn/asterisk/tags/1.6.1.0/README.
Voip. (2018). Asterisk config files. Retrieved November 29, 2018, from voip-info.org:
https://www.voip-info.org/asterisk-config-files/
Wu, L., & Aasgaard, H. L. (2006). Migration of VOIP/SIP Enterprise Solutions towards IMS.
Masters Thesis. Agder University College.

Вам также может понравиться