Search This Blog

Sunday, 25 August 2013

SBC (Session Border Controller)(RFC5853)

SBC-BASICS















The Session Border Controller (SBC) is a SIP B2BUA entity that is commonly used in the borders of network providers. The SBC receives and processes requests as a UAS, which then regenerates and sends as a UAC. In this way it is acting as an intermediary between the origin and destination of VoIP sessions.

    BACKGROUND Of SBCs : 

    These functions include : 
    a) perimeter defense ( access control, topology hiding, and denial-of-service prevention and detection ) 
    b) functionality not available in the endpoints (NAT traversal, protocol interworking or repair) 
    c) traffic management (media monitoring and quality of service (QoS) ).

    some of these functions may also get integrated into other SIP elements.

    SIP - based SBCs typically handle both signaling and media. SBCs often modify certain SIP headers and message bodies that proxies are not allowed to modify. some SBCs modify the session description carried in the message and insert a Record- Route entry. Other SBCs replace the value of the contact header field with the SBCs address and generate a new Call-ID and new To and From tags.
    An SBCs provides functions such as controlling and protecting access to the inner network from the outer network.

    Peering Scenario : 
    A typical peering scenario involves two network operators who exchange traffic with each other.An originating gateway (GW-A1) in operator A's network sends an INVITE that is routed to the SBC in operator B's network. Then, the SBC forward it to the softswitch (SS-B). The softswitch responds with a redirect (3xx) message back to the SBC that points to the appropriate terminating gateway (GW-B1) in Operator B's network. If operator B does not have an SBC, the redirect message would go to the operator A's originating gateway. After receiving the redirect message, the SBC sends the INVITE to the terminating gateway.

    Access Scenario :
    The SBC is placed at the border between the access network (outer network) and the operator's network (inner network) to control access to the operator's network, protect its components ( media servers, application servers, gateways, etc.) from unauthorized use and DoS attacks, and monitor the signaling and media traffic.

    Topology Hiding :
    Topology  hiding consists of limiting the amount of topology information given to external parties. Operators have a requirement for this functionality because they do not  want the IP addresses of their equipment ( proxies, gateways, application servers, etc.) to be exposed to outside parties.
    The most common form of topology hiding is the application of header privacy , which involves stripping Via and Record-Route headers. replacing the contact header, and even changing Call-IDs. However, in deployments that use IP addresses instead of domain names in headers that cannot be removed ( e.g., From and To headers ) , the SBC may replace these IP addresses with its own IP address or domain name.

     Example :
     The current way of implementing topology hiding consists of having an SBC act as a B2BUA     (Back-to-Back User Agent) and remove all traces of topology information (e.g., Via and Record-Route entries ) from outgoing messages.
                                      Then, the SBC performs a topology hiding function. In this scenario, the SBC removes and stores all existing Via and Record-Route headers, and then inserts Via and Record-Route header fields with its own SIP URI. If the SBC loses state ( e.g., SBC restarts for some reason ), it may not be able to route messages properly(note : some SBCs preserve the state information also on restart). For example , if the SBC removes Via entries from a request and then restarts, thus losing state;  the SBC may not be able to route responses to that request, depending on the information that was lost when the SBC restarted.

    * Media Traffic Management

     General Information and Requirements :    
     Media traffic management is the function of controlling media traffic. Traffic management helps the creation of different kinds of billing models (e.g., video telephony can be priced differently than voice-only calls) and it also makes it possible for operators to enforce the usage of selected codecs.
             Since the media path is independent of the signaling path, the media may not traverse through the operator's network unless the SBC modifies the session description. By modifying the session description, the SBC can force the media to be sent through a media relay which may be co-located with the SBC. This kind of traffic management can be done.

    Architectural issues :
    Implementing traffic management in this manner requires the SBC to access and modify the session descriptions (i.e.,offers and answers ) exchanged between the user agents.

    Example :
    Traffic management may be performed in the following way : The SBC behaves as a B2BUA and inserts itself, or some other entity under the operator's control, in the media path. 
    Consider the following example scenario: the SBC receives an INVITE request from the outer network, which in this case is an access network.

    V=0
    O=Owner 2890844526 2890842807 IN IP4 192.0.2.4
    C=IN IP4192.0.2.4
    m=audio 49230 RTP/AVP 96 98
    a=rtpmap : 96 L8/8000
    a=rtpmap : 98 L16/16000/2

    In this example, the SBC performs the media traffic management

    Fixing Capability Mismatches :   
    SBCs fixing capability mismatches enable communications between user agents with different capabilities or extensions. 
    Example :
    The inner network is an access network using IPv4 and the outer network is using IPv6. The SBC receives an INVITE request with a session description from the access network

    Then, the SBC performs a capability mismatch fixing function. In this scenario, the SBC inserts Record-Route and Via headers and rewrites the "c=" line from the sessions descriptor.

    Maintaining SIP-Related NAT Bindings :
    NAT traversal in this instance refers to the specific message modifications required to assist a user agent in maintaining SIP and media connectivity when there is a NAT device located between a user agent and a proxy/registrar. SBCs NAT traversal function is required in scenarios where the NAT is outside the SBC (i.e, not in cases where SBC it self acts as a NAT).
          Note that the SBC does not need to relay all the REGISTER requests received from the user agent to the registrar. The SBC can generate responses to REGISTER requests received before the registration is about to expire at the registrar. Moreover, the SBC needs to deregister the user agent if this fails to refresh its registration  in time, even if the registrar would still be valid.
    SBCs can also force taffic to go through a media relay for NAT traversal purposes.

    Example :
    The SBC resides between the UA and Registrar. previously, the UA has sent a REGISTER request ot the Registrar, and the SBC receives the registration response.
    when performing the NAT traversal function, the SBC may rewrite the expiry time to coax the UA to re-register prior to the intermediating NAT deciding to close the pinhole. 
                          Naturally, other measures could be taken in order to enable the NAT traversal (e.g., non-SIP keep alive messages), but this example illustrates only one mechanism for preserving the SIP-related NAT bindings.

    Access Control :
    This function can be implemented by protecting the inner network with firewalls and configuring them so that they only accept SIP traffic from the SBC. Access control can be applied to either only the signaling or both the signaling and media. If it is applied only to the signaling, then the SBC might behave as a proxy server. If access control is applied to both the signaling and media.
    A key part of media layer access control is that only media for authorized sessions is allowed to pass through the SBC and/or associated media relay devices.

    Protocol Repair :
    Operators may wish to support protocol repair, if they want to support as many clients as possible. It is noteworthy that this function affects only the signalling component of on SBC, and that the protocol repair function is not the same as protocol conversion.

    Media Encryption :
    SBCs are used to perform media encryption/decryption at the edge of the network. This is the case when media encryption (e.g., Secure Real-time Transport Protocol (SRTP) ) is used only on the access network (outer network) side and the media is carried unencrypted in the inner network.



    Advantages:
    1. Topology hiding
    2. One of the advantages of an SBC is that it can provide topology hiding, which means that it works like a NAT, translating all IP addresses (on IP and SIP level) that the SIP messages contain, between the core (private network) and public side. In this way, the core network can be protected, since it can keep its “identity” private.
    3. Security
    4. An SBC can be considered as a “SIP/RTP Firewall”. It protects the core network from unwanted messages with the help of access-lists (on IP and SIP level) as well as it provides admission control in order to put restrictions in the VoIP traffic (for example restrict the amount of concurrent calls, in order not to overload the network). Such restrictions help also in the protection of the network from attacks, for example DoS attacks. Finally different traffic policies can be applied in order to control better the RTP/media traffic.
    5.  Interoperability
    6. An SBC usually provides the possibility to change/manipulate the SIP messages that are coming through it. That means that an SBC can change the content of the SIP messages by manipulating the SIP or SDP headers. This functionality is particularly useful in order to achieve interoperability between different vendor implementations.



      SIP Call flow without SBC:













    SIP CALL FLOW With SBC:









     

                          



     

Saturday, 24 August 2013

Important Points:

SDP Related


  1.   An SDP session description is denoted by the media type  application/sdp".
  2.    An SDP session description consists of a number of lines of text of the form: <type>=<value>
  3. The "t=" lines specify the start and stop times for a session.      t=<start-time> <stop-time>
  4. Currently defined media are "m" = "audio","video", "text", "application", and "message".
  5. If an agent receives an offer after having sent one, but before receiving an answer to it, this is considered a "glare"condition. Here, it means both agents have attempted to send an updated offer at the same time.
  6. If the answerer has no media formats in common for a particular offered stream, the answerer MUST reject that media stream by setting the port to zero.
  7. When issuing an offer that modifies the session,the "o=" line of the new SDP MUST be identical to that in the previous SDP, except that the version in the origin field MUST increment by one from the previous SDP. 

GSM Technology

* GSM : 

>>     GSM( Global System For Mobile Communication) is an open, digital cellular technology used for transmitting mobile voice and data services.
   >>   GSM network is mainly used for speech.  Basic gsm planning is called Green field planning.These are two types :

  •      Capacity planning : depends on traffic
  •      Coverage planning: depends on coverage Area.
>> Capacity sites are divided into two:

  1.  Micro  (1 sector, 2 sector site)
  2.  Macro (3 sector site)

GPRS :  GPRS(General Packet Radio Services) is an extension of the GSM architecture. packet data runs on a new backbone Ip network and is seperate from the existing Gsm core network. that is used mainly for speech.

* EDGE : GSM networks upgraded with Enhanced Data rates for GSM Evolution (EDGE)  technology can provide up to three times the data capacity of GPRS. It is a new modulation method.Enabling higher data bit rates. 

GSM WORLD: 

>>   Basic cell planning process :
  1.   Traffic and Coverage Analysis.
  2.   Nominal cell plan
  3.   Surveys
  4.   Implementation ( installation, comissioning& Testing )
  5.   System tuning.
>>  Different frequency bands Gsm ( 450/800/900/1800/1900 )

  In India following Bands are used :


                                 Uplink (MHz)                Down link(MHz)

GSM - 800                   8xx-8xx                       8xx-8xx
GSM - 1900                 17xx-17xx                   18xx-18xx
P-GSM   900                8xx-9xx                       9xx-9xx
E- GSM  900                8xx-9xx                        9xx-9xx



GSM ARCHITECTURE:






















MSC ( Mobile Servicing Switching Center ) :

                             The MSC is responsible for set-up, routing and supervision of calls to and from mobile subscribers. other functions are also implemented in the Msc, such as authentication.

* VLR ( Visitor Location Register ) : 
                             VLR is a data base containing information about all MSc's that currently are located in the Msc service area. when MS roams into a new Msc Service area.the VLR connected to that Msc requests data about the MS from the HLR and stores it.

* SMS-GM SC(Short message service-Gateway Msc) :

                          A SMS-GMSC is capable of receiving a short message from a service center, interrogating an HLR for routing information and message waiting data and delivering the short message to MSC of the receiving MS.

SMS- IWMSC (Short message service-interworking MSC) :

                         It is capable of receiving a mobile oriented message from Msc and submitting the message to the receipents sc.

* GMSC (Gateway Msc) : 

                        The GMSC supports the function for routing incoming calls to the Msc where the mobile subscriber is currently registered.

* IWU (Inter Working Unit) : 

                       The IWU provides an interface to various networks for data communication. Its main functions include modem and fax adapter. This functionality is implemented in DTI ( Data Transmission Interworking unit).

HLR (Home Location Register) : 

                        HLR is a database holding information about all subscribers belonging to PLMN (Public Land Mobile Network). In PLMN there is one or more HLRs.

* AUC (Authentication center) : 

                       The AUC provides authentication and encryption parameters required for subscriber verification and to ensure call confidentially. AUC stores the 

  • a RANDom number (RAND)
  • a Signed RESponse (SRES)
  • a Ciphering Key (Kc)


* FNR (Flexible Numbering Register ) : 
                          The number portability enables a subscriber to change an GSM operator without changing his MSISDN number.

* BSS (Base Station System ) : 

                         The base Station System is composed of two major components.

  •        Base Station Controller (BSC)
  •        Radio Base Station (RBS)


* BSC / TRC :

                         The BSC can manage entire radio network and performs the following funcs:
          

  •          Handling MS connection and Handover
  •          Radio Network Management
  •          Trans coding and rate adaptation.
  •          Traffic Concentration
  •          Transmission management of the BTS
  •          Remote Control of the BTS


*  BTS or RBS ( Base Transceiver Station ) : 

                             It includes all radio and transmission interface equipment needed in one cell. Each BTS operates at one or several pairs of frequencies. One frequention is used to Transmit signal to MS and one to receive signal from MS.

*CHANNEL CONCEPT : 

The Carrier Seperation in GSM, is 200 KHz.

  • In GSM 900 band carriers are 124
  • In GSM 1800 band carriers are 374
  • In GSM 1900  band carriers are 299


>> Each carrier can be shared by eight MSs.


  • The number of channels in Gsm 900 band 124*8 = 992 channels
  • The number of channels in Gsm 1800 band 374*8 = 2952 channels


* Logical channels : 

                         There are eleven logical channels in the GSM system, two of which are used for Traffic and nine for control signaling.

* Traffic Channels (TCH) : 

                         Two types of TCHs are used :

  •  Full rate channel, Bm-  This channel is used for full rate speech
  •  Half rate channel, Lm -This channel can be used for half rate speech.



 CONTROL CHANNELS :

 * Broad Cast Channel (BCH) : 

  • FCCH ( Frequency correction channel ) : It is used for frequention correction of the MS, downlink only.
  • SCH ( Synchronization Channel ) : It carries information about TDMA frame number and BSIC ( Base station identity code ) of the BTS, downlink only.
  • BCCH (Broad cast control channel ) : Broad casts cell specific information to MS, dwonlink only.
 * Common Control Channels ( CCCH ) : 
  • PCH ( Paging channel ) : It is used to page the MS, downlink only.
  • RACH ( Random Access Channel ) : Used by the MS to request SDCCH or an access to MS call origination / registration.......etc. up link only.
  • AGCH ( Access Grant Channel ) : It is used to allocate SDCCH to an MS, downlink only.

Friday, 23 August 2013

SIP Interview Questions 3

25) How are BYE requests routed?

 A:  Since the contact header must be present in Invite and 200.

 The BYE will go directly to the  user agent if there is no record-route header.
If there is record-route it will traverse the list of  proxies indicated here.

26) Can I cancel  a request other than the first Invite?


 A:  Yes, any request can be can cancelled before it has be executed by UAS.


27) How does a caller find its proxy server?


 A:  Calls typically proceed directly to the callee domain.


28) Why can a forking SIP proxy not be stateless?


 A:  A forking SIP proxy cannot be stateless because it needs to perform a filtering operation,  returning one response out of many it receives.


29) Does SIP do keep alive?


 A:  SIP itself doesn't have a keep-alive mechanism during the call.


30) What is relation between MGCP and SIP?


 A:  MGCP is used between MG and MGC. SIP may be used between two controller for peer to  peer connection. only MGC needs to understand both protocols.


31) Can H.323 and SIP used together?


 A:  Yes, There is only one product (Lucent packet star IP) that allows SIP and H.323 terminals  to call eachother.


32) How do I interconnect ISUP and SIP?


 A:  SIP can be used between SS7 nodes. while all details have not been worked out, the basic  call flow is similar to ISDN case.


* 24)  What is the difference between Transaction, Dialog and Session?

A:  REFER Q2 & Q3 & Q4.

26) How loop can be detected ?

A :  Looped request can be recognized in following way:
  •   The Max-Forward counts is decremented to zero.
  •   The Expires time has elapsed.
  •  The server finds itself in request's VIA list including any branch parameter.

27) What is Call flow of conference ?


28) What is Call flow of two party session?


30) If A take video call and B take audio call , how A comes to know that be is taking Audio call ?


A: 


31) What is SDP ? How can we know there is an Audio/ video call?


A: An SDP session description includes the following media information:

   o  The type of media (video, audio, etc.)

   o  The transport protocol (RTP/UDP/IP, H.320, etc.)

     o  The format of the media (H.261 video, MPEG video,G.711 Audio,
G.729 Audio etc.)

The SDP Parameter  "m=Media Type" describes it is an Audio/Video Call.

32) If Max-forwards reaches to zero.then what happens? 


33) What is the difference between Route and Record-Route?

A: 
 Route: The header field is used to force routing for a request through
 the listed set of poxies.
Record-route: The header field is inserted by proxies(B2BUA)
 in a request to force future requests in a dialog to be routed  through
 the proxy.

34) What is an Early Dialog?

A:  A dialog established by a non-final response to a request  is in
"Early " state and it is also called "Early Dialog".

35) what is SIP URI?

 It contains display Name and domain

36) What is VOIP?

A: VOIP defines Voice Over Internet Protocol. It is the internet
 technology to carry  voice communication and multimedia
sessions over Internet protocol networks such as internet.

37) what is SIP? Where does it lies on OSI Layer?


A: SIP(Session Initiation Protocol) is a Signalling  Protocol.

 It is used to Initiate,Modify and Terminate session. It lies
  on Application Layer. Please refer below diagram.




















38) What are SIP Components?

A:  There are two sip components :-
                        a) User Agent (UA)
                        b) SIP Servers.

39) What are Sip Servers?
A:  Sip servers are following types
  • Proxy Servers
  • Registrar Servers
  • Redirect Servers

40)  What are Codecs?
A: Codec (compression-decompression) is an algorithm which compresses and decompresses a voice packet.The G.711 codec to convert an analog voice to a digitized voice stream.The most widely used codec in VoIP environment is G.729.

41) What are Voip Components ?
A: There are various components which adds up to make voip successfull. Following are the voip components:
  1. IP Phones
  2. Gateways
  3. Gatekeepers
  4. MCUs
  5. Application Server
  6. Call Agent
IP Phones
Handset, or analog phone connected to a voip adapter.
Gateways
The gateway provides translation between VoIP and non-VoIP networks, such as the PSTN.
Gatekeepers
Provides CAC (Call Admission Control) or and bandwidth management. Call admission control is a process used to ensure, or maintain, a certain level of audio quality in voice communications networks, or a certain level of performance in Internet nodes and servers.
MCUs
Multipoint Control Units provides the functionality of call, video conferencing.
Application Server
Application server provide extra functionality such as voicemail, messaging etc.
Call Agent
(Also known as soft switch or Media Gateway Controller) The Call Agent/Softswitch/MGC receives signalling information (like dialed digits) from the Media Gateway and can instruct it to alert the called party, to send and receive voice data etc.
VoIP Functions
Like traditional telephony, VoIP requires some function through which a call can be completed. Following are the functions:
Signalling
Signaling is the capability to generate and exchange call control information that will be used to establish, monitor, and release connections between two endpoints. PSTN Network uses SS7 (out of band) as a transport to exchange messages, however. VoIP network uses H.323, SIP, MGCP, SCCP as signalling. These connect and disconnect messages are carried out by SS7 in case of PSTN. In VoIP environment these messages are carried out by SIp and H323. SIP and H.323 are peer-to-peer signaling protocols where the end devices or gateways contain the intelligence to initiate and terminate call sessions and interpret call control messages.
Database Services
Database services include access to billing information, caller name delivery (CNAM) etc. CNAM is an intelligent service which displays the callers name in the calling party’s phone instead of the caller ID. Database services also include access to calling cards. Another example of Database Service is providing a call notification service which places outbound calls with prerecorded messages at specific times to notify users of events like new plans and packages, wake-up calls etc.

Thursday, 22 August 2013

SIP Interview Questions 2

11)  What is Forking Feature and forking types?

 A:    It sends an Invite requests to all the available users.
         Two Types of Forking.
               Serial Forking:   In this  it sends request to one address, if  that fails then it try second  address.
              Parallel Forking : In this it sends request at a time to all addresses,If any of the user  accept the request others get disconnected.
             
12)  What is Call-ID ?

 A:  It contains a globally unique identifier for all requests and responses sent by either UA in a  dialog, and it is generated by the combination of 'random string' and 'IPaddress'.



* 13)  If user a doesn't have supported media what response is sent?

 A: UnSupported Media -415 is sent from proxy if Codecs doesn't match .


14)  what are SIP Entities/Components?


 A:  There are four Types :
                 a) Registrar Sever
                 b) Proxy Server
                 c) Redirect Server
                 d) UserAgent Server

15)  What are 1xx-responess do you know?


 A:    100- Trying
         180- Ringing
        


* 16)  What is magic cookie?


 A:    The branch ID inserted by an element always begin with the characters "z9hG4bK".                     These 7 characters are used as a "Magic cookie"

* 17)  what is B2BUA server?

 A:      It is a logical SIP Entity server and lies in between both the endpoints.  
  a) It maintains dialog state and must be a part of all the requests sent on the dialogs that it has  established.
 b) It Interprets and rewrites a request message before forwarding it. 


18) Does SIP carry DTMF?


 A:  There are atleast two options for carrying DTMF and smilar signals in a Voip N/W using  SIP.First DTMF can be transported as an RTP payload. This has the advantage that it  provides accurate timing  and alingment with RTP packet currently there is no standardized  solution with in SIP, but it has been proposed to carry DTMF information in SIP Info messages.

19) Do caller need to know the location of the location server?


 A:  The caller doesn't interact directly with the location server. A redirect or proxy server asks  the location  serve for advice.


21) Does SIP do admission control and administer Band width?


 A:  1) Since these offers no real security admission control is not supported by SIP
       2) No, that is the role of a resource reservation protocol.

22) Do i always need a proxy server or redirect server?


 A:  Proxy and Re-direct server are logical Entities.So,sip servers can contact each other  directly.

23) How does caller find its local registrar?


 A:  The local registrar is manually configured.

24) Are Ack requests retransmitted?


 A:  No, An Ack is sent when a response retransmission is received. Ack is only used for Invite.

Monday, 19 August 2013

SIP Inteview Questions

* 1)  what is Media Negosiation ?If SDP is not sent in Invite,when that will be sent?

A: Media Negotiation is nothing but exchange of Media parameters required to establish the session.There is a two- phase exchange done in Invite and 200 OK ,negotiation capabilities is based on basic Offer/Answer model of SDP exchnage.

         Note: If SDP is not sent in Invite,  then it can sent in ACK request.


* 2) What is dialog? How do we identify a dialog?


A: Dialog  is a peer-Peer connection between the end points . An initial request from UAC contains a tag in  'From' header and Call ID. At this point we have half dialog completed. And tag in 'To' header is added by UAS in Provisional responses other than 100-Trying.This completes the "dialog"
Dialog = From tag + To tag + Call Id

* 3) What is Transaction? How to identify?


A: A Request followed by the Final Response is called a "Transaction". 
*It is identified by "C-seq" and "Branch Parameter".

* 4) What is Session? When does Session is Established?

A:  Session is  exchange of media between two or more endpoints. After receving ACK request only Session is established.If we don't receive ACK ,session is not Established.

* 7)  If Max-Forwards reaches to Zero, what response is sent?

A:  483-Too Manys Hops response is sent from proxy. 

* 20) How can we recognize a retransmitted, duplicate or looped request?

 A:  a) The max forward count is decremented to zero.
       b) The Expires time has elapsed.
       c) The Server finds itself in the requests via list, including any branch parameter.

5) What is SDP? How can we know that is an Audio/Video Call?

A:  SDP is also Called Message Body.It describes type media to be used for call. 
Audio call:           m=audio 

Video call:           m=audio 

                             m=video 

6) How can we know that call is on Hold?

A:  1) If  SDP contains an attribute a=sendonly or Inactive, then call is on hold.
       2) Zeroing the IP address or port number in the media descriptor of the stream.

8)  Why ACK is considered as Seperate Transaction?

A: Since this ACK is only re-transmitted by the UAC, Its effectively considered its own transaction.
--> If response is 2XX, then ACK is  Considered as Seperate transaction. 
                               (Ex: Basic call flow)
--> If response was not 2XX, then ACK is Considered as  Same  transaction. 
                               (Ex: Call Busy)

* 9)  Types of Proxies? Difference between Statefull and Stateless Proxies?


A :  Two Types of proxies, Statefull and Stateless poxies.

Statefull Proxy: 

a) It maintains dialog state and must be a part of all the requests sent on the dialogs that it has established.
b)It Interprets and rewrites a request message before forwarding it. 

Stateless Proxy:

a)  It doesn't maintains state.
b)  It just forwards the received requests to other end and send responses on behalf of other.

* 10)  What are mandatory header fields?


 A :  To, From, Via, C-seq, Max Forwards,  Call-ID.

REST API

  API  is an application programming interface. It is a set of rules that allow programs to talk to each other. The developer creates the AP...