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. Elastix Call Recording

Elastix Call Recording

Scheduled Pinned Locked Moved Support
15 Posts 2 Posters 773 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.
  • N
    N
    nicolas
    wrote on last edited by
    #6

    The .pl script will override any manual mysql credentials with the ones set in amportal.conf or freepbx.conf files:

    if(-f "/etc/amportal.conf") {
    my $ampconf = parse_amportal_conf( "/etc/amportal.conf" );
    $MYSQLUSER = $ampconf->{"AMPDBUSER"};
    $MYSQLPASS = $ampconf->{"AMPDBPASS"};
    $MYSQLHOST = $ampconf->{"AMPDBHOST"};
    } elsif(-f "/etc/freepbx/freepbx.conf") {
    my $ampconf = parse_amportal_conf( "/etc/freepbx/freepbx.conf" );
    $MYSQLUSER = $ampconf->{"AMPDBUSER"};
    $MYSQLPASS = $ampconf->{"AMPDBPASS"};
    $MYSQLHOST = $ampconf->{"AMPDBHOST"};
    }

    Try to grep for AMPDB in /etc/amportal.conf and try to connect to mysql asteriskcdrdb database with those. Does that work?

    In any case, to troubleshot you should enable full debug in Asterisk itself and check the /var/log/asterisk/full log for the execution of the post monitor script. The full command, including all parameters, will be logged, something like

    Executing /usr/local/fop2/recording_elastix.pl some-in.wav some-out.wav some.wav 123123123123.123

    Then you can "su asterisk" in the command line and run the exact same command you see in the log wit the same parameters and see if you get an error or something. You might want to comment the unlink lines from the script so the original sound files are in place by the time you run the script by hand (otherwise the files will be removed and the script will fail for a file not found, and not because something else happened). So, look for this:

    if ( -f $LEFT . "-tmp.wav" ) {
    unlink $LEFT . "-tmp.wav";
    }

    if ( -f $RIGHT . "-tmp.wav" ) {
    unlink $RIGHT . "-tmp.wav";
    }

    if ( -f $OUT ) {
    unlink $LEFT;
    unlink $RIGHT;
    }

    and just prefix all the unlinks with a # symbol when doing tests.

    1 Reply Last reply
    0
    • G
      G
      gavinlew
      wrote on last edited by
      #7

      Hi Nicolas,

      If I run the script from the command line I get the following errors ;

      $ /usr/local/fop2/recording_elastix.pl g7046-1383038562.8061-in.wav g7046-1383038562.8061-out.wav 1383038562.8061.wav
      Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.
      Use of uninitialized value in concatenation (.) or string at /usr/local/fop2/recording_elastix.pl line 202.

      Is the script mixing the files together, then die'ing before doing the SQL work?

      Many Thanks,

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

        Yes, the sql work is at the end. The command line is missing the uniqueid that must come as the 4th parameter...

        1 Reply Last reply
        0
        • G
          G
          gavinlew
          wrote on last edited by
          #9

          Hi Nicolas,

          I have tried passing this
          /usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav 1383046959.12073.wav 1383046959.12073
          Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.

          and also

          /usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav 1383046959.12073.wav 1383046959

          Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.

          and also

          /usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav g7046-1383046959.12073.wav 1383046959

          Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.

          All giving the same error on line 173

          $uniqueid =~ s/.wav//g;

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

            Hmm, the Execute line is not obeying what it was told (or what you posted as AMI events received) as the monitor filename:

            /var/spool/asterisk/monitor/7026_7026_140619_1382969176.168878

            The monitor filename should look like that. The script will split the name and get fields for the database queries, the filename you posted on your last mail is not following that convention. So, not sure if you changed the monitor_filename entry in fop2.cfg or something else is happening down the pipe.

            1 Reply Last reply
            0
            • G
              G
              gavinlew
              wrote on last edited by
              #11

              Hi Nicolas,

              fop2.conf ;

              ; For elastix Monitoring Tab:
              ;monitor_filename=g${DEST_EXTENSION}-${UNIQUEID}

              monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}${DEST_EXTENSION}%h%i%s_${UNIQUEID}

              ; For fop2 recording interface
              ;monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}${DEST_EXTENSION}%h%i%s_${UNIQUEID}

              Which results in the following files being created ;

              -rw-r--r-- 1 asterisk asterisk 312364 Oct 29 12:35 g7046-1383046959.12073-out.wav
              -rw-r--r-- 1 asterisk asterisk 312364 Oct 29 12:35 g7046-1383046959.12073-in.wav

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

                Hi Gavin,

                It does not make much sense, the config AND the events you posted are showing the correct format for the filname. Where is your fop2.cfg file located? Perhaps you are modifying the incorrect one .. elastix stores the file in /etc/asterisk/fop2 and the tarball install in /usr/local/fop2

                The gXXX is the "old" name for Elastix, your config looks right:

                monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}${DEST_EXTENSION}%h%i%s_${UNIQUEID}

                there is no g at the start of the filename...

                1 Reply Last reply
                0
                • G
                  G
                  gavinlew
                  wrote on last edited by
                  #13

                  Hi,

                  Ok - there was the first problem, elastix calling the config file from /etc/asterisk/fop2 , I have moved the config files from /usr/local/fop2 into /etc/asterisk/fop2

                  However, now I have a problem where fop2 will start and no longer accepts connections - I will take some time to remove all the configuration and rebuild.

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

                    If you use Elastix that forces https, then you need either disable websockets in /var/www/html/fop2/js/presence.js OR set the ssl certificates in fop2.cfg so your browser accepts secure websocket connections.

                    The fop2.cfg bundled with 2.27 has commented out the lines to enable the certificates, and I think the locations of the commented files are indeed the ones used by Elastix and other Centos based distributions.

                    ; If you access fop2 via https, browsers will try to use wss (Secure 
                    ; web sockets) and for that it requires a certificate file and key file,
                    ; the same ones you have in your web server configuration:
                    ;
                    ;ssl_certificate_file=/etc/pki/tls/certs/localhost.crt
                    ;ssl_certificate_key_file=/etc/pki/tls/private/localhost.key
                    

                    Best regards,

                    1 Reply Last reply
                    0
                    • G
                      G
                      gavinlew
                      wrote on last edited by
                      #15

                      Hi Nicolas,

                      I have fixed the problem

                      The issues were;

                      1/ Elastix FOP2 config files being in /etc/elastix/fop2 (Removed these and symlinked to /usr/local/fop2)
                      2/ Asterisk mysql_so not loading , fixed by uninstalling/reinstalling asterisk-add*
                      2a/ Incorrect line in /etc/asterisk/cdr files , modified to enable cdr logging
                      3/ Incorrect passwords in /etc/asterisk/mysql files - auto generated and fixed by manually changing passwords

                      Many thanks for all your help - finally got there and call recording is working and data is displayed in Elastix Recordings tab again.

                      Gavin

                      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