Good day,
I have Asterisk 1.6 installed on my Ubuntu server. I configured sip.conf so that I am able to make an outbound phone call. I have a PHP script that creates a .call file and places it in /var/spool/asterisk/outgoing and calls my cell phone. When I answer the phone call, asterisk always plays the demo-thanks.gsm file. I create a .wav file and converted it to .gsm. Where do I place this on my server?
And, will doing this in my .call file make it play test.gsm?
Set: MSG=test
So, if I have test2.gsm located in /usr/share/asterisk/sounds/en, what would I place in my .call file so that it would play that test2.gsm file when I answer?
with that .call file the sound must be reached by the dialplan in the context “remindem”, otherwise you need to use an application wich plays your sound instead sending a context extension,
I think for now I figured out what I want to do…I think the magic is in extensions.conf and I don’t know much about creating my own dial plan. Though, this is what I did, and it played what I wanted to hear.
edited extenstions.conf:
[test]
include => stdexten
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait(1) ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n,Playback(/usr/share/asterisk/sounds/en/test2) ; Play a congratulatory message
exten => s,#,Hangup
So, when I get the call, it plays that file and then hangs up. Thanks!
hmm, I guess this isn’t what I’m really after. Since my extensions.conf was told to play test2, every time I place a call it plays this gsm file. Can’t you set what sound file to play within the .call or something? For example, I want to place a call and play test1.gsm to myself, and test2.gsm to my coworker, etc.
Current extensions.conf
[test]
include => stdexten
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait(1) ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n,Playback(/usr/share/asterisk/sounds/en/test2) ; Play a congratulatory message
exten => s,#,Hangup
Yes, it reproduce the same because in your file you send to the same point in your dialplan. You need to create diferents playback messages and put in the .call file the exact extension and priority for each call. Or create a .call file wich playback your sound instead send to a dialplan extension.