Recordings form

It would be great to add a field to the recordings form, allowing the end user to add a note regarding the recording. This would allow the end user to more easily find the recording later.

Comments

  • It is not that hard to do it yourself, the code is there to tweak. I will write directly here, this is untested, it might contain typos or little errors.

    You must add a new column into the mysql table, something like:
    mysql -u root -p asterisk -e "ALTER TABLE fop2recordings ADD note text"
    

    After the table has the new field, edit the file /var/www/html/fop2/recordings.php . Find the line:
    $grid->set_fields('id,uniqueid,datetime,ownerextension,targetextension,duration,context,filename');
    
    And add your new field there:
    $grid->set_fields('id,uniqueid,datetime,ownerextension,targetextension,duration,context,note,filename');
    
    And to include the field in the search query, find the line:
    $grid->set_search_fields(array('ownerextension','targetextension','datetime','duration'));
    
    And add your field there too:
    $grid->set_search_fields(array('ownerextension','targetextension','datetime','duration','note'));
    

    Best regards,
  • This works so see the note field, but I am unable to edit or add to the note field.
  • changed a false to true in php. now working.
  • Since making these changes, it does not appear that I can add new recordings.

    Pressing the record button acts normal, but when you go to the recordings menu, no new recordings are there.
  • ooops, yes... you have to edit recording_fop2.pl as the INSERT query there does not have the new field, and thus fails.

    You will see a line like this:

    $query = "INSERT INTO $MYSQLTABLE VALUES ('','$uniqueid',now(),'$whorecorded','$whomrecorded','$finalrecording','$duration','$context');";

    Just add the empty value for note, if its the last field on the table it should look like:

    $query = "INSERT INTO $MYSQLTABLE VALUES ('','$uniqueid',now(),'$whorecorded','$whomrecorded','$finalrecording','$duration','$context','');";

    Best regards,
Sign In or Register to comment.