Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-5358

Post Call Recording Script error/bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Third Party Issue
    • Affects Version/s: 2.9
    • Fix Version/s: None
    • Component/s: Core
    • ToDo:

      Description

      I am running a script in the GUI Post Call Recording Script window

      {noformat}
      /var/lib/asterisk/bin/sortcalls1.sh ^{CALLFILENAME}.^{MIXMON_FORMAT} ^{MIXMON_DIR}{noformat}

      New 2.9 ISO load from the FreePBX Site.

      I am running a sortcalls1.sh that previously worked on a 2.7 box.

      Here is the script:

      {noformat}
      #!/bin/sh

      TODAY=`date +'%Y_%m'`
      #echo "Today $TODAY" >> $2calls.logdate >> $2calls.log
      #mkdir -p $2/$TODAY
      #ln /var/spool/asterisk/monitor/$TODAY* /var/spool/asterisk/monitor/$TODAY
      date >> $2calls.log

      DATE=`date -r $2$1 +'%Y%m%d'`
      mkdir -p $2$DATE
      UNIQUEID=`echo $1 |sed "s/.-([.0-9])\.[a-zA-Z]*$/\1/"`
      FILETYPE=`echo $1 |sed "s/.-[.0-9](\.[a-zA-Z]*$)/\1/"`
      NEWFILE=`/usr/bin/mysql u asteriskuser -pS29PoLwX91XR -N -B -D asteriskcdrdb -e "SELECT CONCAT(DATE_FORMAT(calldate,'%Y%m%d%H%i%s'),'',clid,'',dst) FROM cdr WHERE uniqueid = $UNIQUEID LIMIT 1"|sed -e "s/\s//g" -e "s/$/$FILETYPE/" -e 's/["<>]//g' `

      if [ -z $NEWFILE ] ;then
      NEWFILE=$1
      else
      NEWFILE=$NEWFILE.wav
      fi

      echo "author $NEWFILE"

      #NN=`echo $NEWFILE`|sed 's/-/_/g'
      #echo $NN
      echo "linking $2$1 to $2$DATE/$NEWFILE" >>$2calls.log

      if [ ! -f $2$DATE/$NEWFILE ] ;then ln $2$1 $2$DATE/$NEWFILE;fi

      #cd $2/$DATE
      #echo "will ftp" >> $2calls.log
      #/var/lib/asterisk/bin/put.exp $NEWFILE >> $2calls.log
      #cd $2
      #fi{noformat}

      I have also used -u freepbxuser with the same -p and I get the same results as I have pasted below. I would like to run this as root, as that is how I was doing it before, but it will not let me. I tried to change the mysqlroot password with commands I found on one of the forums and it seemed to work, but I get the same results if I put root and the new root password I set. Here is what happens:

      [bin|root@ystems]# vi sortcalls1.sh
      [bin|root@ystems]# amportal restart

      {noformat}
      Please wait...
      /usr/local/sbin/amportal: line 46: export: `^{CALLFILENAME}.^{MIXMON_FORMAT}': not a valid identifier
      /usr/local/sbin/amportal: line 46: export: `^{MIXMON_DIR}': not a valid identifier

      /var/lib/asterisk/bin/freepbx_engine: line 98: export: `^{CALLFILENAME}.^{MIXMON_FORMAT}': not a valid identifier
      /var/lib/asterisk/bin/freepbx_engine: line 98: export: `^{MIXMON_DIR}': not a valid identifier

      STOPPING ASTERISK
      All calls will be dropped once the timer hits 0. To cancel, press CTL-C
      Asterisk ended with exit status 0
      Asterisk shutdown normally.
      Asterisk Stopped

      STOPPING FOP SERVER
      SETTING FILE PERMISSIONS
      Permissions OK

      STARTING ASTERISK
      Asterisk Started {noformat}

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tm1000 Andrew Nagy
                Reporter:
                franklin franklin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.