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


#1

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

Is it MusicOnHold?


#2

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.


#3

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
voip-info.org/tiki-index.php … k+cmd+Dial
for the details.


#4

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).

Zoa.


#5

the following is the extent of my config.
extension.conf:
exten => _12345X,1,Dial(IAX2/${EXTEN},10,m(default))
musiconhold.conf
[classes]
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 ?


#6

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.


#7

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


#8

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