PortaOne Recording interface

This is the Datatex Porta One Download software.
Requirements

  • HTTPS Address for the PortaOne
  • Recording must be enabled for the tenants that you require to download.
  • API Key for the tenants that you want to download.

API Endpoints used:
These are the endpoints that the API requires READ access.

  • /rest/Account/get_account_list
  • /rest/Account/get_xdr_list
  • /rest/CDR/get_call_recording
  • /rest/Customer/get_customer_list
  • /rest/Customer/get_customer_xdrs
  • /rest/Session/login

Location
/opt/datatex/portaone/

Main INI File
dtxportaone.ini

[SETTINGS]
#Location where all the tenant files will be stored. 
TENANTPATH=/opt/datatex/portaone/tenant/
WORKPATH=/opt/datatex/portaone/work/

#Recording file prefix
SERVERID=SKY4_

NOTIFICATIONURL=https://notifications.datatex.co.za/webservice/error/

#Recorded Device Prefix. Leave blank if you do not want an extension prefix. 
PREFIX=SKYNET_
TIMEZONESECONDS=7200

#Print Verbose logs 
VERBOSE=1
#Download all the CDR data, not just the recorded devices. 
DOWNLOADALLCDR=1

[IRECALL]
TENANTID=SKYNET
SOFTWAREID=DTXPORTAONE
PABXID=

Tenant Setup
Create a tenant folder within the location specified in the Main INI TENANTPATH

E.g. /opt/datatex/portaone/tenant/my_client/

and then create a tenant.ini file like this
Run ./dtxportaone --verbose and if the file doesn’t exist, it will create it with blank values.

The port for the API can be different, depending on the API key that was generated.

[TENANT]
PABXIP=porta.myporta.co.za
ENABLED=1
PABXAPIPORT=8444
PABXLOGIN=My_Client_Login
#If there is a password filled into this field when he software runs, it will encrypt the value and remove the unencrypted value. 
PABXPASSWORD=

#If there is a password filled into this field when he software runs, it will encrypt the value and remove the unencrypted value. 
APIKEY=
#Do not download files shorter than this amount of seconds. 
MINIMUMDURATION=0
TENANTNAME=My_client_name
AUTORECORDDID=0
AUTORECORDIVR=0
#Download recordings for all devices. 
RECORDALL=1
#Download all the device's CDR
DOWNLOADALLCDR=1
ENCAPIKEY=DTX4x31lmh+acmR+M1+233+rcgbs61e2z4v5O6974q89M9efIbRtw8kCxJEE7eS0fR2QtLtk/ATn7KgX+x6pLarEw==
#The PortaOne Customer Number 
CUSTOMERNUMBER=5807
TENANTID_OVERRIDE=MYREFIX_MYCOMP
#If you require a prefix to make the extensions stand out from other clients on the same system, you can add an extension prefix. Leave blank and it will use the MAIN prefix. 
EXTENSIONPREFIX=EXTPREF_

Additional configuration to handle more nonstandard account setup:

Populating the Extension from the XDR data

  • Don’t use the session trace from the XDR to try and find the extension
  • Use the Beneficiary Account Id to trace the extension value.

Master Setting used as the default when adding new customers.
tenant.ini

[EXTENSION_SOURCE]
# 0 = Ignore the numbers assigned to the customer and only use the XDR values. 
# 1 [DEFAULT] = Use the Numbers configured on the customer as the EXTENSION

CUSTOMEREXTENSION=1
# 0 = Skips the additional session trace for the call to try and identify additional information to use as the EXTENSION.
# 1 [DEFAULT] = Perform an additional session trace for the call to try and identify additional information to use as the EXTENSION. 
# E.g. Replaces IVR number with the number that appears in the session trace. 
# Convert from DID/IVR numbers to the customer's external number, for internal calls on the same PABX. Don't show internal number, but the external numbers. 

SESSIONTRACE=1
# 0 = If one of the other methods has not found a usable EXTENION value, the call will be processed without using the Beneficiary Account ID. This may be causing the EXTENSION and NUMBER to be incorrect on recordings. 
# 1 = Use the Beneficiary Account ID as the extension. **RECOMMENED TO ALWAYS KEEP THIS ON**
BENEFICIARYACCOUNTID=1

Customer config
customer.ini

[EXTENSION_SOURCE]
# -1 = [DEFAULT] Use the MASTER Setting. 
# 0 = Ignore the numbers assigned to the customer and only use the XDR values. 
# 1  = Use the Numbers configured on the customer as the EXTENSION
CUSTOMEREXTENSION=-1

# -1 = [DEFAULT]  Use MASTER setting
# 0 = Skips the additional session trace for the call to try and identify additional information to use as the EXTENSION.
# 1 = Perform an additional session trace for the call to try and identify additional information to use as the EXTENSION. 
# E.g. Replaces IVR number with the number that appears in the session trace. 
# Convert from DID/IVR numbers to the customer's external number, for internal calls on the same PABX. Don't show internal number, but the external numbers. 
SESSIONTRACE=-1

# -1 = [DEFAULT]  Use MASTER setting
# 0 = If one of the other methods has not found a usable EXTENION value, the call will be processed without using the Beneficiary Account ID. This may be causing the EXTENSION and NUMBER to be incorrect on recordings. 
# 1 = Use the Beneficiary Account ID as the extension. **RECOMMENED TO ALWAYS KEEP THIS ON**
BENEFICIARYACCOUNTID=1

Example Configs:

  • Most configurations should work with this config:
[EXTENSION_SOURCE]
CUSTOMEREXTENSION=1
SESSIONTRACE=0
BENEFICIARYACCOUNTID=1
  • Where the Client and the Customer on the same PORTAONE is generating recordings showing the INTERNAL IVR number as the NUMBER on the recordings, as opposed to the EXTERNAL phone number that the clients are using.
[EXTENSION_SOURCE]
CUSTOMEREXTENSION=0
SESSIONTRACE=1
BENEFICIARYACCOUNTID=1

Error example

There is no recording to download.

Error downloading 16625683883: Error downloading recording: {"faultstring":"Invalid 'call_recording_id' value","faultcode":"Server.CDR.invalid_call_recording_id"}