Brekeke Contact Center Suite Wiki

7. Configure Audio Player for Call Recording files

 

Go to the Tables menu and find the “sn_openframe_phone_log”

 

Click a New button to create a new column named “u_recording_file“, then click Save.

 

Fill information like the following picture:

 

Back to the Table Phone Log page, scroll down to the bottom of that page and click on Show List.

 

Click on any record of phone log or you can click “New” to go to the page below and then choose “Client Script” menu.

 

Create new client script. Copy the following “Brekeke Audio.js” script and paste it at the [Script] field. Uncheck the “Isolate scripts” checkbox at the bottom of the page before saving.

Brekeke Audio.js:

function onLoad() {
    // replace recording file field by an Audio player
    var field = 'u_recording_file';
    field = g_form.getControl(field).id;
    var url =  g_form.getValue(field);
    try{
        $(field).insert({
            after: '<audio controls> <source src="'+url+'" type="audio/ogg"></audio>'
        });
        $(field).hide();
    }
    catch(e){
        jslog('Error here : '+e.message);
    }
}

 

 

*If you can’t find that “Isolate script” field, please select on “Form Layout” menu,

then select Isolate script and move it to the right panel. Then Click save.

 

 

If the configuration is completed successfully, the Audio Player is shown on each Phone Log record as below:

 

 

Yes No
Suggest Edit