• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

[How-To] Record Calls

Scheduled Pinned Locked Moved Support
73 Posts 12 Posters 17.6k Views 12 Watching
Loading More Posts
  • 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.
    • B Offline
      Br1
      last edited by Br1 30 Aug 2023, 19:10

      ---- UPDATE OTA-2 Focal ----
      ---- Stable Channel ----

      Usual three steps :

      1 - download callrecorder-ota.2.tar.gz from here : www.spacelinux.it/UTouch/callrecorder-ota.2.tar.gz

      2 - open file manager, go to Downloads tap callrecorder-ota.2.tar.gz and tap extract archive

      3 - open terminal, type :

      sudo Downloads/callrecorder-ota.2/callrec-install
      

      and hit enter,

      type 1 + enter to install

      type 2 + enter to uninstall

      and reboot.


      As in previous versions, install script asks you how many days you want to keep recorded calls, hit enter for default (30 days) if you later decide to change, repeat the installation (in this case reboot not required).

      Focal required several changes, callrecorder now is a systemd service, to delete older calls there is a systemd user timer .

      preview of the new version of callrec-install :

      #!/bin/bash
      
      CRSERV=/usr/lib/systemd/system/callrecorder.service ;
      
      # Make sure only root can run this script
      if [ "$(id -u)" != "0" ]; then
         echo "    Must be run as root, you must prepend sudo !" 1>&2 ; exit 1
      fi
      
      echo -e '\n - Install/uninstall CallRecorder :\n' ;
      
      PS3='Please enter your choice : '
      options=("Install" "Uninstall" "Quit")
      select opt in "${options[@]}"
      do
      	case $opt in
      	"Install")
      
      			#   -------------------- already installed section ------------------------------
      
      			if [ -f "$CRSERV" ]; then
      
                                              echo -e '\n Recorded calls : auto erase them after' ;
      
                                              read -p " how many days ? (hit enter for 30) : " days
      
      					# --------------- default days section --------------------------
      
      					#if pressed ENTER set default days
      					if [ ${#days} -eq 0 ];	then days=+30 ;
      
      					# remove + for echo message
      					myString="${days:1}" ; echo -e "\n  - Will be deleted after $myString days. \n" ;
      
      					# replaces the third line
      					sed -i "3s/.*/days=$days/" /home/phablet/.callrec/rec-remove-sh ;
      
      					exit 0
      
      					else	# -------- custom days section  -------------------------
      
      					echo -e "\n  - Will be deleted after $days days. \n" ;
      
      					days=+$days ;
      
      					# replaces the third line
      					sed -i "3s/.*/days=$days/" /home/phablet/.callrec/rec-remove-sh ;
      
      					exit 0
      
      					fi
      
      
      			fi
      
      			#   ----------- end already installed -------------------------------------------
      
      
      			# ------------- new install section ---------------------------------------------
      
      
      			# creates 4 directories
      			mkdir -p /home/phablet/.callrec ;
      			mkdir -p /home/phablet/MyRec/{saved,} ;
      			mkdir -p /home/phablet/.cr_Ram ;
      
      			cp /home/phablet/Downloads/callrecorder-ota.2/* /home/phablet/.callrec/ ;
      
      			# change the working directory
      			cd /home/phablet/.callrec ;
      
      			# mount root in read/write mode
      			mount -o remount,rw / ;
      
      			# copy callrecorder service and enable autostart
                              cp callrecorder.service /usr/lib/systemd/system/ ; systemctl enable callrecorder > /dev/null 2>&1 ;
      
      			# roll back root in read only mode
      			mount -o remount,ro / ;
      
      			# copy rec-remove.service/timer and create simbolic link (as user)
      			su - phablet -c "cd /home/phablet/.callrec ; cp rec-remove.service rec-remove.timer /home/phablet/.config/systemd/user/ ; ln -s /home/phablet/.config/systemd/user/rec-remove.timer /home/phablet/.config/systemd/user/default.target.wants/rec-remove.timer" ; 
      
      
                                              echo -e '\n Recorded calls : auto erase them after' ;
      
                                              read -p " how many days ? (hit enter for 30) : " days
      
      						# --------------- default days section ------------------
      
      						#if pressed ENTER set default days
      						if [ ${#days} -eq 0 ];	then days=+30 ;
      
      						# remove + for echo message
      						myString="${days:1}" ; echo -e "\n  - Will be deleted after $myString days. \n" ;
      
      						# replaces the third line
      						sed -i "3s/.*/days=$days/" /home/phablet/.callrec/rec-remove-sh ;
      
      						else  # -------- custom days section --------------------
      
      						echo -e "\n  - Will be deleted after $days days. \n" ;
      
      						days=+$days ;
      
      						# replaces the third line
      						sed -i "3s/.*/days=$days/" /home/phablet/.callrec/rec-remove-sh ;
      
      						fi
      
      			echo -e '\n Installed, reboot your device !\n' ;
      
      			exit 0
      
      		;;
      
      	"Uninstall")
      
      			# check status
      			if [ ! -f "$CRSERV" ]; then
      
      			echo -e '\n CallRecorder is not installed !\n' ; exit 1
      
      			else
      
      			# mount root in read/write mode
      			mount -o remount,rw / ;
      
      			# stop callrecorder, disable autostart and remove files
      			systemctl disable --now callrecorder > /dev/null 2>&1 ;
      			rm $CRSERV ;
      
      			# roll back root in read only mode
      			mount -o remount,ro / ;
      
      			# remove all timer files
      			rm /home/phablet/.config/systemd/user/rec-remove* ;
      			rm /home/phablet/.config/systemd/user/default.target.wants/rec-remove.timer ;
      			rm /home/phablet/.local/share/systemd/timers/stamp-rec-remove.timer ;
      
      			# delete scripts and remove directories
      			rm -rf /home/phablet/.callrec/* ; rmdir /home/phablet/.callrec ;
      			rm -rf /home/phablet/.cr_Ram/* ;
      
      			echo -e '\n Uninstalled, reboot your device !\n'
      
      			exit 0
      
      			fi
      
      		;;
      
              "Quit")
      			exit 0
      		;;
      			*) echo "invalid option $REPLY"
      		;;
          esac
      done
      

      preview of callrecorder service :

      [Unit]
      Description=Call Recorder
      
      [Service]
      Type=simple
      ExecStart=/home/phablet/.callrec/prepare-sh
      RemainAfterExit=yes
      
      [Install]
      WantedBy=multi-user.target
      

      systemd user timer requires 2 files, rec-remove.timer :

      [Unit]
      Description=Run every day at 11:00
      
      [Timer]
      OnCalendar=*-*-* 11:00
      Persistent=true
      
      [Install]
      WantedBy=default.target
      

      and rec-remove.service :

      [Unit]
      Description=Remove older calls
      
      [Service]
      Type=simple
      ExecStart=/home/phablet/.callrec/rec-remove-sh
      
      [Install]
      WantedBy=default.target
      

      to run daily the script rec-remove-sh :

      #!/bin/bash
      #
      days=+30
      # delete recordings (except saved directory) older than ... days
      find /home/phablet/MyRec -type f -not -path '*/saved/*' -mtime $days -exec rm {} \; 2> /dev/null ;
      

      . small change, now you can save recorded calls in "saved" folder and will not be deleted

      . small differences in other scripts (new paths)

      . as for previous versions callrecorder must be uninstalled before proceeding to ota update.

      ^

      • Google Pixel 3a XL
      • Xiaomi MI A2
      A D 2 Replies Last reply 30 Aug 2023, 21:27 Reply Quote 1
      • A Offline
        ATTESA @Br1
        last edited by 30 Aug 2023, 21:27

        @Br1 I don't know if it is just me, but the download link does not seem to work, I get a Not Found error.

        B 1 Reply Last reply 30 Aug 2023, 22:12 Reply Quote 0
        • B Offline
          Br1 @ATTESA
          last edited by 30 Aug 2023, 22:12

          @ATTESA try direct link : www.spacelinux.it/UTouch/callrecorder-ota.2.tar.gz

          ^

          • Google Pixel 3a XL
          • Xiaomi MI A2
          1 Reply Last reply Reply Quote 0
          • D Offline
            dosolly @Br1
            last edited by 31 Aug 2023, 07:22

            @Br1 Hallo, thanx a lot for your work, but :
            :~/sudo Downloads/callrecorder-ota.2/callrec-install

            :~/sudo: callrec-install:command not found

            B 1 Reply Last reply 31 Aug 2023, 09:06 Reply Quote 0
            • B Offline
              Br1 @dosolly
              last edited by 31 Aug 2023, 09:06

              @dosolly
              On a hunch I did it again and works ... you have extracted it ?

              in Downloads directory there should be "callrecorder-ota.2" subdirectory that also contains "callrec-install"

              ^

              • Google Pixel 3a XL
              • Xiaomi MI A2
              D 2 Replies Last reply 31 Aug 2023, 14:31 Reply Quote 0
              • D Offline
                dosolly @Br1
                last edited by 31 Aug 2023, 14:31

                @Br1 Thanks for your help, at least the installation worked. Now I have to test it extensively.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dosolly @Br1
                  last edited by 5 Sept 2023, 05:43

                  @Br1 OK, thx a lot, works now like a charm.

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    domubpkm
                    last edited by 13 Nov 2023, 20:50

                    @Br1 Hello. Is your OTA-2 work / procedure the same for OTA-3 ? πŸ™‚ Thanks again

                    B 1 Reply Last reply 14 Nov 2023, 09:01 Reply Quote 0
                    • B Offline
                      Br1 @domubpkm
                      last edited by 14 Nov 2023, 09:01

                      @domubpkm no ota 3 update for my device, i cannot test it 😞
                      yesterday I ordered a google pixel 3a xl ... it will take some time.

                      ^

                      • Google Pixel 3a XL
                      • Xiaomi MI A2
                      D 1 Reply Last reply 14 Nov 2023, 09:07 Reply Quote 1
                      • D Offline
                        domubpkm @Br1
                        last edited by 14 Nov 2023, 09:07

                        @Br1 said in [How-To] Record Calls:

                        no ota 3 update for my device, i cannot test it
                        yesterday I ordered a google pixel 3a xl ... it will take some time.

                        Don't really understand. πŸ™‚ Your current phone is broken / out or the OTA-3 update will come later even if you ordered a new phone ?

                        B 1 Reply Last reply 14 Nov 2023, 10:33 Reply Quote 0
                        • B Offline
                          Br1 @domubpkm
                          last edited by 14 Nov 2023, 10:33

                          @domubpkm from what I understand ota 3 update will be available only for currently supported devices
                          Xiaomi MI A2 isn't there, it doesn't have a maintainer 😞

                          ^

                          • Google Pixel 3a XL
                          • Xiaomi MI A2
                          D 2 Replies Last reply 14 Nov 2023, 11:35 Reply Quote 0
                          • D Offline
                            domubpkm @Br1
                            last edited by 14 Nov 2023, 11:35

                            @Br1 Okay, and unfortunately for you. I didn't understand why you got OTA-2 and not OTA-3. I will wait for a future feedback about the DNS change on OTA-3, because your procedure has become essential to me, more than VPN on UT ultimately.

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              domubpkm @Br1
                              last edited by 14 Nov 2023, 11:35

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                Br1
                                last edited by 15 Nov 2023, 13:07

                                OTA 3 Stable channel --- You can reinstall, no changes are necessary.

                                ^

                                • Google Pixel 3a XL
                                • Xiaomi MI A2
                                D 1 Reply Last reply 21 Nov 2023, 09:53 Reply Quote 0
                                • D Offline
                                  domubpkm @Br1
                                  last edited by 21 Nov 2023, 09:53

                                  @Br1 Doesn't work for me on Volla. MyRec is empty after a call.

                                  B 1 Reply Last reply 22 Nov 2023, 08:14 Reply Quote 0
                                  • B Offline
                                    Br1 @domubpkm
                                    last edited by 22 Nov 2023, 08:14

                                    @domubpkm it's the same with my pixel 3a xl (fresh install) and I'm tryin' to understand why.
                                    There are other things that don’t work ... you have made a fresh install or update from xenial ?

                                    ^

                                    • Google Pixel 3a XL
                                    • Xiaomi MI A2
                                    D 1 Reply Last reply 22 Nov 2023, 08:32 Reply Quote 1
                                    • D Offline
                                      domubpkm @Br1
                                      last edited by domubpkm 22 Nov 2023, 08:32

                                      @Br1 A full first focal fresh install with the installer (with wipe data). For DNS, it's work well.

                                      The focal call recorder would already have been useful to me. πŸ™‚

                                      B 1 Reply Last reply 23 Nov 2023, 08:43 Reply Quote 0
                                      • B Offline
                                        Br1 @domubpkm
                                        last edited by 23 Nov 2023, 08:43

                                        @domubpkm new version ota 3 here fresh install involves to reset some permissions and to create few directories ... however I can't guarantee it will work with all devices.

                                        ^

                                        • Google Pixel 3a XL
                                        • Xiaomi MI A2
                                        D 1 Reply Last reply 23 Nov 2023, 08:51 Reply Quote 1
                                        • D Offline
                                          domubpkm @Br1
                                          last edited by 23 Nov 2023, 08:51

                                          @Br1 Will try on my Volla. thanks very much. What do you mean by your comment ? Is it the same procedure ? Nothing dangerous to install or new things to do before installing ?

                                          B 1 Reply Last reply 23 Nov 2023, 10:17 Reply Quote 0
                                          • B Offline
                                            Br1 @domubpkm
                                            last edited by 23 Nov 2023, 10:17

                                            @domubpkm said in [How-To] Record Calls:

                                            Is it the same procedure ?

                                            Yes

                                            What do you mean by your comment ?

                                            the install script changes I had to make

                                            ^

                                            • Google Pixel 3a XL
                                            • Xiaomi MI A2
                                            D 1 Reply Last reply 23 Nov 2023, 10:42 Reply Quote 1
                                            • First post
                                              Last post