Last active 2 months ago

  1. 5 years ago
    Sun Mar 9 05:50:44 2014
    OZPHB posted in Recordings.

    It looks like recordings.php is already set to allow persons with 'phonebook' permissions to view recordings:

    $context   = $_SESSION[MYAP]['context'];
    $extension = $_SESSION[MYAP]['extension'];
    $allowed   = $_SESSION[MYAP]['phonebook'];
    $admin     = $_SESSION[MYAP]['admin'];
    if($allowed <> "yes") {
       die("You do not have permissions to access this resource.");

    and admin or ownerextension to play them:

    $grid->set_condition("(ownerextension='$extension' OR $admin=1)");

    However this is not the actual behaviour I am seeing. What is happening is that if the user has anything other than 'all' permission set, then they cannot see anything at all under the "Recordings" tab. If they have the 'all' permissions set, then they see ALL recordings, made by any extension.

    Am I right in thinking that this is not the designed behaviour? According to the script (which I have not modified) shouldn't a user with 'phonebook' permission already be able to see their own list, and play it ? If so, any theories as to what is going wrong? (Or am I misreading the script entirely :oops: )

  2. Wed Mar 5 23:33:52 2014
    OZPHB started the conversation DND and BLF using FOP2 2.27.

    Hi Nicolas,

    I have recently upgraded to a new Freepbx system, and the FOP2 ver 2.27
    I am running:
    FOP2 version 2.27
    CentOS 6.5

    I am using Grandstream GXP2120 handsets, with BLFs set to monitor the state of various extensions.

    Mostly everything is working well, but an old problem [url:2hf2vro9]http://forum.fop2.com/esotalk/index.php/1282[/url:2hf2vro9] has resurfaced.

    The problem is that if I set a DND via the FOP2 panel, this does not change the BLF to red on the phone buttons monitoring that extension.

    The reverse DOES work - If I set the phone to DND by dialling *76, then any BLF monitoring that extension turns red, and the DND indicator appears on the FOP2 panel. Using *76 on the phone correctly toggles the status, and the BLF and FOP2 panels correctly update.

    Now, last time this issue arose (as per old thread linked above) the solution was to edit the FOP2Callbacks.pm file.

    When I view this file now, in version 2.27, it says

    # DND Integration from FOP2 to FreePBX ASTDB DND

    # DEPRECATED! All of this can be done from the new plugin
    # architecture

    So, what do I got to plug in where to make my pbx recognise DND settings made from the FOP2 panel ? :?

    Thanks in advance.

  3. Wed Mar 5 02:08:17 2014
    OZPHB posted in Recordings.

    The remaining issue is that my 'normal' fop2 users cannot see or play any recordings unless they have the 'all' permission.

    I have tried giving the users pretty much every permission individually, and in every case, they cannot see nor play the recordings. If I give them the 'all' permission, they can see and play the recordings.

    Specific permissions I have tested, none of which allow viewing or playing recordings are:

    I would prefer not to give the 'all' permission to all of my users. Is there a better solution?

  4. Wed Mar 5 02:03:20 2014
    OZPHB posted in Recordings.

    Hi Nicolás,
    Digging up an old post here, but it seems that the issue identified in this post is not wholly resolved :(

    I found this post by googling this site for the same issue - namely, a 'no way' message when a user tried to play or download a recording.

    I am using:
    FOP 2.27
    Asterisk 11.7.0
    Running on CentOS 6.5

    I see that, in FOP2.27 you have incorporated the coding change mentioned in this post into the download.php file
    (for the benefit of other readers, this file is located here: /var/www/html/fop2/download.php )

    Even with this change, I still experienced the issue. I have looked at my config, and the FOP2 recordings are no longer being stored in /var/spool/asterisk/monitor/fop2 ;
    instead, they are just being stored in /var/spool/asterisk/monitor

    accordingly, I changed this line in download.php:

    if(!stristr($_SESSION[MYAP]['vfile'],$_SESSION[MYAP]['vpath']) && !stristr($_SESSION[MYAP]['vfile'],'/var/spool/asterisk/monitor/fop2')) {

    to remove the 'fop2', becoming:

    if(!stristr($_SESSION[MYAP]['vfile'],$_SESSION[MYAP]['vpath']) && !stristr($_SESSION[MYAP]['vfile'],'/var/spool/asterisk/monitor')) {

    This now works. 8-)

    There is a sub-issue remaining, which I will post in a separate post below.

  5. Mon Feb 3 00:38:30 2014

    Ok, just to test, I changed it back to the IP address, and... it continued to work.
    so, I don't know what it was !?!

    All I can say for sure is: when I used the IP address, it refused to accept the credentials. When I used DNS name, it worked - no other changes. Now, it seems to be happy either way.

  6. Fri Jan 31 05:33:29 2014

    I have the FOP2 Lite edition working as a trial and can login and access it using Chrome on my PC. This is working perfectly and pops open the caller id information etc.

    I have now added the Chrome extension to get the Click to Dial option working, however using the same credentials as I use for the FOP2 desktop the extension just says that it is unable to connect. The only parameters I have included are:

    • the FOP2 Server
    • Port I have left at the default
    • Extension - same as I use to login to FOP2
    • Password same as I use to login to FOP2
    • Context - left bank

    Any ideas on what the issue might be or how to troubleshoot the connection issue?

    I found this thread when experiencing the same problem. (The thread is highjacked , and the original question was not resolved).

    I was able to resolve this problem by trial and error. I thought I would post up what I found, as it was not obvious (to me), and not documented.

    In the "Fop2 Server" dialog box, enter the address of the server as a dns name, not as an IP address, and it works.

    If the IP address is entered, it indicates: invalid credentials.
    changing it to a dnsname, such as: abc.yourdomain.local with no other changes - works immediately.

    WFM. Hope this helps others. :)

  7. 7 years ago
    Mon Jul 23 02:12:02 2012

    Ok, thanks Nicolas.

    I will keep looking, and post back if/when I locate/resolve the underlying problem!

  8. Sun Jul 22 01:01:09 2012

    Thanks for your further input - I have it working now!

    This from your last post was the key:

    You can look at the recordings_fop2.pl script

    I checked this file, and the comments at the top, and found that my permissions on this file were set to 'root' and not the 'asterisk' account I am using for asterisk.
    It also pointed me to the fop2.cfg file, where I found this:

    ; To enable the recording interface you must uncomment the following
    ; line, but also you might need to modify the script a little bit 
    ; depending on the sox version you have installed.

    So, I uncommented the line [code]monitor_exec=/usr/local/fop2/recording_fop2.pl[/code]

    Then, recordings started to work, mixed beautifully. The final recording is in stereo - with the playback playing my caller sound on the left channel, and my callee on the right channel, just like a conversation. Wonderful!

    It is now saving the completed recording using path /var/spool/asterisk/monitor/fop2/[date] rather than just leaving it in the top level /var/spool/asterisk/monitor/

    I can now 'see' the recording in my phonebook.

    I didn't even have to restart fop2.

    All working, 100% A OK :D

    Now, just a couple of other matters, for anyone else finding this topic:
    My issue *was*with FOP2, in that I did not have FOP2 config set up correctly.
    I did not know I had to uncomment lines in a config file to enable recording.

    I think the 'not putting the recorded file into a subdirectory using date' and 'recording not visible in phonebook' were, in hindsight, the key indicators of [my] user config error.

    A couple more things, more for completeness, and because I tried a lot of stuff so may as well note it down:

    Also in the fop2.cfg file is this section

    ; You could specify your own script to be executed when the recording
    ; is finished. It will receive 3 parameters, the complete
    ; path and filename of the IN leg, the OUT leg and the final
    ; recording NAME. You should run soxmix in your script to join
    ; the recordings into one file.
    ; monitor_exec=/var/lib/asterisk/bin/postrecording-script.sh

    I did not have to uncomment the postrecording-script.sh line, nor specify my own script to be executed when recording. This was to be my next step, but it was not required.

    I do not have a file called 'res_monitor.c' on my system.

    I tried mixing the in and out channels of a test recording using both of these suggestions:

    nice -n 19 soxmix wwwww-in.wav xxxxxx-out.wav xxxxxx-combined.wav


    nice -n 19 sox -m wwwww-in.wav xxxxxx-out.wav xxxxxx-combined.wav

    One concatenated the file, the other threw an error, and created a file with only the 'in' channel. So, this did not work.

    I was very reluctant to change my sox version as, as pointed out by Nicolas, asterisk 'expects' a certain version and my *1 recording method was working and I didn't want to break it. Part of my research suggested to me that asterisk is now using its own recording method, not using sox at all, but I didn't really get to the bottom of that.

    Thanks again Nicolas for an excellent program. My users are all hugely resistent to any form of technology, particularly remembering and dialling codes into the phone, so your big colourful buttons and point-and-click panel is very popular. My questions and queries are not a complaint, they are the product of a genuine desire to get the best out of a very good system.

  9. Thu Jul 19 05:53:34 2012

    HI Nicholas,
    I am sorry I have taken such a long time to reply. I have been looking into this, and running some tests.

    I have read, very carefully, the post you linked to me about the sox version.

    I note that upgrading the sox version did not fix the issues being experienced. I have tried this 'fix' which worked for some of the users on the post, but did NOT fix my issue:

    Try putting the following line in /etc/asterisk/globals_custom.conf:

    When I did this, the only effect was that the FOP2 recordings stayed separate (ie, two recordings, one 'in' and one 'out') when without that line in the globals_custom.conf the two files are appended into one file.

    Dialling *1 in call works perfectly for me - whether the asterisk system is the callee, or the caller.

    It seems to me that, actually, the problem really is with FOP2 .

    The command that FOP2 issues to make the recording must be different to the command issued when I dial *1 in call.

    When the 'record' option is used in FOP2, the recording is placed directly into /var/spool/asterisk/monitor, while when done via *1, the recording is placed in /var/spool/asterisk/monitor/year/month/day

    Also, the FOP2 phonebook "Recordings" tab shows "No records found" even though it just made a recording.

    I have had a look and FreePBX is using the following line in /etc/asterisk/features_applicationmap_additonal.conf


    I am not sure where to look to find the macro itself..

    It seems this macro works fine, but the fop2 one doesn't? Is it the case that the fop2 command is issued expecting a different sox version than exists on my system, while the freepbx ver is using a command compatible with my sox ver? I have sox ver 12.18.1, which I see is quite old, yet seems to be the latest version available in the centos repository my system is using.

    Any suggestions where to go from here?

    Thanks in advance.

  10. Fri Jul 6 04:20:39 2012

    Hi all, I have a FreePBX install, on Cent0S 64bit

    Linux version 2.6.18-274.3.1.el5 (<!-- e --><a href="mailto:mockbuild@builder10.centos.org">mockbuild@builder10.centos.org</a><!-- e -->) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Tue Sep 6 20:13:52 EDT 2011

    My basic problem is that recordings made using the FOP2 interface are recording the 'in' and 'out' channel separately, and then appending them into a single .wav file - rather than mixing them so that you can hear both sides of the conversation at the same time.

    So, I end up with one recording, twice as long as the call took, the first half of the recording containing anything said by the caller, and the second half being anything said by the callee. This is rather difficult to interpret!

    This does not happen when I record the call using *1 in call. In that case I get, correctly, a single .wav file with both sides of the conversation.

    I also note that the bitrate of the FOP2 recording is much higher.

    Is this a feature or a bug? Is there some way I can get the FOP2 recordings to mix the 'in' and 'out' so that I can hear the whole conversation?

    I had a bit of a look to try and find the FOP2 recording settings, with no success. Somewhere there must be the ability to set the bitrate, and, probably the recording format?

    Thanks for any help. I apologise in advance for what may turn out to be a dumb question :)

    PS: Also, FOP2 seems unaware of the recording in progress when the recording is vial *1. That is, when I record using FOP2, I get a cute little tape icon on the button for the call being recorded. When I use *1, the button does not indicate that the call is being recorded. Not a big issue, but perhaps a symptom?

View more