Reputation: 297
I have created a Asterisk server. I am able to place a call from one dialer to other dialer and its working properly. When connection established between both dialers, I need a voice script to be played, provided by asterisk.
I need to upload my own voice script(sound file) in asterisk server. I want to use java as my back end. So is there any java api(or any web service URL that can be accessed from outside application) that I can upload my sound file to /var/lib/asterisk/sounds/en
directly.
I am trying to play that file using fastagi api of asterisk-java. can anyone help me for how to achieve that?
Upvotes: 3
Views: 10924
Reputation: 2347
You can check on voip-info.org about Dial command.
Add A(filename) option so that option.gsm file will be played to called party
A(x): Play an announcement (x.gsm) to the called party.
Like:
Dial(SIP/1111,30,A(announce))
When you make a dial.
As @Siddharth said, you need to have announce.gsm (or .alaw, .wav) file in /var/lib/asterisk/sounds/en
folder.
If you are using GUI tools like FreePBX, AsteriskNOW, than you probably can upload sound file in GUI and add option on extension you want (in this case 1111) to play that exact prompt that you uploaded and named before.
Upvotes: 1
Reputation: 9574
You need to copy the file in the /var/lib/asterisk/sounds/en
path, and refer to the file name, without the extension in your dial plan, in your extensions.conf
exten => s,1,Answer()
exten => s,n,Read(dtmfvalue,agent-newlocation,3)
Here agent-newlocation.gsm
is in the folder /var/lib/asterisk/sounds/en
Upvotes: 1