I am trying to understand SIP and have one question regarding it. Why do we need to send 100 Trying to an INVITE but the same logic is not used for say BYE,UPDATE, NOTIFY etc msgs ?
From rfc3261:
21.1.1 100 Trying
This response indicates that the request has been received by the
next-hop server and that some unspecified action is being taken on
behalf of this call (for example, a database is being consulted).
This response, like all other provisional responses, stops
retransmissions of an INVITE by a UAC. The 100 (Trying) response is
different from other provisional responses, in that it is never
forwarded upstream by a stateful proxy.
100 Trying is a provisional response used to stop retransmission on previous hop. As written above, it is not forwarded by a stateful proxy.
This is mainly useful for transaction that will require time to complete: ie, when a final answer can't be sent as soon as possible.
Thus, the main use-case is for initial INVITE, where reaching the final hop and getting a final answer is delayed by long operation: database search, routing and of course ringing time...
NOTE1: When "database search and routing" is quick enough, 1xx could acheive the same goal (stop the retransmissions), but as they are not "reliable", they may be lost on the path. Thus, 1xx for INVITE can't replace 100 Trying in a reliable way.
NOTE2: 100 Trying can be sent for any request. However, SIP requires that any non-initial-INVITE request should be given an immediate final response ASAP, so if somewhere, you have a long time delay, this means your implementation (or deployment) may not be correct or optimal.