Quote:
Originally Posted by DCEite Some of my queries for today - related to SIP (session initiation protocol)
Q1. Why is ACK treated as a separate transaction , ie why isn't it the part of same transaction as INVITE ?
Q2. Why does INVITE use a 3-way handshake mechanism as against request-response mechanism of other SIP methods ? |
Surprised to see such deep level question. Since I have dabbled a little in SIP, and also TDM telephony, I can probably make an attempt.
SIP is way more flexible than traditional telephony, so you need more flexible protocol.
For example, consider John who lives in Bangalore, wants to talk to George in Chennai. The call made by John first goes to the telephone exchange he is connected in Bangalore, travel through the telephony cloud and reaches the
telephone exchange connected to George's phone and then sends a ring to George's phone. By this time, the TDM channel for the entire conversation is already allocated. When George picks the phone, they start talking on that TDM channel.
But VOIP doesn't work that way. SIP (signalling) and RTP(payload) may or may not use the same path. For example, SIP proxies only setup the call, they don't deal with payload or RTP.
SIP Example 1: John calls George, both are using SIP phones, call is made directly.
John -----INVITE -------->George
John<---------RINGING---George
George picks up
John<-----------200 OK----George
Now talk...
John<-------RTP---------->George
John hangs up
John------BYE------------->George
John<-----------OK------George
SIP Example 1: John calls George, both are using SIP phones, call is made via SIP proxy.
John -----INVITE ----Proxy---INVITE---->George
John<----RINGING----Proxy---RINGING---George
George picks up
John<-----200 OK-----Proxy---200 OK--George
Now proxy gives the direct IP address of John to George (SDP contains the direct IP)
Proxy-------ACK------>George
Now talk...
John<-------RTP---------->George
John hangs up
John------BYE---Proxy-----BYE--->George
John<------OK---Proxy----OK---George
Basically ACK is used to give the redirection info for RTP path. The SIP proxy handles only SIP and not RTP. This is my understanding after doing some programming in SIP. Remember I am no expert on SIP. I am not sure whether ACK is initiated by the proxy or the endpoint (John). What happens if there is no direct access between John & George, that too I am not sure. Different SIP PBX and proxies have different behaviors.