Hi Vivek,
As Sunil correctly pointed out you would have a agent in the network
(Proxy/B2BUA/SBC) relaying your call and it would typically generate
408 Request Timeout error response when its timer expires before
getting any response.
Also the UAC should take precaution and start a internal timer
There are many good open source SIP servers with documentation for
their design to assist developers.
For e.g. Kamailio, OpenSER, OpenSIPS to name few popular ones.
You can have a look at the core components used in the design and try
to get a feel of architecture of a SIP server.
Regards,
Prav