# Installing AmtImporter

**URL:** <https://discourse.datatex.co.za/t/installing-amtimporter/245>\
**Category:** Voice recording ( Amethyst and iReCall )\
**Tags:** irecall, linux, amethyst\
**Created:** [February 3, 2023, 12:48pm UTC](https://discourse.datatex.co.za/t/installing-amtimporter/245 "2023-02-03T12:48:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonvanHeerden](https://discourse.datatex.co.za/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@LeonvanHeerden](https://discourse.datatex.co.za/u/LeonvanHeerden)\
**Post date:** [February 3, 2023, 12:48pm UTC](https://discourse.datatex.co.za/t/installing-amtimporter/245/1 "2023-02-03T12:48:23Z")

</div>

**Amtimporter**  
_This service will accept the uploads from other datatex software._

- IRCExporter
- [VoipSweeper Upload via HTTPS](https://discourse.datatex.co.za/t/configuring-voipsweeper-to-use-amtimporter/450)
- Teams recorder
- AmtClient

**Installation**  
Run the install script in /root/MyUpdates/amtimpoter folder and then run it again to upgrade.  
The first run should extract all the required files and the second run of the install.sh files should just upgrade the service, if it is not already on the latest version.

```auto
mkdir -p /root/MyUpdates/amtimporter
cd /root/MyUpdates/
./getupdates.sh
cd amtimporter
bash ./install.sh
bash ./install.sh

```

**Configuration**

- Check that the default ports for SSL connection and HTTP connection is set to 5334 and 5081.

`vi /opt/datatex/amtimporter/amtimporter.ini`

Some older sites used `SSLPORT=5334` but the default should be 27443

```auto
[WEBSERVER]
SSLPORT=27443
HTTPPORT=5081

```

**AmtClient** will connect to port 27443 to upload screenshots and notes.

- Make sure this value is not set:

`CERTIFICATECAFILE=`

External Connections  
If you are using the IRCExporter, you will have to perform the following step.

- Connect to the DB and Set the AI\_STATUS = 1 for the GUID of the correct IRCExporter.

**AutoStart**  
Add the startup commands to the auto start script

`vi /opt/datatex/bin/check_running_apps.local`

This is the section to add.

```auto
#
#AmtImporter
APP=amtimporter
APPLOC=/opt/datatex/amtimporter/
APPSTART=$APPLOC/startamtimporter
CheckAndStart $APP $APPLOC $APPSTART

```

**Output Location**  
In the INI file you can see the location where the received files will be saved.

```auto
[OUTPUT]
OUTPUTPATH=/opt/datatex/amtimporter/output/

```

If you are using this with the Amt Remote server and require the received files to be uploaded to iReCall the location shoul dbe pointing to

`OUTPUTPATH=/opt/datatex/ircexporter/uploads/`

**Test that the connection is working**  
Run the testconnection.sh script int he amtimporter folder and you should get a message like this:

```auto
<!doctype html><html><head><title>Please wait</title><meta http-equiv="refresh" content="1;URL=https://127.0.0.1/"></head><body><script type="text/javascript">setTimeout(function() { window.location.href = "https://127.0.0.1/"; }, 2000);</script><a href="https://127.0.0.1/">Please click here if your browser does not redirect you within a few seconds</a></body></html>

Command to run: [curl https://127.0.0.1:5334 -k]

```

# Updates

**Version 1.0.5.0**

- This version no longer uses the Firebird DB.
- INI files now control the allowed devices

## Enabling devices on AmtImporter for upload

`/opt/datatex/amtimporter/users.ini`

```auto
[STATUS]
1=DEVICE_STATUS_OKAY - allowed to upload (default for first ircexporter, default for amtclients)
2=DEVICE_STATUS_PERMANENTLY_BLOCKED - will never be allowed to upload
3=DEVICE_STATUS_TEMPORARILY_BLOCKED - no uploads for now (default for new ircexporter, except for first one)

```

1. The GUID will indicate the software that connected.
2. The `=1` means that the client software is allowed to connect with this status: `DEVICE_STATUS_OKAY`
3. If you want to disable a client set the value to one of the other STATUS values.

```auto
[USERS]
C4FD23F5-511A-EE11-9E4F-001636773BF0=1|2023-07-04 12:10:08|DATATEX|DATATEX||ircexporter|

```

### testconnection.sh

```bash
#!/bin/bash
PORT=`grep SSLPORT /opt/datatex/amtimporter/amtimporter.ini | cut -d "=" -f2`

IP=127.0.0.1
if [-z $PORT]; then
  echo "No SSLPORT in the INI file"
  exit 0
else
  curl https://$IP:$PORT -k
fi

echo "Command to run: [curl https://$IP:$PORT -k]"

```

---

<div class="post-metadata">

**Author:** ![TshepoRamokgadi](https://discourse.datatex.co.za/letter_avatar_proxy/v4/letter/t/977dab/32.png) [@TshepoRamokgadi](https://discourse.datatex.co.za/u/TshepoRamokgadi)\
**Post date:** [January 22, 2025, 1:41pm UTC](https://discourse.datatex.co.za/t/installing-amtimporter/245/2 "2025-01-22T13:41:38Z")

</div>

After the configuration remove FTP

apt-get remove pure-ftp

---

<div class="post-metadata">

**Author:** ![TshepoRamokgadi](https://discourse.datatex.co.za/letter_avatar_proxy/v4/letter/t/977dab/32.png) [@TshepoRamokgadi](https://discourse.datatex.co.za/u/TshepoRamokgadi)\
**Post date:** [January 23, 2025, 9:52am UTC](https://discourse.datatex.co.za/t/installing-amtimporter/245/3 "2025-01-23T09:52:12Z")

</div>

Change Amtsorter.ini  
Incoming=/opt/datatex/amtimporter/output/

---

<div class="post-metadata">

**Author:** ![LeeHendricks](https://discourse.datatex.co.za/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@LeeHendricks](https://discourse.datatex.co.za/u/LeeHendricks)\
**Post date:** [February 4, 2025, 7:17am UTC](https://discourse.datatex.co.za/t/installing-amtimporter/245/4 "2025-02-04T07:17:12Z")

</div>

In the case where you still have certain recording of files that still need to go through via the amtsorter/incoming folder , you can use the following commands to create a symbolic link:

```auto
cd /opt/datatex/amtimporter/
mv output output-live
ln -s /opt/datatex/amtsorter/incoming /opt/datatex/amtimporter/output

```

This will create a shortcut to the amtsorter incoming location to process files via the amtimporter.
