Using SIP for VoIP Call Control

Document Sample
Using SIP for VoIP Call Control Powered By Docstoc
					                                                           Open Access Application Note


Using SIP for
VoIP Call Control
Featuring NMS’s SIP Software for Natural Access

                       SIP in the VoIP Environment
                       Session Initiation Protocol (SIP), which is defined in Internet Engineering Task
                       Force (IETF) RFC 3261, is now in contention for leadership as the most widely
                       used voice over IP call control protocol. SIP is a text-based protocol, similar to
                       HTTP and SMTP, designed to manage multimedia sessions over the Internet and
                       address advanced audio services, such as conferencing and announcements.
                       While SIP is responsible for determining the peer IP address and port number on
                       which to communicate, it does not perform the actual physical transport of the
                       media. This is usually done via TCP/IP.
                            SIP methods (messages) establish connections between two or more SIP
                       User Agents, where a User Agent can be a SIP phone, a PC running a SIP client,
                       or a gateway. SIP provides standard telephony service features such as call hold,
                       unattended transfer, call forward, and three-way conference, as well as advanced
                       features such as find-me, presence, and call screening. Many of SIP’s features
                       are managed using SIP servers.
Using SIP for VoIP Call Control                                                                                                                                   


SIP Call Signaling Flow                                  between the two sides. The called end responds        message. A two-way voice and/or video connec-
Figure 1 illustrates the steps involved in setting up    with a SIP TRYING message to acknowledge the          tion is now established.
and terminating a call using SIP. With time pro-         call request. Signaling then proceeds on the called         The call continues without any SIP message
gressing down the page, it illustrates a call placed     side to set up the call and generate ring.            exchange until the called side hangs up, which
over an IP network between two telephones on the               When ringing is successful, a RINGING           results in the SIP stack generating a BYE message
PSTN. The initiation of a call from the PSTN side        message is returned to the caller side, where the     (Area C in Figure 1). The caller side proceeds with
(Area A in Figure 1) drives the start of the SIP call.   appropriate ringback can be generated to the          the disconnect on its side and acknowledges the
On the “caller” side, the stack issues an INVITE         caller (Area B in Figure 1). When the called side     call termination with an OK message. Refer to RFC
message to initiate a call to the “called” end.          goes off hook, a connect is performed on this         3261 for details about the content and format of
The INVITE message comprises the basic call              side, enabling the media stream. The SIP stack        these messages.
set-up information, such as the called and caller        generates an OK message to indicate this state
                                                                                                               Using SIP in the Natural Access
addresses, proxy information, and vocoder details        change. In response, the caller side connects the
                                                                                                               Development Environment
to negotiate a common media vocoder format               call and acknowledges the connect with an ACK
                                                                                                               With the release of Natural Access™ 2005-1, NMS
Figure 1: SIP Call Flow                                                                                        offers developers two options for using SIP in their
                                                                                                               application:

                                                                                                               ■ Choose a SIP stack from another source and
                                                                                                                  use the application to bridge the stack to
                                                                                                                  Natural Access

                                                                                                               ■ License an NMS-provided SIP stack,
                                                                                                                  which is accessed through the
                                                                                                                  Natural Call Control™ (NCC) API

                                                                                                               Using a Third-Party SIP Stack
                                                                                                               There are a number of SIP stack vendors to
                                                                                                               choose from, each with their own advantages and
                                                                                                               disadvantages. NMS has written demonstration
                                                                                                               applications with two SIP stacks, proving the ease
                                                                                                               of using the application to bridge between the SIP
                                                                                                               stack and the Fusion™ voice-over-IP software and
                                                                                                               Natural Access development environments. To
                                                                                                               assist developers in the design of SIP-controlled
                                                                                                               User Agents, NMS has created the Fusion SIP
                                                                                                               Sample Application (FSSA which is available on
                                                                                                               the software download page, under Fusion 4.2 for
                                                                                                               Windows). FSSA demonstrates a simple call set up
                                                                                                               between two parties using a Fusion-based gateway
                                                                                                               and a SIP stack. The following section describes
                                                                                                               this sample application and demonstrates the ease
                                                                                                               of integrating an “independent” SIP stack with
                                                                                                               Fusion to create a SIP-controlled gateway.
                                                                                                                   Fusion-SIP Gateway Sample Application
                                                                                                               (FSSA) Overview — Multimedia gateways
Figure 2: Gateway Control and Media Functions
                                                                                                               include both control and media functions, both of
                                                                                                               which are tied together by the application as dem-
                                                                                                               onstrated in the Fusion SIP Sample Application.
                                                                                                               Control functions are managed by the SIP stack
                                                                                                               using an API to process call signaling messages
                                                                                                               across the Internet. Media functions are controlled
                                                                                                               through the Fusion API which is responsible for the
                                                                                                               transmission of voice or data and the associated
                                                                                                               encode or decode operations.
                                                                                                                    Fusion includes the Media Stream Packet
                                                                                                               Processing protocol (MSPP), which allows the
                                                                                                               easy creation of end points and a virtual channel
                                                                                                               to connect the two end points. Typical gateway
Using SIP for VoIP Call Control                                                                                                                                     

end points are a DS0 digital voice stream and a       Licensing an NMS-provided SIP stack                    are also available through the NCC API. NCC iso-
RTP packet processing engine. Functions such as       Beginning with Natural Access 2005-1, NMS has          lates the developer from the details of the protocol,
compression and decompression are contained in        licensed and integrated a SIP stack from a leading     thus making application development quicker and
the virtual channel between the end points. Figure    vendor, RADVISION. The developer’s application         easier. To illustrate the level of abstraction, Figure 3
2 illustrates how the application connects the con-   has access to that stack through the Natural Call      shows an NCC connection setup call and the
trol and media functions together.                    Control API. ISDN and CAS call control protocols       resulting SIP INVITE message generated.


Figure 3: NCC Connection Setup Call and SIP INVITE message

  NCC Connection Setup Call
  DWORD                      b[1024];
      NCC_SIP_INFO               *ie;
      char                        body[1024];

        NCC_SIP_INFO_INIT                ( b, &ie );

        // Address information is required.
        //
        NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_TO_FULL_ADDRESS,                                              “<sip:user2@nmss.com>” );
        NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_FROM_FULL_ADDRESS,                                            “<sip:user1@1.1.1.1:5060>” );

        if (MethodOne)
        {
            // Method 1: supply SDP information based on individual pieces.
            //
            NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_ORIGIN_ADDRESS,  “<sip:user1@1.1.1.1:5060” );

               NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_NET_TYPE, “IN” );
               NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_ADDR_TYPE, “IP4” );
               NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_SDP_CONNECTION_ADDRESS,   “1.1.1.1” );

               NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_TYPE,                                        SDP_MEDIA_TYPE_AUDIO );
               NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_PORT,                                        8006 );
               NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_MEDIA_PROTOCOL,                                    SDP_MEDIA_PROTOCOL_RTP );

               NCC_SIP_INFO_ADD_NUM ( b, &ie, SIP_IE_SDP_ENCODING,                                         0 );
        }
        else
        {
               // Method 2: forming your own SDP message.
               //
               // Example of how to do an SDP body without IE’s; i.e., using a whole message.
               //
               sprintf(body,
                   “%s\n%s\n%s\n%s\n%s\n%s\n”,
                   “v=0”,
                   “o=”,
                   “s=”,
                   “c=IN IP4 1.1.1.1”,
                   “t=”,
                   “m=audio 8006 RTP/AVP 0 8”);

               NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_CONTENT_TYPE, “Application/SDP”);
               NCC_SIP_INFO_ADD_STR ( b, &ie, SIP_IE_BODY, body);
        }

        ret = nccPlaceCall( ctahd, digits, 0, NULL, b, &callhd);

  Resulting SIP INVITE message
  INVITE sip: User2@nmss.com SIP/2.0
  Via: SIP/2.0/UDP 159.101.200.095:5060
  To: <sip:User2@nmss.com>
  From: User 1 <sip:User1@1.1.1.1>
  Call-ID: 1234567890
  CSeq: 1 INVITE
  Contact: <sip:User1@1.1.1.1>

  v=0
  o=
  s=
  c=IN IP4 1.1.1.1
  t=
  m=audio 8006 RTP/AVP 0 8
Using SIP for VoIP Call Control                                                                                                                                                                                                                             

The NMS SIP service also includes an SDP                                              Rapid SIP Development                                                                  About NMS Communications
(Session Description Protocol) stack that the appli-                                  with Open Access                                                                       At NMS Communications, we strive to lead in the
cation can use for encoding and decoding the                                          It is clear that SIP has emerged as the standard                                       design, development and distribution of hardware
media negotiation fields included within the body                                     for VoIP call control and next-generation service                                      and software for the communications industry’s
of a SIP message. The negotiation consists of one                                     creation, supporting interoperability with existing                                    most advanced solutions. NMS technology turns
User Agent proposing a media session (specifying                                      telephony systems and mobility. Open Access                                            the promise of tomorrow’s high-value applications
media type, codec, IP address and port number                                         gives you freedom to choose either your own SIP                                        and services into today’s revenue opportunities —
for a media stream) in the SDP body attached                                          stack or a fully integrated version from NMS, sim-                                     by converging voice, video and data, connecting
to the SIP message and the other User Agent                                           plifying development and reducing time-to-market                                       the web to the phone, and spanning current and
either accepting or rejecting the proposed media                                      through universal call control of both IP and TDM                                      next-generation networks. Using NMS products
session.                                                                              applications.                                                                          and services, the world’s leading networking and
                                                                                                                                                                             telecommunications suppliers get their solutions to
                                                                                                                                                                             market faster, and at lower costs.
Definitions, Acronyms, and Abbreviations                                                                                                                                           NMS supplies the essential technologies
                                                                                                                                                                             for voice web services and voice portals; voice-
FSSA: Fusion SIP Sample Application used                                              MSPP: Media Stream Packet Processing
                                                                                                                                                                             enabled customer interaction applications; IP
to demonstrate using SIP stack with NMS products                                      protocol used on Fusion
                                                                                                                                                                             media servers for next-generation enhanced
Fusion: Trademark for NMS’ VoIP gateway                                               PSTN: Public Switched Telephone Network                                                services; packet voice and broadband access
development and runtime environment                                                                                                                                          services, including voice over IP (VoIP), voice over
                                                                                      RFC: Request for Comment; the name for IETF
                                                                                                                                                                             DSL (VoDSL) and voice over wireless local loop
H.323: Protocol originally for conferencing, now                                      standards
                                                                                                                                                                             (VoWLL).
used for VoIP
                                                                                      RTP: Realtime Transport Protocol for streaming
                                                                                                                                                                                         Visit www.nmscommunications.com
HTTP: HyperText Transfer Protocol;                                                    realtime multimedia over IP in packets
                                                                                                                                                                                                 for more information.
text-based protocol between web server
                                                                                      SDP: Session Description Protocol, a text-based
and web browser
                                                                                      description language used for media negotiation
IETF: Internet Engineering Task Force, which                                          between User Agents
writes standards such as SIP and MGCP
                                                                                      SIP: Session Initiation Protocol
IP: Internet Protocol
                                                                                      SMTP: Simple Mail Transfer Protocol, TCP/IP
ITU: International Telecommunications Union;                                          protocol for sending email between servers
establishes international communications
standards




100 Crossing Blvd.                                           24 Quai Gallieni                                              1815–16 Concordia Plaza
Framingham, MA 01702-5406                                    92150 Suresnes                                                1 Science Museum Road
USA                                                          France                                                        Tsim Sha Tsui East,
Tel: +1 800 533 6120                                         Tel: +33(0) 1 41 38 11 00                                     Kowloon, Hong Kong
Tel: +1 508 271 1000                                         Fax: +33 (0) 1 41 38 11 01                                    Tel: +852 2926 1820
Fax: +1 508 271 1300                                                                                                       Fax: +852 2620 5600
E-mail: info@nmss.com

NMS also has offices throughout North America, Europe, and Asia. Visit www.nmscommunications.com for a complete listing.
The FSSA and SIP stack described in this application note are available for demonstration purposes only, and are not available for commercial use or distribution. Use of the FSSA and SIP stack described herein are subject to acceptance of the applicable
NMS demonstration license agreement. The FSSA and this SIP stack described herein are not supported by NMS Communications, and are provided AS-IS without any express or implied warranties, including, but not limited to the WARRANTIES of
MERCHANTABILITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE. NMS, NMS Communications, Fusion, Natural Access and Natural Call Control are trademarks of NMS Communications Corporation. All other brand or product
names may be trademarks or registered trademarks of their respective holders. 10/04

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:9/24/2011
language:English
pages:4