1

I am using asterisk-java to integrate Asterisk with my AGI.

I want to know while using streamFile(filename) command is it necessary that the file lies in asterisk sound system.Cant it be in my java source folder?/src/resource/filename

I am creating a music IVR and I want to keep the music in my database(i.e on java server side) not on asterisk server side.

How can I paly the music? Please help.

Atul
  • 81
  • 1
  • 9

1 Answers1

1

Sound will be played by asterisk server.

So if your java server on other machine, you need copy file before plaiing to asterisk server or use network filesystem(nfs, gluster fs etc)

If your java work on same physical server, you can specify any file on that server. Just need give full path to asterisk and ensure asterisk user can access that file.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thanks.If my java server work on same physical server,which AGI command should I use to give path to asterisk. channel.streamFile(pathname) will work?If I want to integrate a TTS software with my JAVA Program(using Asterisk-java agi) then what will be the best way to convey the voice file return by TTS software to user.And this all will be done when caller is on-line. – Atul Jun 03 '13 at 15:05
  • You just need use full path to file,WITHOUT extension. – arheops Jun 04 '13 at 03:44
  • in my case my nodejs agi server is on different container.. and agi server using google tts conver text to speech. in this case how it will be possible ? – Sunil Garg Jun 17 '22 at 14:35
  • As I understand you have to move your file to asterisk's container first. – arheops Jun 17 '22 at 21:09