IP telephone value-added business implementation technology based on SIP protocol

xiaoxiao2021-03-06  45

Based on the SIP-based IP telephone value-added business realization technology Wang Yu, Le Zhengyou (Tsinghua University Electronic Engineering Department, Beijing 100084) Abstract: SIP protocol and SIP protocol-based IP telephone value-added business implementation technology, and to SIP CGI, Several SIP programming techniques such as CPL, SIP Serv-lets, Jain Apis were analyzed and compared, summarized the general method of developing IP telephony value-added services. Keywords: intelligent network; IP phone; agreement; value-added business in one, in recent years, with the increasing popularity of the Internet, IP telephone technology based on group exchange has developed rapidly. The initial IP phone can only achieve simple calls of PC to PC, with the emergence of H.323, SIP and other related IP phone protocols, IP telephony technology is getting more and more perfect, almost all traditional telecom business can It is achieved on the IP network. Not only that, IP telephony technology can also combine traditional telecom services to Internet applications, such as integrated 800 calls in the web, using media streaming technology to implement voicemail, etc., thereby providing more business types than traditional telecommunications networks. How to develop IP phone applications quickly and easily on the basis of the existing IP phone agreement, implementing various IP telephone value-added services, has become one of the core issues in today's IP telephone technology. This article will discuss the development and implementation of IP telephone value-added services as an example, and then describe SIP CGI, CPL, SIP Servlets, Jain APIS, etc., and compare their respective features and applications for specific instances. And analysis, summarizing the general method of developing IP telephone value-added services. Second, SIP Profile SIP (SESSION INITITION Protocol) protocol is proposed by the IETF (Internet Engineering Task Force) Working Group, is an application layer protocol for establishing and controlling multimedia sessions, of which Multimedia sessions include multimedia conferences, distance education, IP phones, and similar applications. The SIP protocol supports unicast and multicast communication, supports name mapping and redirection services, supports realization of telecommunications services such as call forwarding, call rejection, support user mobility. 1SIP function and component generally, SIP protocol supports the functions of the following aspects in multimedia communication: (1) User positioning: determine the location of the terminal system in communication; (2) User availability: Determine if the called party is willing Participate in communication; (3) Performance negotiation: Determine media and media parameters used in communication; (4) Session establishment: Call two session parameters; (5) Session management: including session transfer and abort, session parameter change, call new business Wait for content. Communication systems with SIP protocols should include two components: SIP User Agents (User Agent is short-handed UA) and SIP network servers. The SIP User Agent is a terminal system component, and the SIP network server is a network device that handles a large number of call signaling. The SIP user agent UA is divided into a user agent client (User Agent Client) and UAG) and User Agent Server (User Agent Server, Short Cry UAS), the former initiates a call, the latter answers a call.

The SIP network server includes three types of SIP Proxy Server, SIP Redirect Server, and SIP Registrar. After the SIP proxy server receives the call request, determine the called party by address parsing, then forward the request to the next hop server. The SIP redirection server sends the address information of the called party to the caller after completing the address resolution, allowing the caller to send a request directly to the next hop server. The SIP registration server is used to accept the client's registration request and provide a location service.  Message Mechanism SIP in Diagram is a text-based protocol, which is divided into two categories: from the client to the server request and the response from the server to the client (Response). Regardless of whether the request message or the response message is composed of a start-line, a message-header, and an optional message body (Message-body). The head field of the SIP message mainly has from, TO, CALL-ID, CSEQ, VIA, Contact, and the like, and various related parameters for identifying the session, and optional message body parts are typically used to describe the communication capabilities of both sessions. The starting line of the request message is called a request-line, where the "Method" field indicates the function of the request message. SIP protocol defines 6 methods: (1) Register: Used to register contact information; (2) invite: Used to invite users to join session; (3) ACK: Used to respond to invitation; (4) Cancel: used for Cancel the unfinished request; (5) BYE: Used to terminate the session; (6) Options: Used to ask the server performance. The starting line of the response message is called a status-line, where the status code field indicates the response result of the called party to the request. The status code defined by the SIP protocol is a 3-digit integer, which is also divided into six categories: (1) 1xx (status code between 100 to 199): This paper is pushed below: Temporary response - call processing; 2) 2XX: Successful response - request is successfully received, understands and accepts; (3) 3XX: Redirect Response - Need to take a further action to complete the request; (4) 4XX: Client error - Client requests include grammar Error or cannot complete the request in the server; (5) 5xx: server error - server unable to complete legal request; (6) 6XX: Global Failure - No server is unable to complete request. 3SIP Call Example Figure 1 depicts a typical SIP call. User1@sip1.com as a UAC hopes to call with user2@sip2.com, he first issues an INVITE request, and the local SIP proxy server SIP1.COM accepts this INVITE request, send it to the SIP proxy server SIP2 .com, simultaneous sip1.com returns to USER1 a 100 Trying message. After Sip2.com receives the INVITE request of SIP1.com, forward it to user2@sip2.com and returns a Trying message to SIP1.COM.

User2 After accepting the INVITE request, the response will return to SIP2.COM a 180 Ringing message, this Ringing message will be forwarded to SIP1.com, USER1. If USER2 determines the call, return a 200 OK message, this message passes through SIP2.COM, and Sip1.com finally reaches User1. User1 After receiving a 200ok message, send an ACK confirmation message to USER2 directly. The call setup process is completed, and the media channel can be established between USER1 and USER2. When one party wants to end the call, send a BYE message to the other party, the other party returns a 200 OK message, and the SIP call is terminated. In IP-based IP telephone value-added business implementation scheme in 1  Telephone value-added business profile Traditional telecommunications network telephone traffic is divided into three categories: traditional telephone services with incoming exhalation function, including call transfer, triplet call, voice The new service of the function of the mailbox, as well as a wide application telephone value-added business in recent years. The current telephone value-added service provided by the telecom department has a telephone voting business, billing card call service, 800 business and 200 card business. The traditional telecommunications network of telecommunications network is mainly implemented by intelligent network (Intelligent NetWork, Similar IN). The intelligent network is an additional network structure set by the original communication network. Its maximum feature is to separate the switching of the network with the control function, and put the network in the network network in the network. Intelligent Concentrates to several new feature - a large computer called a business control point of the smart network, allowing the original switch to complete the basic connection. For IP phones, since it architecture is above the Internet, its value-added business is much more, and the implementation is also different from traditional telecommunications network. Take 800 business as an example. In traditional 800 business model, users can only call 800 numbers through the telephone terminal, and IP phones can combine 800 services to Web services to implement "click-to-Dial", that is Users can enjoy the 800 service by clicking on the web, while companies can also integrate more information into the 800 business through the Internet.  The SIP protocol of DuqiP value-added business can be said to be a protocol that is tailored for IP telephony. In fact, it also reflects its advantages in implementing new business services in the design of the SIP protocol. For example, if a call transfer is implemented in the SIP protocol, there is almost no other job, because the SIP protocol itself contains support for call transfer and user mobility, users only need him currently The terminal is registered on the SIP positioning server, and all calls to the user can easily transfer to the current terminal. The SIP protocol also borrowed the successful methods of HTTP and SMTP protocols, and many expansion performances were introduced, and the SIP protocol itself is based on text, which provides convenient for the implementation of SIP value-added services. However, it is far less than a variety of IP telephone value-added services that only rely on the SIP protocol itself. In the IP telephone network using the SIP protocol, realizing a wide range of value-added services must rely on the service function module to control the action of network system components. Take the "Click-to-Dial" 800 business mentioned earlier, if a company wants to classify users using the "Click-to-Dial" mode to call 800 business, according to the question, according to the pre-sales consultation , Technical support and after-sales service 3 categories transfer call to different customer service representatives, then simply provide problem category information when the user clicks on the 800 call, send the problem category information together to the SIP server together, the server The end is judged by the service function module and corresponds to the SIP address represented by the corresponding customer service, so that the classification function of the 800 call can be easily implemented.

The basic model of the IP telephone value-added service based on the SIP protocol is implemented as shown in Figure 2. When the SIP server accepts the request or response, the information is passed to the service function module through the program interface. The service function module issues an instruction to the SIP server based on the collected information, and the SIP server continues to execute based on the instruction obtained. The models that are separated by business function modules and servers are not unique to the SIP value-added business, and similar ideas are used in the smart network mentioned earlier. When the call sets the message reaches the switch of the smart network, the switch does not directly process, but passes it to another separated device - service control terminal (Service control point, short-handed SCP), and then waiting for SCP backup . There are also similar situations in the web service on the Internet. After the web server receives the request information from the user browser, sometimes it does not directly output the content you need to access (for example, to do database query, background data processing, etc.), At this time, the web server will work through the Database from CGI (Active Server Pages), ASP (Java Server Pages). Since the text protocols such as SIP and HTTP have strong similarity, when designing business function modules and their program interfaces between SIP servers, we can fully refer to the practice in the web business, and even proven technology such as CGI. Take it. Of course, we can also develop a technical specification to achieve SIP-based IP telephone value-added services in accordance with the SIP protocol and the IP phone. Below we will analyze several major SIP programming techniques. Fourth, the analysis and comparison of several SIP programming technology 1SIP CGI In the Internet area, CGI has been an effective means of performing web programming. Even if the ASP, JSP, the CGI is still in the flexibility of web programming, even compared to the subsequent ASP, JSP. Have your own advantages. As mentioned earlier, due to the similarity of SIP and HTTP, we naturally think of using CGI as a tool for developing SIP services. Specifically, use CGI to develop SIP services with the following advantages: (1) Language independence: CGI can be developed with Perl, C, VisualBasic, and many other languages, as long as they support environment variables; (2) ) The acquisition of head information: CGI can obtain all head information of the HTTP request, which is equally important for the SIP service, because the head information of SIP has almost contains all the useful information of the call, such as a call party, called a party , Theme, address, call status, etc .; (3) Response generation: Another advantage of CGI is that it can generate any part of the response in addition to generating a message body, including head, state code, etc., while others Some programming mechanisms, such as Java Servlets, just consider the message part. For the SIP protocol, the message body is not the most important part of the new business development, so all parts that can generate a response are especially critical; (4) Components reuse: Since the SIP protocol reuses a lot of HTTP syntax, SIP-developed CGI can reuse many of HTTP CGI's useful tools; (5) familiar development environment: Many web programmers are quite familiar with CGI, which also helps them go to SIP development; (6) convenient extension Sexuality: Because CGI is an interface instead of language, it can be easily extended and reused to protocols similar to SIP. To this end, the IETF NetWork Working Group proposed SIP CGI.

Although SIP and HTTP are very similar on the basic grammar and request - the response model, there is a lot of differences between them, such as the SIP can forward a request to multiple requests, can support additional features such as registration, these are HTTP No. These differences between SIP and HTTP have led to the design of the SIP CGI, which is also different from HTTP CGI. For example, SIP CGI allows scripts to perform some special message functions. SIP CGI has introduced a persistent model that allows scripts to exchange time Keep control, and HTTP CGI does not have these functions. The basic model of the SIP CGI is shown in Figure 3. Taking the call forwarding business as an example, after the server receives the client's request, you should decide when to forward how many requests are forwarded by the CGI program, and when it returns a response to the client. The CGI program can also change and create head information for the SIP message, which also makes the implementation of the SIP value-added business more flexible.  2CPL CPL (Call Processing Language) is a language for describing and controlling IP telephony services by ITF's IPTEL (IP Telephony) Working Group. The CPL is not limited to a specific signaling system or protocol, and the IP telephone system with SIP or H.323 can use the CPL to develop new services. The design of the CPL refers to the creation model of the smart network service. First we can use a decisiongram to simulate the business process of the IP phone. The node of the decision map represents the primitive of the CPL language, which is connected to the directional arrow to completely describe the business process. Figure 4 is a simple call forwarding or redirection business decision map based on caller. When the call arrives at the server, according to the domain name of the caller address, it is determined: if it is example.com (ie, as the name of the caller address domain, meaning It may be the call of the company's colleagues), then forward the call to the called party; if not example.com, the call is redirected to the called party's voicemail address. If the previous class encounters a busy tone, timeout or call fails, the call will be redirected to the voicemail address of the called party. After completing the decision chart of the business process, we also need to convert the chart into a server-readable CPL script. The CPL is designed based on XML (Extended Markup Language), without using scripting languages ​​such as Perl, TCL, Python, has not used programming languages ​​such as Java, because XML features very compliant with CPL design requirements. . First, XML is well suited to represent structured data, especially selective tree structures. Second, the XML script can be used in both machine analysis, and can also be directly read. In addition, XML also has good scales, which is also very important for CPLs used to develop IP telephony services. CPL call processing consists of a series of nodes and outputs, which are described by XML tags. The Node of the CPL is divided into four categories: Switches, used to represent the possible decisions and subsequent actions of the CPL script; Location Modifiers, used to add or delete addresses in the address collection; Signalling Operations, used to control the action of the underlying signaling protocol; Non-signing Operations, is used to trigger actions that are unrelated to signaling. Compared with SIP CGI, the advantage of CPL is that the description of the business process is very clear, and it has brought great convenience to developers, and even end users can implement simple call control by designing CPL scripts.

However, the design idea such as the CPL enables the developer to take additional consideration of its security and integrity, otherwise the CPL script will make it easy to generate destructive impact on the server. This also leads to the CPL approach to flexibility to be lacking than SIP CGI, so SIP CGI is suitable for developing more complex SIP services, while CPL is suitable for developing business processes clear IP phone applications. 3Sip Servlets Servlets is a server-side component written in Java, protocols and platform, which uses the Request / Response mode, providing a Java-based network server solution that dynamically expands Java Network Server. Like the HTTP servlets in the web business, the SIP service developers are also a good choice other than SIP CGI for SIP business developers. The IETF organization proposed a draft of SIP Servlets in September 1999. As the Java extended API of the SIP server, SIP Servlets can extend the functionality of the SIP server to control the process of SIP messages to achieve a more rich SIP service. With the SIP Servlets extended SIP business, as shown in Figure 5, it can be seen that it is very similar to the SIP CGI model. When the call request arrives at the SIP server, encapsulate the SIP message into a SIP object, send it to SIP Servlets, and SIP Servlets can read or change SIP header information, message body, status line, etc., by control of SIP objects, SIP Servlets can decide how to respond and forward requests. In addition, SIP Servlets can also initiate new SIP transactions. Ervlets technology is compared with CGI, its greatest advantage is that servlets can handle multiple requests to clients only need to create a process. When servlets are activated by the client's first request, they will continue to run in the background, each later The request will only produce a thread instead of the process, so multiple customers can be served simultaneously at the same process. CGIs create a process for each request, obviously the latter's overhead is much larger, and multiple customers cannot be served in the same process. In addition, since SIP Servlets is based on Java-based expansion API, it also has good portability and cross-platform characteristics. 4jain APIS Jain API is a Java Community Process promoted a set of Java technology-based APIs, mainly to quickly develop next-generation telecommunications products and services on the Java platform. Jain APIs contains a range of APIs, including 3 APIs related to the SIP protocol: Jain SIP, Jain Sip Lite, and SIP Servlets. SIP servlets have been described in detail in front, and it is no longer repeated. The Jain SIP API is fully based on the IETF SIP specification (RFC 2543), which provides an interface between the SIP protocol stack to the SIP application, so that the SIP application can interact with objects encapsulated by the SIP protocol. As shown in Figure 6, the SIP message is encapsulated in Event Objects and is only passed between Jain Sip Listener and Jain Sip Provider. Jain Sip Provider provides an interface for applying the SIP protocol stack service. Jainsip Listerner is used to get the services provided by Jain Sip Provider.

转载请注明原文地址:https://www.9cbs.com/read-91268.html

New Post(0)