Wednesday, July 4, 2012

VOIP Interview Questions


VoIP Interview Questions with answers:

What is VoIP?
VoIP stands for Voice over Internet Protocol. It means the transmission of voice and call control data over the Internet. In other words, this technology allows you to make phone calls over the Internet.
How does VoIP work?
To understand how VoIP works, you will be taken through the process of voice transmission from one end to the other. The process starts with a person talking into the mouthpiece on one end of a VoIP call.
This analog voice signal must first be sampled and digitized. Voice sampling is usually done 8,000 times per second (8KHz). In order to reduce bandwidth, a voice CODEC is used. A voice CODEC is a compression/decompression algorithm that is optimized for the voice frequency range. The bit stream uncompressed is 64Kbps. By using an available CODEC, the bit stream can be reduced to 8Kbps or less.
In order for the compressed voice data to be sent over the Internet, it must go through a process called packetization. This is a packet consisting of a small sample of the voice data (usually 10-30 milliseconds).
While being routed through the Internet, these packets can get delayed or even lost. This can cause degradation in voice quality. Simply put, there are various mechanisms in place to compensate for these problems and help smooth out the audio.
Once all the packets arrive on the listening end of the call, they must be reassembled to their original state. The packets are decompressed and converted from a digital to analog voice signal.
What equipments are needed for VoIP?
Generally following things are required for voip
  1. Broadband connection
  2. voip phone
  3. nexton softswitches
  4. router
  5. audiocodec
  6. astric server
What are the advantages to VoIP?
The big advantage is VoIP may save you money depending on how much you are currently spending for local and long-distance calls. What you will need to do is get the total cost the phone company is charging and compare it against a VoIP plan that interests you. With most plans, you get free calls within the U.S. and Canada for a low flat rate. International calls usually have very low rates with no connection fees. For both residential customers and businesses that make a lot of long distance and international calls, the savings can be several hundred dollars a year.
Another advantage is with the features available with VoIP. Features such as caller ID, call waiting, call forwarding, 3 way conferencing and voice mail are usually included at no extra cost. With the phone company, these services are usually extra.
In addition, you can make free phone calls anywhere there is a high speed Internet connection available. That means you can be in another state or even in another country and make calls as if you were back at your home or business. You will just need to bring your phone adapter along with you and possibly a phone in case one is not available.
What do internet telephony,packet telephony,IP telephony and converged network means?
The first thing all mean the same thing. Which is using IP (Internet protocol) for voice services. Some voice networks are only packet-switched and have no access outside of their own VoIP network. Most VoIP networks have a Gateway that connects to a circuit-switched external network which gives them acces to external calling. One of the gateways responsibilites is to convert G.711 Circuit-switched media (typically a T1 provided by a telco company) to the 7.723 Packet-switched media that will traverse the companies VoIP network. A device called a gatekeeper will then convert the IP address (used by H.323 protocol) to a standard telephone number (E.164 address) that can be used for external calling.
A converged network is a network that passes both Voice and Data over the same set of devices. Converged networks generally implement QoS (Quality of service) on all actived network devices to ensure the VoIP has priority over standard data because of it's more rigid demands.
What Are Some disadvantages of VoIP?
If you're considering replacing your traditional telephone service with VoIP, there are some possible differences:
  • Some VoIP services don't work during power outages and the service provider may not offer backup power.
  • Not all VoIP services connect directly to emergency services through 9-1-1.
  • VoIP providers may or may not offer directory assistance/white page listings.




How does SIP support caller ID?
Caller-ID is provided by the From SIP header containing the caller's name and "number". The number would most likely be placed in the user field of a SIP URL or appear in a tel: URL.
Since the callee generally does not know or trust the callee's server, only cryptographic signatures can be used to ensure that the information is valid. For example, the outgoing proxy might be operated by an ISP, enterprise or phone company and sign for the identity of the caller, using the signedby parameter, with the identity of the company verified by a public key certificate similar to those used by web sites.
What is the difference between a call leg and a call id?
A call leg refers to the one-to-one signaling relationship between two user agents (UAs). The Call-ID is an identifier, carried in the SIP messages, that refers to the call. A call is a collection of call legs. A UAC starts by sending an INVITE; because of forking, it may receive multiple 200 OKs from different UAs. Each corresponds to a different call leg within the same call. Call is thus a grouping of call legs. In the call control spec, additional call legs are created through the Also header.
Call legs refer to end-to-end connections between user agents, rather than any relationship with proxies. Within a call leg, there are numerous transactions in both directions.
The request URI is not used in call leg identification.
The To and From field relate to local and remote in the following way. When Alice sends a request on a call leg to Bob, the From field contains the local address (Alice), and the To field the remote address (Bob). When a request is received by Bob, the To field is matched to Bob's local address, and the From field to the remote address (Alice).
The CSeq spaces in the two directions of a call leg are independent. Within a single direction, the sequence number is incremented for each transaction.
What is the difference between tag and branch-id?
Branch IDs allow proxies to match responses to forked requests. Without them, a proxy wouldn't be able to tell which branch a response corresponds to. Tags, in To headers, are of no help here since they are not known until responses arrive. Tags are used by the UAC to distinguish multiple final responses from different UAS.
A UAS has no reliable way of determining if the request has been forked or not. Thus, to be safe it needs to add a tag. Proxies only insert tags into the final responses they generate themselves; they never insert tags into requests or responses they forward.
Since a request can be forked several times on its way to UAS, a single "tag" (or whatever you like to call it) added to the request by one of the proxies is not sufficient for the next forking proxy along the chain to match responses on its own branches; every proxy that forked the request would need to add its own unique IDs to the branches it created. This is precisely what's being achieved by the branch parameter in the Via header. (Igor Slepchin)
How can one recognize a retransmitted, duplicate or looped request?
header retransmitted duplicate matching response From same same same To same same same, but tag may have been added Call-ID same same same request same same same URI CSeq same same same Via - - must be local host; check for branch parameter to identify
which branch
Looped request are recognized by one or more of the following:
·         The server finds itself in the request's Via list, including any
branch parameter. (The server should compute the branch parameter so that it depends on the request URI.)
·         The server is about to proxy the request to one of the hosts listed
in the Via list. The same
·         The Max-Forward count is decremented to zero.
·         The Expires time has elapsed.
What is the relationship between the From, Contact, Via and Record-Route/Route headers?
All these headers determine how requests and responses are routed in a network of SIP proxy servers. Roughly, the distinction is:
From:
Used for subsequent requests if there is no Contact or Record-Route header. E.g., if Alice makes a call with From: Alice <alice@example.org> to Bob, an INVITE request from Bob to Alice would use alice@example.org as the To header and Request-URI.
Contact:
Determines the destination placed in the Request-URI for subsequent requests and can be used to bypass proxies not enumerated in a Record-Route header. Also used in responses by redirect servers and in REGISTER requests and responses.
Record-Route/Route:
The Record-Route header is inserted into requests by proxies that want to be in the path of subsequent requests for the same call-id. It is then used by the user agent to route subsequent requests. The mechanism is similar to a source-route, copying the Record-Route information into a set of Route headers. The Request-URI is set to the first Route header.
Via:
Via headers are inserted by servers into requests to detect loops and to allow responses to find their way back to the client. They have no influence on the routing of future requests (or responses).
Generally, in short, requests should be sent to Route if present, Contact if there is no Route, From if there is no Contact.
What's the difference between the request URIs tel:+12125551212 and sip:12125551212@gw.com?
Non-SIP URLs, such as tel:+12125551212 for a telephone number, may be used as request URIs in SIP INVITE requests. This only makes sense if all outbound calls are handled by a proxy server. In the case of a tel: URL, the proxy server would then translate the request URL to a SIP URL of a gateway server, if it is not handling the gateway duty itself. The proxy server might use the Gateway Location Protocol (GLP) to find the appropriate next-hop SIP server. The To header may always be a tel: URL even if the Request-URI is a SIP URL, although that breaks with the common practice that Request-URI and To start out the same.
Is the domain of the request-URI and the To header always the same?
The Request-URI names the destination of the registration request, i.e., the domain of the registrar. The user name must be empty. Generally, the domains in the Request-URI and the To header field have the same value; however, it is possible to register as a "visitor", while maintaining one's name. For example, a traveler sip:alice@acme.com (To) might register under the Request-URI sip:atlanta.hiayh.org, with the former as the To header field and the latter as the Request-URI. Note, however, that requests for a user at acme.com are not likely to arrive at the atlanta.hiayah.org server; special purpose routing logic will generally need to be established in order for requests for alice@acme.com to go to the atlanta.hiayh.org server . In the vast majority of cases, the domains in the request URI and To field will match. The REGISTER request is no longer forwarded once it has reached the server whose authoritative domain is the one listed in the Request-URI.
How do I ensure registrar reliability?
There are several techniques that can be used to minimize the impact of registrar/proxy server failures for a server in a local area network:
  • Run several servers that all respond to the same multicast registration
address ("warm standby"). As long as multicast requests are mostly reliable, this ensures a consistent registration picture.
  • If a registration server is rebooted and does not have complete knowledge
of the local UA population, it could multicast any incoming INVITE requests.
For servers separated from their client by a wide-area network, use of multicast is not appropriate, so that these servers have to rely on traditional backup techniques to achieve reliability. For example, the designated registrar could multicast registration updates within its local network to keep standby servers synchronized.
Are ACK requests retransmitted?
No. An ACK is sent when a response retransmission is received. Reliability is achieved because the response is retransmitted until an ACK arrives, and the ACK is retransmitted on response retransmissions. ACK is only used for INVITE.
How are BYE requests routed?
Since a 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 a Record-Route, it will traverse the list of proxies indicated there.
If the caller decides to send a BYE before receiving a 200 from the callee, the BYE is be handled by the proxies just as the corresponding INVITE was handled, i.e., it may be forked.
Can I CANCEL requests other than the first INVITE?
Yes, any request can be cancelled before it has been executed by the UAS. However, it is likely that this will only make sense in practice for the initial INVITE and subsequent "re"INVITE. In the latter case, the call remains, just any changes requests are cancelled.
How does a caller find its proxy server?
Calls typically proceed directly to the callee's domain. For example, when calling alice@example.com, the INVITE request would be sent to the SIP server for the domain example.com, found via DNS.
If a "local" (outbound) proxy is needed for outgoing calls, it currently needs to be manually configured, similar to the configuration of web proxies in browsers. Extensions to (for example) use a REGISTER response or DHCP are under discussion.
What's the difference between a stateless and a stateful proxy server?
Stateless proxies forget about the SIP request once it has been forwarded. Stateful proxies remember the request after it has been forwarded, so they can associate the response with some internal state. In other words, stateful proxies maintain transaction state. Stateful implies transaction state, not call state.
Stateless proxies scale very well, and can be very fast. They are good for network cores. Stateful proxies can do more (they can fork, for example, see the next question) and can provide services stateless ones can't (call forward busy, for example). They don't scale as much as stateless ones. An admininstrator gets to decide which to use. These are also logical entities; a physical proxy is likely to act as a stateless proxy for some calls, stateful for others, and as a redirect server for even others.
Neither stateful nor stateless proxies need to maintain call state, although they can, but will need to make sure that they are part of subsequent transactions via the Record-Route header.
Proxies must be stateful if one of the following conditions hold:
  1. uses TCP,
2. uses multicast, 3. forks.
What is the datastructure used to save the call-ids.
What is the use of 183 in sip, and where it is used.
1. What is the difference between a dialog and a transaction ?
2. Do I always need to use a proxy server/ why is a proxy server required?
3. What is the difference between tag and branch-id?
4. Why can a forking SIP proxy not be stateless?
5> how do you determine if the REGISTER message sent from a client is a Re-Registration ?
6> What is the difference between the definitions of a REGISTER and a DEREGISTER message ?
7> Is there any difference on how the REQUEST-URI is framed for a REGISTER message w.r.t an INVITE ?
If yes what is it ?
1. Why CANCEL is not be challenged?
2. What is the difference between INVITE and re-INVITE?
3. What is 'command sequence' is SIP? What is the use of that?
4. What is the difference between Dialog and Transaction?
5. It is said that ACK is seperate transaction? But why the C-Seq is same with the INVITE?
6. What is the use of VIA, contact header, TO header, from header, Route headedr? How are they different?
7. What is Strict routing and loose routing in SIP?
8. Have u heard about Magic cookie? What is that and what is that implyes?
9. How many mandatory headers are there in a SIP request? What are they?
10. What is the use of ACK message in INVITE transaction? If TCP is used as transport then can we ignore sending of ACK?
11. What is offer-answer model?
12. What is the difference between INVITE transaction and non-Invite Transaction?
13. Can you send CANCEL immidiately after sending an INVITE msg? Then when will it be sent? Does sending of CANCEL ensure canceling of INVITE session? If not what needs to be done?
14. What is B2BUA functionality and what is Proxy functionality in SIP?
15. How do u differentiate a refresh registration message and a de-registratoin mesage?
16. A user can register himself from different location simultaneously. So how can u get all the bindings of an user from the server?
17. What is parallel forking and sequencial forking? In case of Parallel forking how an incoming responses from different branches are identified at proxy?
19. Have you heard about Presence? what is that?
20. Extract CallID header with it's value from a buffer contains SIP message only. No SIP message parser available for this.
1: What is diff between invite and reinvite. 2: Which field is used for displaying call id. 3: What is SDP. Is there rules for the order of SDP field. 4: What is privacy header. 5: What is passerted header. 6: What is session level and media level attributes in SDP.
1)Wat is a Sip Transaction.
2)How do u differentiate bn Reister and DeRegister
3)How should a registrar behave if CSeq of refresh register is less than previous register
4)Wat is third party registration.
5)how r the from and to headers in third party registration.
6)Explain Invite transaction
7)Invite Success case, Invite Failed case.
8)authentication for ACK, CANCEL.
9)Explain the process to cancel an ongoing transaction. PreRequisties,
10) Wat is a sip dialog
11) which messages initiaite a dialog
12) what is difference between invite and reinvite.
13) explain the process to setup a sip session, and dismantling a session
14) what is the behaviour of sip proxy in case callee do not send 200 ok for invite
15) what is the sip proxy behaviour in case callee is not registered
16) significance of route header
17) record header
18) via header
19) how do u handle transactions, (key used) to check implemetation knowledge
20) significace of to, from callid, cseq
21) what is dialog id
22) is invite indialog request?
23) explain header modifications in setting up a dialog
1. What is the difference between a dialog and a transaction ?

2. Do I always need to use a proxy server/ why is a proxy server required?

3. What is the difference between tag and branch-id?

4. Why can a forking SIP proxy not be stateless?

5. how do you determine if the REGISTER message sent from a client is a Re-Registration ? 

6. What is the difference between the definitions of a REGISTER and a DEREGISTER message ?

7. Is there any difference on how the REQUEST-URI is framed for a REGISTER message w.r.t an INVITE ? If yes what is it ?

1. Why CANCEL is not be challenged?

2. What is the difference between INVITE and re-INVITE?

3. What is 'command sequence' is SIP? What is the use of that?

4. What is the difference between Dialog and Transaction?

5. It is said that ACK is seperate transaction? But why the C-Seq is same with the INVITE?

6. What is the use of VIA, contact header, TO header, from header, Route headedr? How are they different?

7. What is Strict routing and loose routing in SIP?

8. Have u heard about Magic cookie? What is that and what is that implyes?

9. How many mandatory headers are there in a SIP request? What are they?

10. What is the use of ACK message in INVITE transaction? If TCP is used as transport then can we ignore sending of ACK?

11. What is offer-answer model?

12. What is the difference between INVITE transaction and non-Invite Transaction? 

13. Can you send CANCEL immidiately after sending an INVITE msg? Then when will it be sent? Does sending of CANCEL ensure canceling of INVITE session? If not what needs to be done?

14. What is B2BUA functionality and what is Proxy functionality in SIP?

15. How do u differentiate a refresh registration message and a de-registratoin mesage?

16. A user can register himself from different location simultaneously. So how can u get all the bindings of an user from the server?

17. What is parallel forking and sequencial forking? In case of Parallel forking how an incoming responses from different branches are identified at proxy?

19. Have you heard about Presence? what is that?

20. Extract CallID header with it's value from a buffer contains SIP message only. No SIP message parser available for this.

21. what is path MTU ? 
1. What is VOIP? What is the Common problem you will face while using Voip Service?
2. What is SIP? What is the major discovery in SIP if compare with Other Protocols?
3. What is SIP Protocol Structure?
4.  What are L2 and L3 Layers?
5. What are the general headers you will see in SIP Requests and Responses?
6. How to do SIP conformance Testing?
7. What kind of scripts you know to automate SIP Call flow?
8. How to check usability testing on SIP Phone?
9. How you will do Compatibility testing on Voip?
10. Give me an example when servers send 5XX response?

1 comment:

  1. Nice and fantastic post... thank you very much to do this and thanks for sharing this with us.

    ReplyDelete