Check for SIP response 180 ringing within 2 seconds

After sending SIP INVITE to the end-point, How to detect that it is ringing or not within 2 seconds?
Do I have to use a timer or is there any handler for this?

There’s nothing built in that I can think of to really do this… what exactly are you trying to achieve?

Nothing to do with ringback is a reliable indication that something is ringing. The network might go 183 Progress and send the ringback tone as media. It might also send 180 Ringing before the outgoing leg at a destination PBX, or mobile base station, had even been set up.

After starting the conference, I am sending SIP INVITE to another client. If there is no 180 ringing within 2 seconds from this client, I have to terminate the conference.

Why? There is no requirement in SIP to send Ringing before OK. It is not sent reliably, so may just have been lost in the network. Even with 100Rel, it could take a lot more that two seconds for the server user agent (the destination of an INVITE Is never a client) to give up trying to send it.

If the destination is a mobile phone, it may take well over two seconds before the mobile receives the alerting signal.