Deleting from monitoring list

Discussion in 'General' started by fainsys, Jul 13, 2009.

  1. fainsys

    Joined:
    Jan 25, 2008
    Messages:
    9
    Likes Received:
    0
    I have several hundred monitoring files I need to delete in order to free up space. Right now it seems that I have to click on each one individually then submit only 15 at a time. I would like to be able to ither say select all and it would select all 15 for me....or better yet I wish I could do a search query then delete all that meet those results. This way I can delete once only to/from certain numbers.

    Thank you.
     
  2. rejil.rajan

    Joined:
    Apr 8, 2007
    Messages:
    154
    Likes Received:
    0
    Hi

    You can always delete it from the backend of the system

    Login to the system using ssh and navigate to /var/spool/asterisk/monitor/ and delete the files that you do not require using the rm command, or you can move them to another system and use these files for future reference
     
  3. fainsys

    Joined:
    Jan 25, 2008
    Messages:
    9
    Likes Received:
    0
    I thought that Elastix indexed all the files in the MySQL database. So I did not want to just delete the files and have the db think they should still be there.
     
  4. mainsail

    Joined:
    Dec 1, 2010
    Messages:
    2
    Likes Received:
    0
    Do not delete the files on the back end. As fainsys states, Elastix indexes the recordings in the database. You will end up with broken links.

    I too was looking for a way to mass-delete the old recorded calls. After all, they take up quite a bit of space. The current Elastix user interface is very poorly designed for deleting recorded calls. Each page lists 20 calls at a time and you have to individually click on each checkbox before hitting the delete button. Of course, if you have thousands of recorded calls like me, this potentially takes many hours of mind numbing and pointless work.

    I decided to take a more practical approach and see if I could hack the monitoring module just enough to make this less painful. I had no desire to redesign the interface or add significant new functionality (such as a select all button or a user option to list more than 20 records at a time). Instead, I performed two quick hacks with minimal editing and no risk to my existing setup:

    1. I increased the number of listed recordings from 20 to 200 so I wouldn't keep hitting the next page. You can set this number to whatever you like. 200 was a sensible number for my situation.

    2. I changed the default state of the check boxes from unchecked to checked so I wouldn't have to select each an every record individually before I could delete them. This change is the real time saver.

    These two quick modifications meant that I could delete 200 records at a time with two clicks (instead of more than 250 clicks in the original interface). So if I had 2000 records, it would only about 2 minutes to delete them. Previously it would take me upwards of three hours.

    Here are the detailed instructions:

    1. SSH to your Elastix server. You need administrative privileges, of course. For example, "sudo bash"

    2. Go to the monitoring module directory (i.e. "cd /var/www/html/modules/monitoring").

    3. Make a backup copy of your original module file (i.e. "cp index.php index.php.ORIGINAL"). If you make a mistake at any point, you can restore your original file from this backup copy.

    4. Open the index.php file with your favorite editor. I personally prefer vi (I am old school and have been using UNIX/Linux since mid 1980s). You can use nano or whatever you like. For example, "vi index.php"

    5. Find the line that says:

    $limit = 20

    and change that number to whatever you like. This is the variable that controls the number of displayed records. I increased this limit to 200 (i.e. "$limit = 200").

    6. Find the line that says:
    $arrTmp[0] = "<input type 'checkbox' name='id_".$value['uniqueid']."' />";

    and change it to:

    $arrTmp[0] = "<input type 'checkbox' name='id_".$value['uniqueid']."' checked/>";

    This change ensures that the CHECKED attribute of the form element CHECKBOX is set so you don't have to.

    7. Using your browser, go to Elastix admin interface, sleect the PBX tab and click on Monitoring link at the top. Set your filter criteria and submit. Tada! Now you have up to 200 records displayed and their checkboxes are checked. All you have to do is to click on the delete button.

    Let me know if this doesn't work for you for any reason. Happy deleting!
     
  5. tumbleweed

    Joined:
    Jun 18, 2010
    Messages:
    79
    Likes Received:
    0
    Brilliant post! Just what I've been looking for as I too have the same issues.
    Although I hav'nt tried this yet, is there a way of adding a "select all" feature?
     
  6. mainsail

    Joined:
    Dec 1, 2010
    Messages:
    2
    Likes Received:
    0
    I am glad you found the post useful. :cheer: Let me know how it works for you.

    Don't forget to save the php file after making the changes, of course.
     
  7. tumbleweed

    Joined:
    Jun 18, 2010
    Messages:
    79
    Likes Received:
    0
    Yes it works fine, thanks. I did the same ($limit) for the CDR reports too as this only shows 50 records and exports just the 50 records! Having said that, I now use FreePBX for reports as it is better.

    I'm using Elastix v2.0.1 and after the above change the delete column just goes wider and not showing any ticks. Is this what you have?

    Would be good to have a "select all", giving the choice to delete some and not all. So you could select all then just untick the ones you want to keep.
     
  8. medtantda

    Joined:
    Feb 5, 2011
    Messages:
    3
    Likes Received:
    0
    sir this work in previous version. the new version still works but after i click delete button i think the file is deleted but it still display the time etc. but you cant listen or download the recording anymore the "type" says deleted. how to remove this in backend? thanks...
     
  9. RustBoy

    Joined:
    Apr 13, 2011
    Messages:
    97
    Likes Received:
    0
    I have a bunch of files that I need to delete. Does anyone have a way to fix this?

    I am running Elastix 2.2.0-14 and it's not working for me either. I changed the list value to "$limit = 200;" but it's still only showing 20 records. They do show up checked now as the default state but when I click the delete button they do not get deleted from the list.

    Thanks.
     
  10. deltondata

    Joined:
    Sep 3, 2008
    Messages:
    4
    Likes Received:
    0
    sir this work in previous version. the new version still works but after i click delete button i think the file is deleted but it still display the time etc. but you cant listen or download the recording anymore the "type" says deleted. how to remove this in backend? thanks...
     
  11. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    Are you running the latest update for elastix?
    If so, you may post it on the bug tracker:
    http://bugs.elastix.org
     
  12. winanjaya

    Joined:
    Jul 7, 2011
    Messages:
    33
    Likes Received:
    0
    Hello All,

    I am facing the same problem on elastix-2.4.0-1

    please help

    Thanks
     
  13. soborno

    Joined:
    Dec 19, 2011
    Messages:
    1,358
    Likes Received:
    4
    Re: Re:Deleting from monitoring list

    What´s your specific problem?

    Regards,
    Claudio
     
  14. arnold

    Joined:
    Aug 12, 2010
    Messages:
    1
    Likes Received:
    0
    Fix works in 2.4
    edit lines 252 and 280
     
  15. evlew

    Joined:
    Mar 24, 2015
    Messages:
    1
    Likes Received:
    0
    Re: Re:Deleting from monitoring list

    I can't tell the difference between the two lines. It appears the forum has changed it to blank input boxes.

    Can anyone tell me what this line should read as?
     

Share This Page