Making a digital phone ringer turn on and off

Not relevant to the type of phone you have but I thought this might be of interest