I’m pretty new to asterisk. I’ve recently set up a HOTLINE of sorts. A user calls a particular number and can record a message that is then played to anyone dialing into a different number.The problem is that anyone can call into the recording number to re-record the HOTLINE message. How do I lock down the recording number so that if a passcode is not entered (or entered incorrectly) the line hangs up? I want it to be a hard-coded passcode in the extensions.conf file that users won’t be able to change.
Just set a variable in the [global] section of the dialplan to the value You’d like to have as passcode.
Then, in the context the call to Your recording number comes in, You may check against this variable before starting the recording.
The only thing I don’t understand in Your scenario: When somebody has already left a message and this message wasn’t played to another person yet it should be impossible (for any other calling the recording number) to even leave a second message
Use Authenticate. To continue on you have to get the password right. Otherwise it hangs up.
exten => 1234,1,Answer
exten => 1234,n,Authenticate(1313)
exten => 1234,n,Record(hotlinemessage.wav)
Mazzic, that’s exactly what I was looking for, thx.
…don’t know if I should start another thread but I have one other small Q. Whenever I try to playback any of the gsm files the playback always cuts off the first second of voice. Is there any way to fix that?
Again, thx Mazzic!
Try issuing an answer and wait command;
exten => s,1,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(yourfile)
Thx Wentworth, that worked.