Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Recordings

Recordings

Scheduled Pinned Locked Moved Support
12 Posts 3 Posters 548 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    T
    tekach
    wrote on last edited by
    #1

    Hello,

    I have a problem with using recordings interface on FOP 2.24. I can see recorded calls in FOP2's interface. They are also physically present in /var/spool/asterisk/fop2/date.

    • When I click on "play" icon nothing happens
    • When I click on "download" icon I get a message "no way".

    I've found some information about the "no way" message and memcached, but I haven't found any settings in /etc/php.d.

    Also, is there a way of showing recorded calls in ARI (Freepbx call monitor) interface?

    Thank you,
    Andrej

    1 Reply Last reply
    0
    • T
      T
      tekach
      wrote on last edited by
      #2

      Hi Nicolas,

      is there a reason why this post is ignored?

      BR
      Andrej

      1 Reply Last reply
      0
      • N
        N
        nicolas
        wrote on last edited by
        #3

        The reason was that I was on vacations.. it seems you have session problems. no way means that.

        If you use trixbox, disable memcache

        If you are not using trixbox, but you updated php via yum, most probably your php sessions directory has a different owner than asterisk, to find out run:

        ls -lda /var/lib/php/sessions
        

        (assuming your php session directory is the above, I do not have a way to know what your php session directory is nor its configuration, you have to check your php settings).

        If the directory above exists, and has an owner other than asterisk, then change ownwership

        chown asterisk.asterisk /var/lib/php/sessions

        Then restart the web server and try again. If you have session problems, they are usually logged in your apache error_log.

        Again, I said USUALLY. No install is the same, so I do not know if your php is logging in errors into the web server error log or not, that depends on your install/configuration.

        ALL OF THE ABOVE is not related with the fop2 installation itself.

        Best regards,

        1 Reply Last reply
        0
        • T
          T
          tekach
          wrote on last edited by
          #4

          Hi,

          I've double checked the ownership of /var/lib/php/sessions and owner was already asterisk:asterisk.

          According to use of tail -f /var/log/httpd/error_log while clicking on play or download icons produces no error messages.

          I'm using Centos 5.7 x64, Freepbx and compiled asterisk. Asterisk and apache are running under asterisk user. I'm getting same result with Chrome and IE.

          Other apps relying on php sessions are working OK.

          I understand that working environment has nothing to do with excelent product of yours, but would appreciate any further hints.

          Thanks
          Andrej

          1 Reply Last reply
          0
          • N
            N
            nicolas
            wrote on last edited by
            #5

            Hi Andrej,

            I have found the problem, it is indeed a bug as 2.24 has some security improvements that is actually preventing the download of recordings (as it only allows the voicemail path for files to be downloaded). If the destination directory is set to /var/spool/asterisk/voicemail/something , it will work. But /var/spool/asterisk/fop2 does not.

            Maybe I can hardcode the /var/spool/asterisk/fop2 directory, or limit download for anything under /var/spool/asterisk only.

            You can modify donwload.php and change this:

            if(!stristr($_SESSION[MYAP]['vfile'],$_SESSION[MYAP]['vpath'])) {
                die("no way");
            }
            

            to something like this:

            if(!stristr($_SESSION[MYAP]['vfile'],$_SESSION[MYAP]['vpath']) && !stristr($_SESSION[MYAP]['vfile'],'/var/spool/asterisk/monitor/fop2')) {
                die("no way");
            }
            
            1 Reply Last reply
            0
            • T
              T
              tekach
              wrote on last edited by
              #6

              Many thanks, that worked like a charm! πŸ™‚

              Have a good day,
              Andrej

              1 Reply Last reply
              0
              • O
                O
                OZPHB
                wrote on last edited by
                #7

                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
                FreePBX 2.11.0.24
                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.

                1 Reply Last reply
                0
                • O
                  O
                  OZPHB
                  wrote on last edited by
                  #8

                  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:
                  chat
                  dial
                  hangupself
                  meetme
                  phonebook
                  pickup
                  preferences
                  queueagent
                  queuemanager
                  record
                  recordself
                  transfer
                  transferexternal

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

                  1 Reply Last reply
                  0
                  • N
                    N
                    nicolas
                    wrote on last edited by
                    #9

                    Currently fop2 will set an "admin" session variable to the user with "all" in permissions, recordings will be available to that user. There is no separate "recordings" permission to be set. You could alter the code to require the "phonebook" permission instead of "admin" (in recordings.php), or even set the permission to particular extensions in code directly.

                    Best regards,

                    1 Reply Last reply
                    0
                    • O
                      O
                      OZPHB
                      wrote on last edited by
                      #10

                      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: )

                      1 Reply Last reply
                      0
                      • N
                        N
                        nicolas
                        wrote on last edited by
                        #11

                        I thinks your recordings table is not being populated right, seems like the context is being left blank or similar to that, perhaps due to the configuration in fop2.cfg being inherited from previous fop2 versions:

                        monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}_${DEST_EXTENSION}_%h%i%s_${UNIQUEID}_${FOP2CONTEXT}
                        monitor_format=wav
                        monitor_mix=true
                        monitor_exec=/usr/local/fop2/recording_fop2.pl
                        

                        Also, in recording_fop2.pl, be sure you use the last version also:

                        my ( $exten, $targetexten, $fullmbox, $uniqueid, $context ) = split( /_/, $basename );
                        
                        if(!defined($context)) {
                            $context="";
                        }
                        
                        $uniqueid =~ s/\.wav//g;
                        $context  =~ s/\.wav//g;
                        

                        Best regards,

                        1 Reply Last reply
                        0
                        • O
                          O
                          OZPHB
                          wrote on last edited by
                          #12

                          A re-install with the latest version seems to have fixed all issues.

                          Thanks for your help.

                          1 Reply Last reply
                          0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better πŸ’—

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          Powered by NodeBB Contributors
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups