3

I am developing a sample IVR system in the Asterisk that plays a voice file when it receives and answers an incoming call. I wonder if it is possible to write a dial plan code or shell script which records message while it is playing a voice file (play and record simultaneously).

I appreciate your help in advance.

abbas
  • 53
  • 1
  • 7

1 Answers1

2

Yes, it is. I do it all the time, in fact. Your code would look something like:

exten => 100,1,Answer
 same => n,Wait(1)
 same => n,Monitor(wav,myfilename)
 same => n,Playback(this-call-may-be-monitored-or-recorded)
 same => n,Playback(pls-wait-connect-call)

For further reading, see:

http://www.voip-info.org/wiki/view/Asterisk+cmd+Monitor

http://www.voip-info.org/wiki/view/Asterisk+cmd+Playback

MichelV69
  • 1,247
  • 6
  • 18
  • 1
    Great answer. I would also advise that in the USA (and please note that this varies state-by-state) that you must tell BOTH parties the call is being recorded, before recording it, legally speaking. – dougBTV Aug 26 '13 at 18:11