Recordings Visibility for different users/contexts

  1. 11 years ago

    Hi !

    We have several users with own contexts. If the "user 1" with context "user1" make record of his call, he can see it in VisualPhonebook - Recordings, but the "user2" with context "user2" can also see it. Is it a bug or a future ? :)

    The records in mysql table come with empty "context" field... But if i fill this field with context name "user1" or "user2" nothing changes - all recoring are visible to all users.

    2.27 version - asterisk 1.4

    Any ideas ?

  2. admin

    8 Nov 2013 Administrator

    Add the context to the filename so it gets populated, in fop2.cfg:

    monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}_${DEST_EXTENSION}_%h%i%s_${UNIQUEID}_${FOP2CONTEXT}

    Best regards,

  3. Well, it's really add context in mysql table, but it didn't solve the problem. The recordings are still visible to everybody from different contexts.

    But i found the solution. I cut ***OR $admin=1*** part from recordings.php
    $grid->set_condition("(ownerextension='$extension' OR $admin=1)");

    and now only owner of current extension can see these recordings.

    By the way, what kind of "admin" was here ?

    Best regards,
    Sergio.

  4. admin

    9 Nov 2013 Administrator

    having "all" permissions is treated as an "admin", anyways, I will see if I will modify the script so it separates the contexts.

  5. It doesn't separate the contexts in this way , it separates by originate exten. So if the call was made from "user1" exten, than the "ownerexten=user1" and only "user1" can see these recordings. No need to add ${FOP@CONTEXT} in monitor_exec file name...

    My system work as the following - I have about 100 users and every user can make recordings, can see them and can delete ( add a button "delete" to the page ). Every night the script cleans /var/spool/asterisk/monitor/fop2 folder and mysql table so Users who need their records, must download them and store on local hosts. On my opinion it's the best way to give the ability to record and to keep server clean.

    Best regards,
    Sergio.

  6. admin

    10 Nov 2013 Administrator

    Thanks for the feedback, I understand your need, and you have fixed it already to suit you.

    Anyways, I think that in regular cases, the "admin" user should be limited by panel context, as the panel context is thought to be used in multi tenant setups, and the admin granting access to other contexts is indeed a bug/problem.

    Be sure you backup your recordings.php file so it does not get overwritten if you upgrade fop2 in the future!

    Best regards,

or Sign Up to reply!