Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

SIP Interview Questions& Answers

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.
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 Six Types :
a) Registrar Sever
b) Proxy Server
c) Redirect Server
d) UserAgent Server
e) Presence Server
f) SIP Gateways
a,b,c are Sip servers and d,e,f are User Agents
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

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.
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.) 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?
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.

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 partys 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, wakeup calls etc.
1) How do you give IP to Endpoint?
A: Manually and Using DHCP. 2) In DHCP who will assign IP to endpoint?
A: DHCP Server will assign the IP address to the Endpoint.
3) Explain how IP address is assigned to endpoint using DHCP protocol?
A:
The Dynamic Host Configuration Protocol (DHCP) is a network protocol used
to configure devices that are connected to a network so they can communicate on
that network using the Internet Protocol (IP).
DHCP operations fall into four basic phases: IP discovery, IP lease offer, IP
request, and IP lease acknowledgment.

4) Explain how do you register Endpoint and where do you register?


A: Please refer the link below:
http://siptestingknowledge.blogspot.in/p/entities-call-flows-1-registrarserver.html
We register user with Register Server .
5) What are mandatory Header Fields in register request?
A: To ,From,Call Id, C-seq, expires...
6) Explain Call flow of register?
A: Please refer the link below:
http://siptestingknowledge.blogspot.in/p/entities-call-flows-1-registrarserver.html
7) In which message www- authenticate /Authorization header fields used ?
A: 401-Unauthorized response contains header field "WWW-Authenticate", where
Register request contains header field "Authorization".
8) Does Initial Register request contains Authorization header field?
A: No.
9) Explain format of Request URI, TO, From in Register Request?
A: Request URI:- sip: atlanta.com
From:- sip: UserA@atlanta.com
To:- sip: UserA@atlanta.com

10) What is Tag parameter?


A: Tags are used by the UAC to distinguish multiple final responses from different
UAS.
An initial request from a client will contain a From Tag and the subsequent
provisional response to it from the server will contain a To Tag.
10) Why does To & From address is same in Register request? And Tell where
does register request contains To & From address different ?
A: In Register request to and from address are same because User who generate
register request is expecting to receive responses to same User.
In "Third party registration" the register request
contains To and From address will be different.
11) What are the types to keep call on hold? Have you tested keeping ip adderss
to 0.0.0.0 with port number available?
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 "c"of the
stream.
12) What are supplementary features(Call features)?
A: Call forward,Transfer,Conference,Busy ,Hold....etc
13) Explain call flow about Transfer Unattended?
14) What header fields does Refer Request contains in Transfer unattended?
A: The Refer request contains two header fields:
refer To:
refer By:
15) Do we get Refer by header in refer request in transfer ? Why it is used , if
already User A knows User B?
A: Yes, refer-By is an optional header field,mostly it contains in transfer .
16) Why 202 -Accepted is sent for Refer, instead of 200-Ok in Transfer
unattended?
A: 200 Ok is final response,
17) What header fields does Notify contains sent from User B to User A in Transfer
unattended?(Regarding trying to C)
A:
It contains two header fields:
Each NOTIFY MUST contain an Event header field with a value of refer
Event = refer
Subscription-state = active,expires=60
Each NOTIFY MUST contain a body of type "message/sipfrag"
Content type = message/sipfrag
SDP conatins " Sip2.0 100 Trying "

18) If already User A disconnect from call in transfer Un attended, why User B will
Notify the User A after call success with User C?
A: User A doesn't disconnect from call even if sent BYE
request , the dialog between User A and B still exists until the Subscription
created by the REFER has terminated.
Notify request sent by User B to A contains the header fields
Event = refer
Subscription-state= terminated,reason= noresource
19) what happens if REFER request contains more than one refer-To field Values?
A: An agent responding to a REFER method MUST return a 400 (Bad Request)
if the request contained zero or more than one Refer-To header field
values.
20) How to detect multiple REFER requests in a dialog?
A: This id parameter MAY be included in NOTIFYs to the first REFER a UA receives
in a given dialog. A SUBSCRIBE sent to refresh or terminate this subscription
MUST contain this id parameter.
Event: refer;id=93809824
The number from the CSeq header field value of REFER is given as id
number in Notify.
EX:
REFER sip:b@atlanta.example.com SIP/2.0
Via: SIP/2.0/UDP agenta.atlanta.example.com;branch=z9hG4bK9390399231
To: <sip:b@atlanta.example.com>;tag=4992881234
From: <sip:a@atlanta.example.com>;tag=193402342
Call-ID: 898234234@agenta.atlanta.example.com
CSeq: 93809824 REFER
Max-Forwards: 70
Refer-To: (some different URI)
Contact: sip:a@atlanta.example.com
Content-Length: 0
NOTIFY sip:a@atlanta.example.com SIP/2.0
Via: SIP/2.0/UDP agentb.atlanta.example.com;branch=z9hG4bK9320394238995
To: <sip:a@atlanta.example.com>;tag=193402342
From: <sip:b@atlanta.example.com>;tag=4992881234
Call-ID: 898234234@agenta.atlanta.example.com
CSeq: 1993404 NOTIFY
Max-Forwards: 70
Event: refer;id=93809824
Subscription-State: active;expires=(depends on Refer-To URI)
Contact: sip:b@atlanta.example.com
Content-Type: message/sipfrag;version=2.0
Content-Length: 20

SIP/2.0 100 Trying


21) What is the use of message/sipfrag in notify request?
A: Using message/sipfrag bodies to return the progress and results of a
REFER request is extremely powerful.
1 ) What is the difference between UPDATE & Re-Invite?
A: Re-Invite is Used after the Session has been established,Whereas UPDATE
is used to modify session parameters(like QoS or initial addresses and
port) before final response is generated.

2) What is difference between call transfer and call redirect?

Ans)
In Call Transfer, the UA first establish a dialog with the calee, and
then initiates setting up a new dialog between the callee and the
another UA.
In Call Redirect, the UA doesn't answer the call, but inform the callee to resend
the INVITE to another SIP URI.

2) what is re-Register?

3) If A send Invite to B and B sends 180 response to A, If 180 response doesn't


reach A what happens?
A: If response doesn't reach A, A retransmits the Invite request.

4) How many times Request /response is retransmitted?


A: Retransmission is done until Expire time has elapsed to Zero, message is retransmitted
approx 7-9 times.
Invite request : Invite request sent at time T1 and is doubled after each
retransmission.The invite is transmitted until 64*T1 is reached after that declared dead.
If responce received it stops retransmission.
Non Invite request:

5) If a UAS rejects the offer of UAC contained in an INVITE,what happens?


A: UAS returns 488 (Not Acceptable Here) response . A Warning header field
value in responce explaining why the offer was rejected.

6) Why Cancel request is not chanllanged?


A: Cancel request should not be challanged by the server because these requests
can't be resubmitted.

7) What happens if expire time in Invite has elapsed to 0 ,before final responce is
generated.?
A: If invitation is expired before the final responce is generated ,
Then UAC sends Cancel request to UAS and UAS replies with 487-request
terminated is sent.

8)

What is difference between Inside Dialog, & Outside Dialog?

A : Alice send a INVITE Request to Bob, for Bob the INVITE Request is outside of
the Dialog.
When Alice receives 180 response, its early Dialog state for Alice and this goes to
confirmed state after 200 OK response.

After receiving 200 OK Response, any request will be inside the Dialog.

9) What is Differnce between 100- trying and 180 ringing?


A: 100
trying responce is sent by proxy to UAC to stop retransmission of
Invite requests where 180 ringing is used to Alert the UA(Caller
Party), that received the Invite request.

10) SIMPLE stands for?


Ans) SIMPLE is short for Session Initiation Protocol for Instant Messaging
and Presence Leveraging Extensions

11) What is an early media?


A: Early media refers to media (e.g., audio and video) that is exchanged
before a particular session is accepted by the called user. Within a
dialog, early media occurs from the moment the initial INVITE is sent until
the User Agent Server (UAS) generates a final response. It may
be
unidirectional or bidirectional, and can be generated by the
caller, the callee, or both.
Early media is the exchange of information before establishment of a
connection.

Examples:
1) Rining tone is the early media because call is not answered yet.
2) Busy Tone
3) Announcements or greetings

What is differnce between 180 and 183 responces?


A) 180 we know phone is ringing,With 183 we know indicates call is processing.
you will see 180 without SDP and 183 with SDP
IF branch parameter in Via header able to identify a transaction,then, why do
we need CSeq header to identify a transaction?
A) the branch parameter in via header use as transaction identifier but CSeq
not used for transaction identifier it use for relationship between request
and there response.
every new request have new CSeq number like if you send invite message two
time then you have two different Cseq but same
branch parameter in vai header

You might also like