Skip to main content

Uniphore Customer Portal

Bulk Audio Call Processing on X-Platform
  1. Install AWS CLI. Refer to Installing or updating the latest version of the AWS CLI.

  2. Download and run the AWS CLI 64-bit Windows installer from AWS CLI Microsoft Software Installer.

  3. Enter cmd in Windows search in the taskbar to open the Command Prompt.

  4. In the Command Prompt window enter the aws --version command. The Command Prompt displays an output similar to the one shown below:

    aws-cli/2.12.0 Python/3.11.3 Windows/10 exe/AMD64 prompt/off

    This confirms the installation of AWS CLI on your local machine.

  5. Upload the audio files in the S3 bucket. Use the shell script mentioned below to upload:

    audio=$4;
    category=$3;
    organization=$2;
    tenant=$1;
    
    bearer='l!5ZElx+DJy3#9</gZA_V9q5d2=hD9';
    s3repo='s3://u-analyze-s3-to-efs/audio-repo/new/'$tenant'/'$organization'/'$category;
    awsAccessKeyId='AKIAQHMDTJUHP3RI4LHV'
    awsSecretAccessKey='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';
    
    echo "----------------------------------------------------------------------"
    echo "                             Properties                               "
    echo "----------------------------------------------------------------------"
    
    
    echo "Audio Path : $audio"
    echo "Category : $category"
    echo "Organization : $organization"
    echo "Tenant : $tenant"
    
    # echo "Bearer : $bearer"
    echo "URL : $url"
    echo "S3 : $s3repo"
    # echo "AWS Access Key Id : $awsAccessKeyId"
    # echo "AWS Secret Access Key : $awsSecretAccessKey"
    echo "----------------------------------------------------------------------"
    echo "                             S3 API                                   "
    echo "----------------------------------------------------------------------"
    echo "uploading audio $callId"
    AWS_ACCESS_KEY_ID=$awsAccessKeyId AWS_SECRET_ACCESS_KEY=$awsSecretAccessKey aws s3 cp $audio $s3repo --recursive
    echo "uploaded audio $callId"
    echo "----------------------------------------------------------------------"
    echo "                          U Analyze API                               "
    echo "----------------------------------------------------------------------"
    echo "posting meta $callId"
    
    
    # eg : sh upload_files_in_S3.sh "tenant-uanz-func-uanalyze" "testAnalyze" "candidature_feedback_stereo" "D:\Latest_Uniphore_Folder_Jan_2023\xplatform\usercreation\audiofiles"
    
    1. Copy the shell script into a folder of your choice.

      For example:

      D:\Latest_Uniphore_Folder_Jan_2023\xplatform\usercreation\audiofiles
    2. Right-click on the folder and click git bash.

    3. Enter the cd command to change the directory to the one that contains the shell script file.

    4. Run the command in the format that follows to upload the shell script file:

      sh upload_files_in_S3.sh "tenant_name" "org_name" "category_name" "path of audio files

      For an example refer to the below command:

      - sh upload_files_in_S3.sh "tenant-uanz-func-uanalyze" "testAnalyze" "candidature_feedback_stereo
  6. Update the call processing info in a CSV file.

    Caution

    Do not change the column names in the CSV file.

  7. Update the column values that follow based on the number of calls you want to upload:

    • data.callId - The unique call id of a call

    • data.agentCRM - The agent id which is present in the system

    • data.customerCRM - The customer id

    • data.journeyId - The unique journey id of a call

    • data.callRecordingDate - Provides the date based upon what is set in file collection like 12-03-2023-10-10-10 or 12-03-2023

    • data.audioFilePath - The path of the audio file that is uploaded. For example, /tenant_name/org_name/category_name/filename.wav

    • metadata.tenantName - The tenant name

    • metadata.orgName - The organization name

    • metadata.catName - The category name.

  8. Save the CSV file in a location of your choice.

  9. Update the voice.api.url , the authorization bearer token and the log path in the application properties file in the format given below:

    https://<contact api hostname>/cga/contacts/voice

    For example:

    https://api-uni-load.us.cloud.uniphoredev.com/cga/contacts/voice

    A sample of the application properties file is shown below.

    voice.api.url=https://api-uni-load.us.cloud.uniphoredev.com/cga/contacts/voice
    server.port=8090
    voice.api.authorizationToken=Bearer l!5ZElx+DJy3#9</gZA_V9q5d2=hD9
    defaultNoOfCallsPerRequest=100
    voice.api.columns=CALL ID,STATUS CODE,MESSAGE,REQUEST
    log.path=D:\xplatform\bulkcall
  10. Run the client JAR.

    Important

    You must keep the JAR running to submit the bulk calls.

  11. Place the client JAR file in a location of your choice.

  12. Open the git bash terminal and change directory, using cd command, to the client JAR file location.

  13. Run the command that follows:

    java -jar client-module-0.0.1-SNAPSHOT.jar --spring.config.location=application.properties
  14. Import the bulk call processing collection JSON file to postman. A sample of the file is shown below for reference:

    {
    	"info": {
    		"_postman_id": "efb78dfd-3e7e-43d2-87e5-9423dfb7309f",
    		"name": "Bulk Call Processing",
    		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    	},
    	"item": [
    		{
    			"name": "Bulk Call Processing",
    			"protocolProfileBehavior": {
    				"disabledSystemHeaders": {
    					"content-type": true
    				}
    			},
    			"request": {
    				"auth": {
    					"type": "bearer",
    					"bearer": [
    						{
    							"key": "token",
    							"value": "l!5ZElx+DJy3#9</gZA_V9q5d2=hD9",
    							"type": "string"
    						}
    					]
    				},
    				"method": "POST",
    				"header": [
    					{
    						"key": "Content-Type",
    						"value": "application/json"
    					},
    					{
    						"key": "charset",
    						"value": "UTF-8",
    						"type": "default"
    					}
    				],
    				"body": {
    					"mode": "raw",
    					"raw": "{\n\"filePath\":\"D:/Latest_Uniphore_Folder_Jan_2023/xplatform/bulkcall/csvfiles/mono/english_100hrscalls_mono.csv\",\n\"noOfCalls\":\"10\"\n}"
    				},
    				"url": {
    					"raw": "http://localhost:8090/contacts/voice/bulk",
    					"protocol": "http",
    					"host": [
    						"localhost"
    					],
    					"port": "8090",
    					"path": [
    						"contacts",
    						"voice",
    						"bulk"
    					]
    				}
    			},
    			"response": []
    		}
    	]
    }
  15. Update the location of CSV file in the body. Refer step 8 for the saved location.

  16. Update the IP address of the machine where the client JAR is running in the URI. An example of IP address is shown below:

    http://localhost:8090/contacts/voice/bulk

    Note

    You need to update localhost address in the URI if the client JAR is running in your local machine.

  17. Click Send > Download.