How can I hear music through phone when I call someone?

How can I hear music through phone when I call someone rather than the dull ringtones, doo… dooo…?

Is it MusicOnHold?

No, it’s not music on hold - that’s when you hear music when you’re on hold!

It probably depends on your phone. It seems that SIP phones provide the ringtone themselves. Asterisk just signals ringing - it doesn’t actually send the sound. Depending on what phone it is, you may be able to configure what ringtone it plays.

There doesn’t seem to be any way you can put some arbitrary sound over the connection to the phone while asterisk is connecting the call.

the way you do it is by using the “m” option in the DIAL command

(# m: Provide Music on Hold to the calling party until the called channel answers. This is mutually exclusive with option ‘r’, obviously. Use m(class) to specify a class for the music on hold.)

check out … k+cmd+Dial
for the details.

There used to be a memory leak in there, anthm fixed some memory leak for musiconhold, maybe this was the same leak, maybe not.

(so when you do this, be sure to look out for increasing memory usage).


the following is the extent of my config.
exten => _12345X,1,Dial(IAX2/${EXTEN},10,m(default))
default => quietmp3:/var/lib/asterisk/mohmp3

when i dial 123458 use iax client i can hear ringtone and mp3 music
how to let it only play mp3 music ?

i think that ringing tone is generated by your IAX client…i use iaxcomm and when I call some places I hear two ringtones. One by iaxcomm and one by the called party.

You have to Answer() the channel before doing the Dial() to stop the ringing state.

yes,you are right .i have a try and it works well.