how to record entire conversation on selected calls?

  1. 8 years ago

    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,

    Answered by s8y

    See post in context

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

    Regards,

  2. Hi,

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

    Thanks

  3. admin

    24 Jul 2016 Administrator

    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.

  4. 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,

  5. admin

    25 Jul 2016 Administrator

    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,

  6. Edited 8 years ago by s8y

    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,

  7. admin

    27 Jul 2016 Administrator

    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,

  8. 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,

  9. admin

    2 Sep 2016 Administrator

    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).

  10. 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,

  11. admin

    3 Sep 2016 Administrator

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

  12. s8y

    14 Sep 2016 Answer

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

    Regards,

  13. admin

    23 Sep 2016 Administrator

    Thanks for sharing your solution!

or Sign Up to reply!