[IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France...

4
Object-Oriented Framework for Development of Telephony Applications Ilija Basicevic Faculty of Technical Sciences University of Novi Sad Novi Sad, Serbia [email protected] Abstract—This paper presents a prototype of a new application development framework for development of telephony services. Besides the first party call control, the framework provides support for third party call control, monitoring and presence service, which is based on publish/subscribe mechanism. The programming interface that framework provides maps successfully to mechanisms of SIP protocol and its extensions (those based on SIP event notification mechanism), but for the first party call control peer-to-peer telephony maps successfully to H.323, as well. We have developed the prototype of the framework in Java programming language. Paper presents solutions that have been applied in the design and implementation of the prototype. Keywords-SIP, telephony services, application framework, call control I. INTRODUCTION An important part of telecommunications services today is based on other features as well as on traditional telephony service. Applications which include telephony, presence and instant messaging features gained great popularity. SIP includes other mechanisms besides peer-to-peer telephony, but between the session layer mechanisms provided by SIP and application software there is a need for a framework for development of applications. The basic contribution of such a framework is to provide single, unified, integrated programming interface for control of distributed elements of SIP telephony network. This paper presents most important features of the framework. A. SIP Protocol Actual version of SIP, version 2, dates from 2002[1]. This document includes the necessary features for first party call control of peer-to-peer VoIP telephony. Extensions for features like conference, third party call control, presence and instant messaging are specified in separate RFC documents. The cornerstone of both third party call control and presence is SIP event notification mechanism [2]. This is a generic mechanism and for each specific application of this mechanism, a separate package is developed. The package includes further specification of message exchange required for specific application in case and message format. Message format is usually based on XML (example: presence package [3] and PIDF format [4] used for presence services). Besides the notification mechanism, SIP platform for third party call control is complemented with the concept of back-to-back user agent (B2B UA). This element of SIP network contains two user agents (in each session, server side of one and the client side of the other are active) and the application atop of them. Typically that application realizes services that require interception of media stream and signaling between two sides that communicate. Examples of the use of B2B UA are applications that require from users to enter data (e.g. identification numbers) before audio/video session with remote user is established. This paper presents the way in which possibilities for control of aforementioned mechanisms are included in the framework. II. DESIGN OF THE FRAMEWORK The first step in the realization of the framework is analysis of structure and characteristics of telephony network. The subjects of analysis are following widely used telephony networks: - circuit switched telephony (PSTN, ISDN) [5] - VoIP telephony based on SIP and H.323[6] As SIP is the most complete and prevalent telephony platform today, the design of the framework is strongly influenced by its characteristics. The protocol stack of a framework based application could include TCP, UDP, TLS, and/or SCTP at the transport level, SIP or H.323 at the session level and a framework supported telephony application at the application level. The framework supports following features: - first party call control peer-to-peer telephony - third party call control peer-to-peer telephony - instant messaging - presence services - monitoring of the state of logged-in users and active sessions - network side applications (e.g. call distributor etc.) The most important entities of class hierarchy are: - AppLayerEntity interface - NetPoint class - SignalingDevice class AppLayerEntity and NetPoint are roots of inheritance trees. Classes that present the most important logical concepts of telephony domain - feature (telephony feature) and session realize the AppLayerEntity interface. We have 2009 Fourth International Conference on Digital Telecommunications 978-0-7695-3695-8/09 $25.00 © 2009 IEEE DOI 10.1109/ICDT.2009.10 11

Transcript of [IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France...

Page 1: [IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France (2009.07.20-2009.07.25)] 2009 Fourth International Conference on Digital Telecommunications

Object-Oriented Framework for Development of Telephony Applications

Ilija Basicevic

Faculty of Technical Sciences

University of Novi Sad

Novi Sad, Serbia

[email protected]

Abstract—This paper presents a prototype of a new application

development framework for development of telephony

services. Besides the first party call control, the framework

provides support for third party call control, monitoring and

presence service, which is based on publish/subscribe

mechanism. The programming interface that framework

provides maps successfully to mechanisms of SIP protocol and

its extensions (those based on SIP event notification

mechanism), but for the first party call control peer-to-peer

telephony maps successfully to H.323, as well. We have

developed the prototype of the framework in Java

programming language. Paper presents solutions that have

been applied in the design and implementation of the

prototype.

Keywords-SIP, telephony services, application framework,

call control

I. INTRODUCTION

An important part of telecommunications services today is based on other features as well as on traditional telephony service. Applications which include telephony, presence and instant messaging features gained great popularity. SIP includes other mechanisms besides peer-to-peer telephony, but between the session layer mechanisms provided by SIP and application software there is a need for a framework for development of applications. The basic contribution of such a framework is to provide single, unified, integrated programming interface for control of distributed elements of SIP telephony network.

This paper presents most important features of the framework.

A. SIP Protocol

Actual version of SIP, version 2, dates from 2002[1]. This document includes the necessary features for first party call control of peer-to-peer VoIP telephony. Extensions for features like conference, third party call control, presence and instant messaging are specified in separate RFC documents.

The cornerstone of both third party call control and presence is SIP event notification mechanism [2]. This is a generic mechanism and for each specific application of this mechanism, a separate package is developed. The package includes further specification of message exchange required for specific application in case and message format. Message format is usually based on XML (example: presence package

[3] and PIDF format [4] used for presence services). Besides the notification mechanism, SIP platform for third party call control is complemented with the concept of back-to-back user agent (B2B UA). This element of SIP network contains two user agents (in each session, server side of one and the client side of the other are active) and the application atop of them. Typically that application realizes services that require interception of media stream and signaling between two sides that communicate. Examples of the use of B2B UA are applications that require from users to enter data (e.g. identification numbers) before audio/video session with remote user is established.

This paper presents the way in which possibilities for control of aforementioned mechanisms are included in the framework.

II. DESIGN OF THE FRAMEWORK

The first step in the realization of the framework is analysis of structure and characteristics of telephony network. The subjects of analysis are following widely used telephony networks: - circuit switched telephony (PSTN, ISDN) [5] - VoIP telephony based on SIP and H.323[6]

As SIP is the most complete and prevalent telephony platform today, the design of the framework is strongly influenced by its characteristics. The protocol stack of a framework based application could include TCP, UDP, TLS, and/or SCTP at the transport level, SIP or H.323 at the session level and a framework supported telephony application at the application level.

The framework supports following features: - first party call control peer-to-peer telephony - third party call control peer-to-peer telephony - instant messaging - presence services - monitoring of the state of logged-in users and active

sessions - network side applications (e.g. call distributor etc.)

The most important entities of class hierarchy are: - AppLayerEntity interface - NetPoint class - SignalingDevice class

AppLayerEntity and NetPoint are roots of inheritance trees. Classes that present the most important logical concepts of telephony domain - feature (telephony feature) and session realize the AppLayerEntity interface. We have

2009 Fourth International Conference on Digital Telecommunications

978-0-7695-3695-8/09 $25.00 © 2009 IEEE

DOI 10.1109/ICDT.2009.10

11

Page 2: [IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France (2009.07.20-2009.07.25)] 2009 Fourth International Conference on Digital Telecommunications

found it convenient to relate the class that represents the end user of the telephony services with the same inheritance relationship to the AppLayerEntity interface. Although there are differences between session and end user concepts, unified interface has proved to be useful in several cases during the development. That is the consequence of the fact that both are application layer logical concepts and subjected to same procedures – monitoring, etc.

All structural components of telephony network are inherited from the NetPoint class. In the case of RoutingPoint class, which presents structural components of the infrastructure, inheritance tree is continued with RoutingPointExt class that includes support for network side telephony applications. Figure 1 presents UML deployment diagram of framework based application. It can be seen that there are different types of nodes that perform different functions: - end user access - routing - monitoring - third party call control

Software entities performing these functions do not have to reside on physically separated computers in all cases – some functions can be collocated.

Figure 1. UML component deployment diagram

SignalingDevice class is an interface to the underlying

session layer protocol. During the development, simple SIP-like (with several important mechanisms significantly simplified or excluded) protocol has been realized. It allowed us to implement virtual telephony network on one PC computer.

The presence service is based on the monitoring feature of the framework. The framework presumes existence of a monitoring server in each domain. All events of interest are reported to the monitoring server. Applications that need to be notified of important events subscribe to the server. Thus, publish-subscribe relationship is established. Actual

implementation of the server monitors the state of objects of two classes: session and end user. But monitoring server is designed to be extended in a straight-forward way.

Third party call control is supported through two classes: P3Server and P3Session. P3Server presents structural component of the network infrastructure, while P3Session is a class that allows application to leverage supported third party call control functions. Design of the framework is such that if application needs monitoring service, it is enough to instantiate object of the appropriate class (EndUserObserver or SessionObserver) with parameters that identify the object of monitoring (user address or addresses of users that participate in the session). Callback functions of the observer object are invoked when triggered with specific events.

In the similar manner, if the third party controlled session establishment is required, it is enough to instantiate P3Session object with parameters that are addresses of two sides, and to invoke appropriate method of the P3Session object.

In order to support other telephony services (this can often be mapped to supplementary services of ISDN), a generic class Feature that is the root of inheritance trees for classes that model specific features (CallWaiting, etc.) has been developed. The possibility of simultaneous existence of different features has lead to the development of feature manager class FeatureMng. The feature interaction control is the responsibility of two classes: FeatureMng and the specific feature class (that inherits from the Feature class). Each message received from the network is first processed by FeatureMng object. This object contains a table that tells the object that the received message should be dispatched to. In case that several objects (of different classes) have interest for a specific message, priorities are introduced. For this reason, FeatureMng object is the "intelligent" object - it contains domain specific knowledge. Certainly, there is space for improvement of this mechanism – e.g., this knowledge can partly be presented as a configuration script.

Figure 2 presents a segment of the class hierarchy. It can be seen that Feature class is the parent of VirtSession, which in turn is the parent of Session and P3Session classes. The reason for such relationship is following. Feature class presents a "service" in terms of ISDN. Session models "basic service"[7], in the same terminology. For that reason, Session is subclass of Feature. Session class provides a first party call control interface. Those attributes of the class that model the most important properties of the peer-to-peer relationship are aggregated in a parent class - VirtSession. Thus, VirtSession contains those properties of the session that are independent of the type of control, e.g. identification and state. This class is the parent of both Session and P3Session classes - one containing first party, and the latter containing third party call control interface for control of the peer-to-peer telephony session. Both classes support the following operations on session: - establishment - transfer - modification - termination

12

Page 3: [IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France (2009.07.20-2009.07.25)] 2009 Fourth International Conference on Digital Telecommunications

Feature is also the parent of CallWaiting. This is how other typical telephony features ("supplementary services" in terms of ISDN [7]) should be incorporated in the hierarchy – by inheriting directly or indirectly from the Feature class.

Figure 2. UML class diagram of a segment of class hierarchy

Besides the aforementioned control of feature interaction,

other possible routes of further investigation are: - inclusion of security features (authentication, encryption

of signaling messages, etc), - inclusion of QoS mechanism, - support of management services (configuration of end

points, activation/deactivation of specific features, etc.).

III. THE EMPIRICAL RESULTS

The functional correctness of implementation has been verified by performing a set of test cases. The test cases included the first and the third party call control of session establishment, modification, transfer and termination. Also, the first party call control of the so called Call Waiting feature has been tested. Tests have been performed on simple network topologies, usually consisting of one telephony domain. Typically a domain has had one RoutingPoint object, one P3Server object, one ObServer object, and

several Endpoint objects. Typically at each endpoint, one or two telephony features have been active at any moment. The performance under high network load has not been tested yet. Tests proved the correctness of implementation.

In order to identify critical components from the software engineering point of view, several software metrics have been evaluated:

1. number of lines of code, 2. cyclomatic complexity 3. depth of the inheritance tree 4. number of execution paths 5. depth of nested structure blocks

The metrics 1, 2, and 3 have been measured for classes while metrics 4 and 5 have been measured for functions. The Tables 1, 2, and 3 present software metrics 1, 2, and 4 of the Java prototype.

We can see that SigDeviceSimTCP which realizes the virtual physical network on one PC is significant both in terms of the number of code statements and maximum cyclomatic complexity. FeatureMng class that realizes message dispatching and controls and coordinates feature interaction is the most complex class in the package. SubPubTopic class realizes parsing of event notification messages and ObServer functions like topic based publish-subscribe server [8].

With respect to the number of execution paths function FindEventProcessor which is by far the most complex function in the package, belongs to the FeatureMng class and does message dispatching. GetNewState function realizes parsing of event notification messages (in SubPubTopic class) while function OnPublish of the ObServer class analyzes received event notification message and determines which objects (subscribers) have registered for notification about the event described in the message. OnPublish function in P3Session class contains important part of the functionality of third party call control. Based on the content of the received event notification (which carries the state of remotely controlled network objects) and the type of invoked call control operation, it determines which action should be performed next and invokes appropriate functions. DispatchCommand function of the SignalingDevice class parses the received message. This is the first parsing of the received message; the second one is realized in the FeatureMng class.

Average cyclomatic complexity for classes in the package ranges from 0 to 2.

Maximal depth of the inheritance tree in the package is 5. Maximal depth of the nested structure blocks is 6 – and it is in the FeatureMng class.

IV. RELATED WORK

Published literature on the subject is extensive, so the listed references are only a part of those that are available. A SIP based platform that offers features like conference and network games is presented in [9]. The platform offers an XML based API that is independent of SIP, but also possibility of "tunneling" (directly accessing the underlying SIP stack).

13

Page 4: [IEEE 2009 Fourth International Conference on Digital Telecommunications (ICDT) - Colmar, France (2009.07.20-2009.07.25)] 2009 Fourth International Conference on Digital Telecommunications

Ref. [10] presents a VoIP services platform based on a quality of service (QoS)-aware overlay network and a publish/subscribe middleware system. In both cases, the framework can be used for end-user invocation of services in such an environment with an effect of significant simplification and reduction of development time and effort.

A solution for termination of PSTN services in the Internet is presented in [11]. Applying the framework presented in this paper on such a platform for cross-over services is a more challenging task than in previous cases because of significant differences between the two domains. Since the solution presented in [10] is based on SIP event-notification mechanism, it should be achievable and would result in simpler development of telephony applications in the cross-over segment, similar to the previous two cases.

V. CONCLUSION

This paper presents a new framework that supports development of applications that make use of telephony services or development of complex telephony services that use simple telephony services as basic building blocks. We have developed a prototype of the framework in Java programming language. Design of the framework is strongly influenced by features of SIP and its extensions, but an effort has been devoted to the analysis of other environments (PSTN, ISDN, H.323) in order to make more general and extendable framework. Framework supports first and third party call control of peer-to-peer telephony, presence service, instant messaging and monitoring applications.

REFERENCES

[1] J. Rosenberg, H. Schulzrinne, G. Camarillo, A. Johnston, J. Peterson, R. Sparks et al., SIP: Session initiation protocol, RFC 3261, Internet Engineering Task Force, June 2002

[2] A. B. Roach, SIP-Specific event notification, RFC 3265, Internet Engineering Task Force, June 2002

[3] J. Rosenberg, A presence event package for the SIP protocol, RFC 3856, Internet Engineering Task Force, August 2004

[4] H. Sugano, S. Fujimoto, G. Klyne, A. Bateman, W. Carr, & J. Peterson, Presence information data format (PIDF), RFC 3863, Internet Engineering Task Force, August 2004

[5] ITU-T Q.71 - ISDN Circuit Mode Switched Bearer Services, ITU-T, 1993

[6] H.323, Visual Telephone Systems and Equipment for Local Area Networks Which Provide A Non-Guaranteed Quality Of Service, ITU-T, November 1996

[7] ITU-T Q.250 - ISDN Service Capabilities, Definition of Supplementary Services, ITU- T, 1988, 1993

[8] Patrick. Th. Eugster, Pascal A. Felber, Rachid Guerraoui, Anne=Marie Kermarrec, The Many Faces of Publish/Subscribe, ACM Computing Surveys, Vol 35, No.2, June 2003, pp.114-131

[9] A. Singh, A. Acharya, P. Mahadevan, and Z.Y. Shae, SPLAT: A unified SIP services platform for VoIP applications, Int. J. Commun. Syst. 2006; 19:425444, DOI: 10.1002/dac.786

[10] Wu W., G. Fox, H. Bulut, A. Uyar, and T. Huang, Service oriented architecture for VoIP conferencing,Int. J. Commun. Syst. 2006; 19:445461, DOI: 10.1002/dac.803

[11] V. K. Gurbani, X. H. Sun, Terminating Telephony Services on the Internet, IEEE/ACM Transactions On Networking, Vol. 12, No. 4, August 2004

Table 1: Classes with the largest number of statements of code.

Class EndUser FeatureMng Session SigDeviceSimTCP SignalingDevice

Statements of

code

156 126 103 148 169

Table 2: Classes with the greatest maximal cyclomatic complexity

Class FeatureMng SubPubTopic ObServer SignalingDevice SigDeviceSimTCP.

RouterThread

Max Cyclomatic

Complexity

23 11 11 10 9

Table 3: Functions with the greatest number of execution paths

Function FeatureMng.

FindEvtProcessor

SignalingDevice.

Dispatch

SubPubTopic.

GetNewState

P3Session.

OnPublish

ObServer.

OnPublish

Number of

execution paths

2568 512 516 72 52

14