All the prophets do not prophesy whenever they wish, but rather focus their minds, seclude themselves, and seek prophecy... and even though they focus their minds, it is possible that the Divine Presence will rest upon them and possible that it will not.

כל הנביאים אין מתנבאין בכל עת שירצו אלא מכוונים דעתם כו' ומתבודדים כו' והם מבקשים הנבואה כו' ואע"פ ש
Shiurim in this topic
196. The Sephardic and Ashkenazic Dispute on the Blessing for Tefillin Shel Rosh מחלוקת הספרדים והאשכנזים על הברכה לתפילין של ראש