If You know this phone is ringing (an ALERT q.931 message, for instance) you send a 180 ringing.
If You receive a notification indicating this call is progressing, but you don't know for sure whether the user I s being alerted or not, your send a 183 session Progress message.
Both can indicate early media with SDP. If There is no SDP, the end device (softphone/gateway/etc.) has to generate the ringback tone or progress tone.
Usually you'll be 180 without SDP while 183 with SDP. It is a good practice to leave the tone generation for the endpoints.
If you are 183 your should open media connection because there is audio ready for them to hear.
If you set ringback var and ignore_early_media, both 180 and 183 to trigger your. If you set instant_ringback=true then it would not wait for 18x it would start fake ringback instant (asterisk mode).
RFC3261:
21.1.2 180 Ringing
The UA receiving the INVITE is trying to alert the user. This
Response May is used to initiate the local ringback.
21.1.5 183 Session Progress
The 183 (session Progress) response was used to convey information
About the progress of the call, not otherwise classified. The
Reason-phrase, header fields, or message body could used to convey
More details about the call progress.