Changing ringing sound to music?

You have people doing this on their cellphones and elsewhere all over the world. When you call someone, the caller hears not the standard ring ring ring but instead music playing back. I’m wondering how this accomplished in Asterisk. Then, making my life more difficult. I would like to know how to change the type of music being played back to the user based on his callerID information. My first step is test step 1 and then try step 2 of my plan.


In the Dial command use the option “m” to enable musiconhold instead ring.

For change the music on hold you need to create classes in the musiconhold.conf and then define the class in the peer(sip.conf) or trunk.