Saturday, April 18, 2015

SIP #Points to remember

Notes

1. SDP - Offer /Answer

2. Tags are not part of the To or From URI, but are part of the header and always placed outside any "<>"

3. PRACK - Provisional acknowledgement for 180 Ringing

a) In 180 Ringing response, UAS will send the "RSEQ 314".
b) To response that PRACK will send as acknowldgement to the 180 Ringing response with "RACK 314" and CSEQ as "2" (Seperate transaction from the Invite)
c) And a 200OK will send from the UAS for PRACK with CSEQ as 2

4. To update the session parameters for the established session. ReINVITE is used. Where as for the pending sessions (i.e INVITE send, but no final response recieved), UPDATE method is used

Uses of UPDATE method are: Muting, placing on hold pending media streams, performing QOS or other prior to the session establishment.

5. Methods - INVITE, REGISTER, ACK, BYE, CANCEL, OPTIONS, PRACK, SUBSCRIBE, NOTIFY, PUBLISH, UPDATE, INFO, REFER, MESSAGE.

6. When a user agent recieves a method, which is not supported, Then it replies with 501 - Not implemented response

7. User Agents indicates the supported methods in the Allow header

8. Expires header - used when requests are not responsed by the other end point before session
   Session -Expires - Used when requests are not responsed by the other end point after session establishment.

9. SBC - Used to  connect IP-PBX to the Voip Service providers. Its installed in the end network to connect to the voip service provider. Acts as as Media conversion (i.e G729 to G711, SIP to SIP-I to SIP-TLS) Firewall, NAT Traversal and  provides network security to the internal networks, Call admission control etc
Whereas VOIP Gateway is used to connect IP-PBX to PSTN & ISDN service providers.


Tuesday, October 21, 2014

Linux SNMP OID’s for CPU, Memory and Disk Statistics


Linux SNMP OID’s for CPU, Memory and Disk Statistics

Simple Network Management Protocol (SNMP) is an "Internet-standard protocol for managing devices on IP networks. It is used mostly in network management systems to monitor network-attached devices for conditions that warrant administrative attention. SNMP is a component of the Internet Protocol Suite as defined by the Internet Engineering Task Force (IETF). It consists of a set of standards for network management, including an application layer protocol, a database schema, and a set of data objects.

SNMP exposes management data in the form of variables on the managed systems, which describe the system configuration. These variables can then be queried (and sometimes set) by managing applications.

MIBs and OIDs Overview

SNMP itself does not define which information (which variables) a managed system should offer. Rather, SNMP uses an extensible design, where the available information is defined by management information bases (MIBs). MIBs describe the structure of the management data of a device subsystem; they use a hierarchical namespace containing object identifiers (OID). Each OID identifies a variable that can be read or set via SNMP. OIDs or Object Identifiers uniquely identify manged objects in a MIB hierarchy. This can be depicted as a tree, the levels of which are assigned by different organizations. Top level MIB object IDs (OIDs) belong to different standard organizations. Vendors define private branches including managed objects for their own products.

Here are some useful OID's on Linux:

Network Interface Statistics

List NIC names: .1.3.6.1.2.1.2.2.1.2
Get Bytes IN: .1.3.6.1.2.1.2.2.1.10
Get Bytes IN for NIC 4: .1.3.6.1.2.1.2.2.1.10.4
Get Bytes OUT: .1.3.6.1.2.1.2.2.1.16
Get Bytes OUT for NIC 4: .1.3.6.1.2.1.2.2.1.16.4

CPU Statistics

Load
1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

CPU times
percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0
raw user cpu time: .1.3.6.1.4.1.2021.11.50.0
percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0
raw system cpu time: .1.3.6.1.4.1.2021.11.52.0
percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0
raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0
raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

Memory Statistics

Total Swap Size: .1.3.6.1.4.1.2021.4.3.0
Available Swap Space: .1.3.6.1.4.1.2021.4.4.0
Total RAM in machine: .1.3.6.1.4.1.2021.4.5.0
Total RAM used: .1.3.6.1.4.1.2021.4.6.0
Total RAM Free: .1.3.6.1.4.1.2021.4.11.0
Total RAM Shared: .1.3.6.1.4.1.2021.4.13.0
Total RAM Buffered: .1.3.6.1.4.1.2021.4.14.0
Total Cached Memory: .1.3.6.1.4.1.2021.4.15.0

Disk Statistics

Add the following line to snmpd.conf and restart:

includeAllDisks 10% for all partitions and disks

Disk OID's

Path where the disk is mounted: .1.3.6.1.4.1.2021.9.1.2.1
Path of the device for the partition: .1.3.6.1.4.1.2021.9.1.3.1
Total size of the disk/partion (kBytes): .1.3.6.1.4.1.2021.9.1.6.1
Available space on the disk: .1.3.6.1.4.1.2021.9.1.7.1
Used space on the disk: .1.3.6.1.4.1.2021.9.1.8.1
Percentage of space used on disk: .1.3.6.1.4.1.2021.9.1.9.1
Percentage of inodes used on disk: .1.3.6.1.4.1.2021.9.1.10.1

System Uptime: .1.3.6.1.2.1.1.3.0

Saturday, September 13, 2014

Interview questions.

Networking interview questions.
1. Benefits of OSPF over RIP?
2. What will happen when a new switch boots?
3. Why VLAN is required?
4. How STP works?
5. Why Area 0 is required in OSPF conecpt?
6, ARP purpose.

Sip interview questions:

1.What do you mean by a sip session?
2. explain a simple call flow
3.Draw the call flow for music on hold
4.What is the use of address of record in REGISTER messages.
5.what is record route.
6.Difference between strict routing and loose routing.
7.stateless, stateful and superstateful proxies.
8.what all components are used in a call.

9.use of contact header.
Answer:

The Contact header field describes the SIP or SIPS URI that the originating UA can be contacted at. This is used  both in a request establishing a dialog, registrations and redirects. The Contact header must be present in INVITE messages and be globally unique and accessible. 


10.difference of usage of contact header and connection information in SDP.
Answer:

The  c= field  contains  information  about  the  media  connection.  The  field contains: c=network-type address-type connection-address. The network-type parameter is defined as IN for the Internet. The address type  is  defined  as   IP4 for  IPv4  addresses,  IP6 for  IPv6  addresses.  The  connection-address is the IP address that will be sending the media packets, which could  be  either  multicast  or  unicast.  If  multicast,  the  connection-address  field contains:connection-address=base-multicast-address/ttl/number-of- addresses where ttlis the time-to-live value, and number-of-addressesindicateshow  many  contiguous  multicast  addresses  are  included  starting  with  the base-multicast-address.



11.Use of subscribe and Notify. Real time example.
Answer:

NOTIFY requests simply relay information related to the configured event package to the subscriber.  Since there is no SIP call state change, the subscriber usually responds with a “200 OK”.  There are a few situations in which a subscriber  may want to respond to a NOTIFY request with something other than a “200 OK” response message; those  situations  are  considered  error  states  and  are  not  part  of  this  particular  test.      This  test  requires  that  theNOTIFY request be part of the same dialog that the initial SUBSCRIBE request created.  Since this group of tests explicitly  evaluates  the  SUBSCRIBE/NOTIFY  functionality,  and  therefore  assumes  that  the  subscription  state  is installed via a SUBSCRIBE request.  It is possible that the subscription state would be established out of band, in which case the NOTIFY message would NOT be part of a dialog.

USAGE: Automatic call back


12.Explain Attended Transfer?
13.what is early media and why it is needed?
Answer:

Early media is used to avoid voice slicing. Basically with ISDN to sip gateways , a media path will be established before 200 OK. So the caller at the sip side will get access to any informations like call busy tones, network busy tones. Also this helps to avoid voice chopping because the caller may start to speak without the actual start of the session.


14.What is delayed media?
Answer:

Media negotiation happens in 200 Ok.
Usage: Music on Hold Scenarios


15.DNIS, DID and ANI-details?
Answer:

DNIS: Dialed Number Information Service.
DID: Direct Inward Dialing--> Number used for Dialing.
ANI: Caller ID


16.RTP, RTCP. How Voice Quality metrics are measured.
17.How will you put a call on HOLD? the methods and their explanation.
18.what is DTMF buffer?
19.How will you debug a sip call. What all parameters you will look on.
20.What are the parameters you configure in a gateway?


Reasoning questions:
1. http://brainteaserbible.com/interview-brainteaser-matches-in-a-knockout-tournament
2. http://datagenetics.com/blog/july22012/index.html

Tuesday, September 13, 2011

Test strategy & test coverage

What is test strategy?

A Test Strategy document is a high level document and normally developed by project manager. This document defines “Testing Approach” to achieve testing objectives. The Test Strategy is normally derived from the Business Requirement Specification document.
The Test Stategy document is a static document meaning that it is not updated too often. It sets the standards for testing processes and activities and other documents such as the Test Plan draws its contents from those standards set in the Test Strategy Document.


Components of the Test Strategy document
  • Scope and Objectives
  • Business issues
  • Roles and responsibilities
  • Communication and status reporting
  • Test deliverability
  • Industry standards to follow
  • Test automation and tools
  • Testing measurements and metrices
  • Risks and mitigation
  • Defect reporting and tracking
  • Change and configuration management
  • Training plan

What is test plan ?

he Test Plan document on the other hand, is derived from the Product Description, Software Requirement Specification SRS, or Use Case Documents.
The Test Plan document is usually prepared by the Test Lead or Test Manager

  • Test Plan id
  • Introduction
  • Test items
  • Features to be tested
  • Features not to be tested
  • Test techniques
  • Testing tasks
  • Suspension criteria
  • Features pass or fail criteria
  • Test environment (Entry criteria, Exit criteria)
  • Test delivarables
  • Staff and training needs
  • Responsibilities
  • Schedule








Saturday, June 25, 2011

SIP - Chapter 1

1. SIP Request/Responses list:

SIP is a protocol which uses text format to send and receive request & response messages.

There are 6 basic request/Method types: (Note: Requests or Methods are same)

Request Types:

INVITE - This message is send by the UAC (User A) to UAS (Proxy)  or other UAC  (User B) to start a session with the User B
ACK - Message send by the UAC (User A) to UAC  (User B) for the 200 OK Response Message.
BYE - Ends a session send by any UAC (User A or User B)
CANCEL - Cancels establishing the session 
OPTIONS - Communicates information about the capabilities of the calling and receiving SIP phones
REGISTER - UAC registers his own ip address & URL with the registrar server.

Response Types:


SIP Requests are answered with SIP responses, of which there are 6 classes:
1xx = informational responses, such as 180, which means ringing
2xx = success responses
3xx = redirection responses
4xx = request failures
5xx = server errors
6xx = global failures

What is difference between dialog, Transaction & session in SIP? What are the parameters used to identify the dialog, transaction & Sessions?

Dialog - Dialog is identified by the CALL-ID, FROM and To Tag fields.

What are the minimum headers required for a SIP Request message?

Max-Forwards, To, From, Call-ID and CSeq headers are required.

What is Max-Forwards header field?


The
is initialized to some large integer and decremented by each SIP server, which
receives and forwards the request, providing simple loop detection.
Max-Forwards header field, which

What is From and To Header?


To
originator and destination of the SIP request. When a name label is used, as in
this example, the SIP URI is enclosed in brackets and used for routing the
request. The name label could be displayed during alerting, for example, but is
not used by the protocol.
and From header fields, which show the




SIP tutorial, FAQs, Knowledge can be shared here.


Links to download the SIP documents

a) RFC 3261 - This is the basic RFC to start with

Download linkhttp://www.ietf.org/rfc/rfc3261.txt


b) SIP Johnston - Really good one with basics

Download link

 http://www.filestube.com/a1332364f51f9e9803e9,g/a-b-johnston-sip-understa.html