IP Based Voice Server Application With PBX Using Free SWITCH ISSN 2319-9725 Sachin Mallikarjun Hunur Shreyas S M Abstract: In today s world, individuals are able to build phone systems that outperform the traditional phone services and offer advanced features for relatively low cost. Private Branch Exchange (PBX) is an enterprise voice communication system that connects business telephones at a business site to each other and to the Public Switched Telephone Network (PSTN). One of the latest tendencies in PBX phone system development is the VoIP PBX, which uses the Internet Protocol to transmit calls. IP PBX is a software-based PBX phone system solution which helps accomplish certain tasks and delivers services that can be difficult and costly to implement when using a traditional proprietary PABX (private automated branch exchange). Voice over Internet Protocol (VoIP) is a technology that makes it possible to make a phone call using an Internet connection or a dedicated network that uses the IP protocol, rather than normal telephone line. The PBX that has been developed using an open source software called FreeSWITCH has the functionality of connecting internal systems of an organization for communication in a cost-effective manner. Keywords: Dalit, Neo Dalitism, Caste system, Victim, hegemony, resistance, Dalit consciousness.
1. Introduction: Most medium-sized and large companies use a PBX because it is less expensive than connecting an external telephone line to every telephone in the organization. A PBX connects the internal telephones within a business and also connects them to the public switched telephone network (PSTN). Voice over IP refers to the diffusion of voice traffic over internet-based networks. Internet Protocol (IP) was originally designed for data networking and following its success, the protocol has been adapted to voice networking. FreeSWITCH is free and open source communication software for the creation of voice and messaging products. It is licensed under the Mozilla Public License (MPL), a free software license. Users who subscribe to a VoIP or Broadband service will be able to experience the power of X-Liteenabling them to communicate anytime, anywhere. Interactive Voice Response or IVR is a telephone technology that communicates with a caller through configurable voice menus and data in real time. In an IVR system, callers are given the choice to select options by pressing digits. IVR systems can normally handle and service high volumes of phone calls. 2. Literature Survey: Some of the issues involved in performing speech recognition over the IP network have been identified[1]. Experiments have demonstrated that both higher accuracy and increased robustness to packet loss can be achieved by performing the front-end processing locally rather than sending the codec parameters.a novel detection and estimation scheme for the recovery of lost speech features has been shown to restore performance to almost the situation where there is no packet loss even at losses up to 50%. The performance modeling, analysis, and simulation of SIP-T (Session Initiation Protocol for Telephones) signaling system in carrier class VoIP (Voice over IP) network have been carried out [2]. The SIP-T signaling system defined in IETF (Internet Engineering Task Force) draft is a mechanism that uses SIP (Session Initiation Protocol) to facilitate the interconnection of PSTN (Public Switched Telephone Network) with carrier class VoIP network. Based on IETF, the SIP-T signaling system not only promises scalability, flexibility, International Journal of Innovative Research and Studies Page 40
and interoperability with PSTN but also provides call control function of MGC (Media Gateway Controller) to set up, tear down, and manage VoIP calls in carrier class VoIP network. The main focus of the architecture for a next generation Voice over IP framework is on interoperability between different Voice over IP providers, as well as dependability and robustness [4]. The requirements of a suitable VoIP architecture are the basis of this approach. Starting with these requirements the different components of the architecture are: Management Services, Basic VoIP Services, and Supplementary Services. While the Basic VoIP Services provide the basic VoIP functionality of the architecture, the Management Services provide functionality like authentication and authorization, information brokering, metering and accounting, or feature interaction management. Feature interaction management is very important, because of the rapid growth of supplementary services that can be used. Feature interaction is a result of the consecutive usage of multiple supplementary services that has to be addressed to provide a maximum of the possible outcome the supplementary services can offer. 3. Related Work: Older non IP PBX systems require On Site visit to add users and access. All the applications other than PBX call processing are add-ons and require the use of a different administration interface. The earlier systems use a separate infrastructure system. Most IT departments are not familiar with programming and will require expensive specialized support. They require the use of toll network that becomes expensive. Asterisk is a free and open source framework for building communications applications and is sponsored by Digium. Asterisk turns an ordinary computer into a communication server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and is used by small businesses, large businesses, call centers, carriers and governments worldwide. Free SWITCH is an improved system over an older VoIP based PBX system called Asterisk. International Journal of Innovative Research and Studies Page 41
4. Voice Server Application: 4.1. PBX: A Hosted PBX is a virtual telephone system where, instead of having all the telephone hardware in the office, the hardware is provided by a system hosting company and one can connect to the system via a network connection. This hosted phone system brings the benefits of both worlds together. Costs are greatly reduced since there is no extra hardware to install. Phones can be connected to a computer port, rather than deal with wires. Like a virtual PBX, one can manage the system online. 4.2. Voice Over IP: The benefits of VoIP are staggering. Beyond reducing carrier and circuit charges by way of LAN, WAN, and VPNs, VoIP also enhances business communication, greatly increasing employee productivity. Figure 1: How VoIP works 4.3. FreeSWITCH: With no desire to reinvent the wheel, Free SWITCH is designed to take advantage of as many existing software libraries as possible. It has a modular, extensible architecture, with only limited and necessary functionality in core. Optional modules can be employed to add virtually any functionality desired by the user. The core (libfreeswitch) can be embedded into almost any app that can use a.so or.dll file. It can be transformed into a softphone, PBX or a soft-switch. Module system allows you to extend FreeSWITCH easily. Applications may be written in C/C++, Java,.NET, Javascript/ECMAScript, Python, Perl, Ruby, PHP, Lua, and more. International Journal of Innovative Research and Studies Page 42
External systems can receive events from and/or control the switch over a TCP Eventsocket with many language bindings and clients. FreeSWITCH handles thousands of concurrent channels with media on a standard PC. It interoperates with different products and protocols, such as GNU Bayonne, Yate, sipxecs or Asterisk. It supports SIP, SCCP, H.323, LDAP, Zeroconf, XMPP / Jingle, etc. With FreeTDM, a BSD licensed TDM abstraction library, it can interface with the PSTN as well. It supports Secure RTP (SRTP) and zrtp (libzrtp). FreeSWITCH makes it possible to build a softphone, PBX system, soft-switch, or interface with other open source PBX systems such as OpenPBX.org, Bayonne, Yate or Asterisk. It can also be used to build a VoIP switching platform uniting various technologies such as SIP (using the Nokia Sofia library), H.323, SCCP, LDAP, Zeroconf, XMPP / Jingle, etc. As a library FreeSWITCH can be used by developers to enable switching in their custom applications. FreeSWITCHcan be launched not only from a C application, but also via PHP, Perl, or a variety of other languages. FreeSWITCH is written in C, built from the ground up (not a fork of another code base). It is designed to take advantage of as many existing software libraries as possible. It has a modular, extensible architecture, with few and necessary functionality in core (libfreeswitch) with optional modules to do the rest. FreeSWITCH runs on Windows, Mac OS X, Linux, BSD, ARM, and other Unixflavors. By combining the functionality of the various module interfaces, FreeSWITCH can be configured to connect IP phones, POTS lines, and IP-based telephone service. It can also translate audio formats and interfaces with a custom menu system. A running FreeSWITCH server can also be controlled from other machines. FreeSWITCH has different module types that revolve around the central core, much like satellites orbiting a planet. International Journal of Innovative Research and Studies Page 43
Figure 2: FreeSWITCH Architecture Advantages of FreeSWITCH: a. Open source. b. Robust. c. Easy operation and maintenance. d. Web /GUI based configuration. e. Significant savings over international and long distance calls using VOIP. f. Simple configuration. g. Compatibility among different SIP systems. h. Easy up-gradation. i. Ease in extension of lines. 4.3.1. End Point Module: Endpoint modules are critical important and add some of the key features which make FreeSWITCH the powerful platform it is today. The primary role of these modules is to take certain common communication technologies and normalize them into an abstract entity which is referred to as a session. A session represents a connection between FreeSWITCH and a particular protocol. There are several endpoint modules that come with FreeSWITCH, which implement several protocols such as SIP, H.323, Jingle (Google Talk). International Journal of Innovative Research and Studies Page 44
Sophia-SIP is an open source project sponsored by Nokia, which is determined to make a programming interface to the Session Initiation Protocol (SIP). This library is used in FreeSWITCH in a module called mod_sophia. This module registers to all the hooks in FreeSWITCH necessary to make an Endpoint module, and translates the native FreeSWITCH constructs into SIP constructs and back again. Configuration information is taken from the central FreeSWITCH configuration files, which allows mod_sophia to load user-defined preferences and connection details. This allows FreeSWITCH to accept registration from SIP phones and devices, register to other SIP Endpoints such as service providers, send notifications, and provide services to the phones such as voicemail. When a SIP call is established between FreeSWITCH and other SIP device, it will show up in FreeSWITCH as an active session. 4.4. X-Lite Softphone: Combining voice and video calls in a user-friendly interface, CounterPath's X-Lite helps in seamless transition from a traditional phone environment into the world of Voice over IP. Based on the advanced architecture of eyebeam 1.5 (CounterPath's carrier grade telephony client), the new X-Lite is designed to showcase some of the feature rich capabilities available with the commercial softphone such as superior audio and video quality, zero-touch configuration, IM & Presence, and a comprehensive personal address book. 4.5. Interactive Voice Response: With an Interactive Voice Response system, businesses can reduce costs and improve customer s experience as Interactive Voice Response systems allow callers to get information they need 24 hours a day without the need of costly human agents. Some IVR applications include telephone banking, flight-scheduling information and tele-voting. VoIP, which stands for Voice over Internet Protocol, is the transmission of voice traffic over IP-based networks. Initially designed for data networking, the Internet Protocol (IP) was adapted to voice networking following its successful positioning as the global standard for data networking. With VoIP phone systems users are not limited to making and receiving calls through the IP network, traditional phone lines can also be used to guarantee a higher call quality and availability. With the use of a VoIP gateway incoming PSTN/telephone lines can be International Journal of Innovative Research and Studies Page 45
converted to VoIP/SIP. This way the VoIP gateway allows the user to receive and place calls on the regular telephony network. VoIP PBX systems provide mobility to employees, flexibility when a business expands as they are much easier to manage than the traditional PBX, and can also considerably reduce telephony administration costs. The default implementation for a PBX that is used is an open source software called FreeSWITCH. The various elements in FreeSWITCH are independent of each other and do not have much knowledge about how the other parts are working. The functionality of FreeSWITCH can also be extended with loadable modules, which tie a particular external technology into the core. 5. System Design: Architecture Of Client-Server Model: The client-server model is a distributed application structure in computing that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. The client for the architecture is a HTTP client which sends requests and receives responses from a server. The server is the component that handles the client request processes, loads the FreeSWITCH components that helps in making calls. A server is a host that is runs one or more server programs which share their resources with clients. A client does not share any of its resources, but requests a server's content or service function. Figure 3: Architecture of voice based server application using FreeSWITCH International Journal of Innovative Research and Studies Page 46
6. System Implementation: 6.1. GUI Implementation: 6.1.1. Login Page: The login page is implemented using several HTML components that allow us to add the GUI aspect to it. Furthermore PHP code has been used for the authentication and authorization of the user. The PHP code enables communication with the database which stores all User IDs and Passwords. The database system that is used is MySQL database. This entire database and the access to it is made possible by running the PHP code and HTML page on a WAMP server, which is essentially a combination of servers running on windows platform. WAMP is an acronym formed from the initials of the operating system Microsoft Windows and the principal components of the package: Apache, MySQL and one of PHP, Perl or Python. Apache is a web server. MySQL is an open-source database. 6.1.2. Dial Up Page: The dial up page provides the user with several functionalities, to start with its main purpose is to emulate a hard phone and hence it provides functions like Call, End and Register.The Client-Server Architecture is implemented to facilitate communication between the dialing client and the main server application running on Apache. 6.2. Server Side Implementation: The Foundation of the server side implementation is written in Java Code. This is because Java is a flexible and dynamic language. Java Server Programming is a flavor of Java. It is used to write servlets and run them on the server that waits for requests from the client. The servlet codehas the following main components: a. DO-GET request handling mechanism: The main task of the server is to handle the various requests that it receives from its clients. This is managed using the HTTP functions DOGET. Once it determines which function the user is trying to invoke, the International Journal of Innovative Research and Studies Page 47
do-get function directs the flow of control to the appropriate module in the program such as call, end or register. b. Java Native Access (JNA): Once the control is passed over to the appropriate module the code for that module is not present in java code. Instead the module invokes the appropriate module s function by means of an intermediate wrapper called the Java Native Access (JNA).This is because the Freeswitch module of the servlet programming is written only in c from ground up and cannot understand Java code. Hence an intermediate wrapper like the JNA is used so as to access the FreeSwitch functionality for communication and the functions such as call register and end are written in C code. These files are however being invoked by the means of a DLL. c. Dynamic Linking Library (DLL): The DLL is the most appropriate for this application because the DLL is loaded whenever the servlet program is started on the server and is ready for access. This makes the execution faster and provides a responsive behaviour. The DLL contains the different functions that implement the calling, ending and registration functions. Apart from previously mentioned functions, the DLL file also contains C code that initializes the FreeSwitch components. FreeSwitch components refers to the various modules of FreeSwitch that need to be initialized to facilitate communication facilities. The components include the FreeSwitchCore library, modpal files, dialplans and some configuration files that help in the truncking and bridging of one client to another.the initialization of FreeSwitch components is in turn done by loading the FreeSwitch DLL from the the C code that the JNA accesses. The FreeSwitch must always be running for the entire application to run. Once all modules are loaded successfully two clients can be connected by forming a bridge between them which is done by the FreeSwitch components. Once a bridge is formed the voice data of the participants is transferred across the bridge through VoIP where it is transferred using IP protocol. 7. Conclusion: Advanced VoIP based PBX systems hold the potential to replace the native PBX systems. A low bandwidth usage is observed as the system works on same network. Usage of PBX ensures dedicated performance providing congestion-free channels. International Journal of Innovative Research and Studies Page 48
It is cost effective as the server is an open source application. FreeSWITCH allows several extensions to be registered and provides conference facilities. Video chat facilities can be provided using Gtalk or Skype. Calls can be made to external phones through SIP trunks through gateways. The system can be configured to make international calls using the right ISP (Internet Service Provider). Application performance and system response can be enhanced using multi-threaded processing. Communication via Text To Speech (TTS) engine into the server can be integrated into the system. International Journal of Innovative Research and Studies Page 49
References: 1. Ben Milner and SharamSemnani, Robust Speech Recognition over IP networks, Acoustics, Speech, and Signal Processing, 2000.ICASSP '00.Proceedings. 2000 IEEE International Conference on (Volume:3 ). 2. Jung-Shyr Wu * and Peir-Yuan Wang **, The Performance Analysis of SIP-T Signaling System in Carrier Class VoIP Network, Advanced Information Networking and Applications, 2003. AINA 2003.17th International Conference. 3. E.T. Aire, B.T. Maharaj, MSAIEE, and L.P. Linde, SMIEEEE, Implementation Considerations in a SIP based secure Voice over IP Network, AFRICON, 2004. 7th AFRICON Conference in Africa (Volume:1 ) 4. Markus Hillenbrand, Joachim Götze, and Paul Müller, Voice over IP Considerations for a Next Generation Architecture, Software Engineering and Advanced Applications, 2005. 31st EUROMICRO Conference. 5. Anthony Minessale, Michael S. Collins, Darren Schreiber, FreeSWITCH 1.0.6, Build robust high performance telephony systems using FreeSWITCH. 6. Anthony Minessale, Michael S. Collins, Darren Schreiber, Raymond Chandler, FreeSWITCH Cookbook, Recipes to help you get the most out of your FreeSWITCH server. 7. http://en.wikipedia.org/wiki/freeswitch 8. http://www.freeswitch.org/ International Journal of Innovative Research and Studies Page 50