Play audio file in callee

Hi all,

I want to play an audio file in callee. I mean, when A dials XXX extension, B listens to a specific audio file.

I tried with Playback and MOH, but I listen to the audio file locally (in A) and not in the receiver (in B).

Do you have any idea of playling the audio file in B?

Thanks in advance.

Have a nice day!

Assuming you want the caller to wait until the file is played, there is an example of this in https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_Dial

If you don’t want to wait, use Originate.

Thank you David, I finally realized that I set moh in a wrong way. It must be defined adter the Dial.

exten => 111,1,NoOp(MOH Test)
same => n,Progress()
same => n,Set(CHANNEL(musicclass)=default)
;same => n,MusicOnHold(20)
same => n,Dial(PJSIP/6001,15,MusicOnHold(20))
same => n,MusicOnHold(20)
same => n, Hangup()

The line after the Dial won’t be reached if the call succeeds.

Dial does not take multi-character options, only multiple option characters.

The option to play music on hold is a lower case “m”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.