Play audio by callee

What should I do if I have to implement play simple audio file when callee answer?

Please tell in static extension term like there are only two extensions 101 and 102, 101 is caller and 102 is callee

Only 102 needs to be an extension, in your example. There need not be any extension corresponding to device 101.

You can do this using the A option on Dial.

With dial? But I thought using dial I can play audio during ringing only? Is it possible to play audio after answer?

  • A ( x ) - Play an announcement to the called party, where x is the prompt to be played
  • x - The file to play to the called party

Yeah maybe this will help, I have to look into this but just last question

Can I play audio file only or text too? Is there any built-in function which play our text as audio?

To do text to speech you need third party code. Asterisk has support for Festival, but you need to get and configure Festival separately. Some people use Google cloud services, although you will have to consider whether the material you are playing can be handled by third parties in this way.

These approaches use applications, so you will need to use the U option on Dial.

There are other approaches, which searching for “Asterisk text to speech” will reveal, but all involve third party code or services.

That’s great I’m go with audio file maybe for now, thanks for your all support

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