how to record entire conversation on selected calls?

hello,
We would like to use fop2 to record entire call instead of from the moment recording button is pressed.
I believe the easiest way forward would be to use Asterisk's mixmonitor.
The way it supposed to work:
1. Record conversation on call bridging with new variable e.g. DeleteOnHangup=yes
2. Give agent ability to set channel variable to DeleteOnHangup=no
3. Delete (or not) call recording on hangup based on DeleteOnHangup value.
4. if DeleteOnHangup=no inject file path to fop2.fop2recordings table in mysql
I know how to get it configured on asterisk side but struggling with fop2 side.
Can anyone please help?
Thanks,

Comments

  • Hi,

    How can you do that on asterisk? Pls share your dialplan/config.

    Thanks
  • You want a plugin you can use to set a variable on your current call. Look at the pause recording plugin that has a similar interaction as your need: it has a button to set/unset some command, that is also targeted to some channel. You can use it as a base, add a different icon to set/unset your variable (in the .js side), then send the ami command to set a variable on the .pl side.
  • thanks for responding.
    Where do I find "pause recording plug-in" please? Can't find it at http://www.fop2.com/buy.php
    or anything with functionality that would match what you described?
    Thanks,

  • Log into the FOP2 Manager (http://your.server/fop2/admin) and select the plugins section.

    There are *many* plugins there for you to try, most of them are free/included.

    Best regards,
  • s8ys8y
    edited July 2016
    Great, that is very useful. My box is behind proxy, restricted from accessing the internet. The only plugin I was able to see was "FOP2 Manager Autoconfiguration" and browse and upload buttons. I'll try to get it web connected,reload fop2 and have another look.
    Thanks,
    update: I connected my box to the internet. it says "Not compatible with this version" next to "Pause Recording Button" plugin. Its acutaly the only plugin with that status in the list.
    I am using fop2 v2.31 and and fop2 manager v1.1.3 on asterisk 13.9.1

    Is there github repository for the plugin (need to get hold of configuration files), alternatively what version of fop2/fop2 manager should I install to be able to download the plugin?
    Thanks,
  • http://download.fop2.com/plugins/pauserecording-1.0.0.tgz

    Try that link to download the plugin, you will be able to extract an inspect the source.

    You need at least FOP 2.31.01 for that plugin, latest version is 2.31.02, you should upgrade FOP2 anyways if you have the chance.

    Best regards,
  • hello,
    I spent some time learning perl to understand what .pl script does and managed to put together functionality I am after.
    1. Is there any manual on how to create fop2 plugin and how fop2 plugins interacts with fop2 and asterisk?
    e.g. line #10 of attached file calls function get_btn_config with 3 variables from module "main". Where do I find main module?
    2. how can I debug *.pl script. I confirmed it compiles correctly but when I try to run it from command line it doesn't display any uncommented print " \n" lines.

    3. As far as I understand only .jp and .pl files contains any moving parts. should I also look anywhere else?
    Thanks,
  • There is no manual but the sampleplugin code that explains the interface. And you will have to read and experiment with source from other plugins to see what can be done and how. Its a complex thing as you need to understand Asterisk AMI quite well, and work with event based systems and add to that the communication between client and server in FOP2.

    get_btn_config retrieves button configuration from $context, $origin, 'HEADER': $context is the tenant/context, $origin is the button number position that originates or makes the request, HEADER is the button header as in buttons.cfg, the only one added is MAINCHANNEL for the [SIP/xxxx] config.

    Then you see get_active_chan and get_active_link that takes that retrieved channel, those functions will return the live asterisk channel (with session id), and the bridged channel. So you can use them as parameters for any Manager Action you might need to send to the server afterwards.

    There is a little bit of spanish in there, but variables and function names are self explanatory (assuming you know about Asterisk, AMI, etc).
  • Great, this is really helpful.
    I have found /usr/src/fop2/plugins/sampleplugin/sampleplugin.pl

    How can I see output of print inside perl sub (one from the script) e.g. $Client_Post_Command_Handler{'pauserecording'}{'custompauserecording'}
    print "origen $origen destino $destino contexto $contexto\n";
    or
    print "my channel $mychannel active $activechannel bridge $bridgechannel\n";
    Line 8 line 19 of script attached in my previous post.

    Thanks,
  • Start fop2 in debug mode and anything you print there will be logged in the fop2_debug.log

  • hello,
    For those who may have similar requirement this is how we got it working.

    Regards,
  • Thanks for sharing your solution!
Sign In or Register to comment.