sip question

8
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 generall y does not know or trust the callee's server, onl y cryptographic signatures can be used to ensure that the information is valid. For example, the outgoing proxy m ight 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 the y 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; the y 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

Upload: kazitamjidali

Post on 20-Jul-2015

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 1/8

 

How does SIP support caller ID?

Caller-ID is provided by the From SIP header containing the caller's name and "number". The numberwould 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 anISP, 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 anidentifier, carried in the SIP messages, that refers to the call. A call is a collection of call legs. A UACstarts 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 callcontrol 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 acall 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 Fromfield to the remote address (Alice).

The CSeq spaces in the two directions of a call leg are independent. Within a single direction, thesequence 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 ableto tell which branch a response corresponds to. Tags, in To headers, are of no help here since they arenot known until responses arrive. Tags are used by the UAC to distinguish multiple final responses fromdifferent UAS.

A UAS has no reliable way of determining if the request has been forked or not. Thus, to be safe it needsto add a tag. Proxies only insert tags into the final responses they generate themselves; they never inserttags 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 callit) added to the request by one of the proxies is not sufficient for the next forking proxy along the chain tomatch 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 inthe 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 tagmay have been added Call-ID same same same request same same same URI CSeq same same sameVia - - must be local host; check for branch parameter to identifywhich branch

Page 2: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 2/8

 

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 dependson 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 callwith From: Alice <[email protected]> to Bob, an INVITE request from Bob to Alice would [email protected] as the To header and Request-URI.Contact:Determines the destination placed in the Request-URI for subsequent requests and can be used tobypass proxies not enumerated in a Record-Route header. Also used in responses by redirect serversand 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 subsequentrequests for the same call-id. It is then used by the user agent to route subsequent requests. Themechanism is similar to a source-route, copying the Record-Route information into a set of Routeheaders. 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 wayback 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 thereis no Contact.

What's the difference between the request URIs tel:+12125551212 and sip:[email protected]?

Non-SIP URLs, such as tel:+12125551212 for a telephone number, may be used as request URIs in SIPINVITE requests. This only makes sense if all outbound calls are handled by a proxy server. In the caseof a tel: URL, the proxy server would then translate the request URL to a SIP URL of a gateway server, ifit 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 theRequest-URI is a SIP URL, although that breaks with the common practice that Request-URI and To startout 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. Theuser name must be empty. Generally, the domains in the Request-URI and the To header field have thesame value; however, it is possible to register as a "visitor", while maintaining one's name. For example,

Page 3: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 3/8

 

a traveler sip:[email protected] (To) might register under the Request-URI sip:atlanta.hiayh.org, with theformer as the To header field and the latter as the Request-URI. Note, however, that requests for a userat acme.com are not likely to arrive at the atlanta.hiayah.org server; special purpose routing logic willgenerally need to be established in order for requests for [email protected] to go to the atlanta.hiayh.orgserver . In the vast majority of cases, the domains in the request URI and To field will match. TheREGISTER 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 fora 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 consistentregistration 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 thatthese servers have to rely on traditional backup techniques to achieve reliability. For example, thedesignated registrar could multicast registration updates within its local network to keep standby serverssynchronized.

Are ACK requests retransmitted?

No. An ACK is sent when a response retransmission is received. Reliability is achieved because theresponse is retransmitted until an ACK arrives, and the ACK is retransmitted on responseretransmissions. 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 ifthere is no Record-Route header. If there is a Record-Route, it will traverse the list of proxies indicatedthere.

If the caller decides to send a BYE before receiving a 200 from the callee, the BYE is be handled by theproxies 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 thiswill only make sense in practice for the initial INVITE and subsequent "re"INVITE. In the latter case, thecall remains, just any changes requests are cancelled.

How does a caller f ind its proxy server?

Calls typically proceed directly to the callee's domain. For example, when calling [email protected], theINVITE request would be sent to the SIP server for the domain example.com, found via DNS.

Page 4: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 4/8

 

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 REGISTERresponse 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 therequest after it has been forwarded, so they can associate the response with some internal state. In otherwords, 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 proxiescan do more (they can fork, for example, see the next question) and can provide services stateless onescan't (call forward busy, for example). They don't scale as much as stateless ones. An admininstrator getsto decide which to use. These are also logical entities; a physical proxy is likely to act as a stateless proxyfor 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 makesure 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?

Page 5: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 5/8

 

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 weignore 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.

Page 6: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 6/8

 

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?

Page 7: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 7/8

 

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?

Page 8: Sip Question

5/17/2018 Sip Question - slidepdf.com

http://slidepdf.com/reader/full/sip-question 8/8

 

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 ?