Recording API version 2.7.14.x

Deprecated: The recording API has been replaced by the new Noojee API.

The recording API will no longer be supported post the release of 4.0

Noojee Recorder provides the ability to integrate directly with a CRM (Customer Relationship Management) system via the Noojee Recorder API.

With an integrated system users can start/stop and retrieve recordings directly from within the CRM. This is often used to attached a 'Voice Signature' recording directly to an order or customer account record in the CRM.

Noojee Recording API 

There are currently 3 methods implemented; Start, Stop and Retrieve.

These are exposed as a soap interface, but it is worth noting that the can be accessed via a normal http get. An example URL for using the http get technique will be given below for each method.

START

The start method takes the extension number or uniquecallid generated by asterisk to start recording.

By Extension

The start method takes 2 arguments: extenOrUniqueId and tag.

The extension is the telephone extension that is to be recorded and is resolved by stripping the tech and unique identifier from channel names. ie SIP/410-12FA7B becomes 410.

The tag is written to the call record in the database and appears as the "External Reference" field on a call record.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=start&extenOrUniqueId=410&tag=22

This method returns the standard HTTP status '200' on success otherwise an error message is returned.

By uniquecallid

This start method takes 2 arguments: extenOrUniqueId and tag.

The uniquecallid is the unique identifier that Asterisk assigns to each active call.

The tag is written to the call record in the database and appears as the "External Reference" field on a call record.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=start&extenOrUniqueId=12347811.214&tag=22

This method returns the standard HTTP status '200' on success otherwise an error message is returned.

STOP

The stop method takes the extension number or uniquecallid generated by asterisk to start recording.

By ExtensionRecording API

The stop method takes a single argument: extenOrUniqueId

The extension is the telephone extension and is resolved by stripping the tech and unique identifier from channel names. ie SIP/410-12FA7B becomes 410.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=stop&extenOrUniqueId=410

This method returns the standard HTTP status '200' on success otherwise an error message is returned.

By uniquecallidRecording API

The stop method takes a single argument: extenOrUniqueId

The uniquecallid is the unique identifier that Asterisk assigns to each active call.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=stop&extenOrUniqueId=12347811.214

This method returns the standard HTTP status '200' on success otherwise an error message is returned.

RETRIEVE and RETRIEVE by Uniqueid

The retrieve method takes 2 arguments: tag and username.

The tag is the tag that was passed when the recording was started.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=retrieve&tag=21&username=fred

The retrieveByUniqueId method takes 2 arguments: uniqueId and username.

URL: http://{somehost}/servicemanager/services/njadmin-api-recording?method=retrieveByUniqueId&uniqueId=123482532.123&username=fred

These methods returns a BASE64 encoded wav file.

Deleted, private and Recordings where the call is still in progress may not be retrieved through this method.

Decoding

There are several methods which can be used to decode the returned base 64 object into a wav file. The following provides references for a number of environments.

Linux command line

The following command worked to successfully decode a downloaded recording

base64 -d tmp.64 > tmp.wav

The required base64 decoder is available here http://www.fourmilab.ch/webtools/base64/

PHP

For php programmers you can use the base64_decode method to decode the resulting file:

http://php.net/manual/en/function.base64-decode.php

Java

For Java programmers you can use the Apache commons codec package:

http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64.html