Music on hold on ip phones speaker

hi everybody. I’m triying to make that when i finish to talk when i hangup the phone, the music on hold play automatically…
I triyed this

exten =>h,1,Wait(1)
exten =>h,2,MusicOnHold(moh)

and this way too

exten =>h,1,MusicOnHold(moh)

please, i hope yours answers.
Thanks to each one of yours.