A new, fast, efficient and general method for preparation of steroid analogous of anticipated biological activity under ultrasound irradiation and classical heating is reported. The reaction pathway involves two steps: quaternization of phthalazine heterocycle followed by a 3+2 dipolar cycloaddition of cycloimmonium ylides to dienophiles. Under ultrasound the reaction time decreases substantially, the yields are higher, the reaction conditions are milder. A comparative study ultrasound verses classical heating has been done.