Call recordings

Okay,can anybody tell me what is the best manner to record a call through a java spring application.
I have a button in my application that can make calls through AMI (so I click a button in my app, and softphone is opened ) and I am thinking about adding another button in the same page in my app to record the call that is in progress.So i click the ‘record call’ button and the softphone starts to record the actual call in progress.
So it is on demand call recording,I have made a lot of search but now I am confused about how to manage asterisk to get the call recordings and save in my local database.

I havent tested but assuming you re using local channels with the originate command you could try then some of these options and inject the DTMF code using AMI

  • w - Allow the called party to enable recording of the call by sending the DTMF sequence defined for one-touch recording in features.conf .
  • W - Allow the calling party to enable recording of the call by sending the DTMF sequence defined for one-touch recording in features.conf .
  • x - Allow the called party to enable recording of the call by sending the DTMF sequence defined for one-touch automixmonitor in features.conf .
  • X - Allow the calling party to enable recording of the call by sending the DTMF sequence defined for one-touch automixmonitor in features.conf .

Other method would be use chanspy and local channel to record the call

If you have already developed your application to instantiate a call using the AMI with the originate command, you could also do the same for recording the call. You will have to know the channel id for the channel you wish to record, then use the AMI command below. You will already know the location and name of the file you are going to create for the recording as this will be the value you enter into the FILE parameter so you can store the location in your database as a link to where the file is saved.

Action: MixMonitor
ActionID: value
Channel: value
File: value
options: value

Arguments

  • ActionID - ActionID for this transaction. Will be returned.
  • Channel - Used to specify the channel to record.
  • File - Is the name of the file created in the monitor spool directory. Defaults to the same name as the channel (with slashes replaced with dashes). This argument is optional if you specify to record unidirectional audio with either the r(filename) or t(filename) options in the options field. If neither MIXMONITOR_FILENAME or this parameter is set, the mixed stream won’t be recorded.
  • options - Options that apply to the MixMonitor in the same way as they would apply if invoked from the MixMonitor application. For a list of available options, see the documentation for the mixmonitor application.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_MixMonitor

1 Like