Skip to content

anilkumarbp/ringcentral-demos-data-archival

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ringcentral-demos-data-archival

A Sample PHP command line application to : Download Call Logs , Call Recordings, Messages etc

Please Keep in mind that this is not a Production ready Application but just a sample demo

Requirements

  • PHP 5.3.29+
  • Composer
  • CURL Extension

Configuration Requirements

  • Adding ReadCallRecording permission
    ** please contact devsupport@ringcentral.com with the name of your RingCentral Application to add the Advanced Permission
  • Select the application type = Server Only ( NO UI ) and scope = Private
    ** This is a mandatory application type for this demo

Installation

demo

Clone the Repository ( Recommended )

1.Clone the Repository

$ git clone https://github.com/anilkumarbp/ringcentral-demos-data-archival.git

2.cd into ringcentral-demos-data-archival. Run the Composer command to install the packages
Install composer (If you do not have Composer installed yet):

$ curl -sS https://getcomposer.org/installer | php

3.Install the packages using composer

$ composer install

4.Create a .env file within the same folder and the contents as shown below and configure your RingCentral Account details:

For ex:
To run callRecording.php script make RC_SkipDownload= False
To skip callRecording.php script make RC_SkipDownload= True

RC_AppKey= 							
RC_AppSecret= 
RC_Server= 
RC_Username= 
RC_Extension= 
RC_Password= 
RC_fromPhoneNumber= 
RC_toPhoneNumber= 
RC_dateFrom= 
RC_dateTo= 
RC_callRecordingsCount= 
amazonAccessKey= 
amazonSecretKey= 
dropBoxkey= 
dropBoxsecret= 
RC_SkipCallLog=           
RC_SkipRingOut=         
RC_SkipDownload=     
RC_SkipDownloadS3= 
RC_SkipDownloadDropbox=  

5.Run the script:

$ php index.php

Basic Usage

Retrieve Call-Logs

require(__DIR__ . '/demo/callLog.php');

Aim : To pull down call-logs in cycles of one business day ( 24 hours ) and save them as .json file Pre-requisite : Before you initiate the call_log.php make sure to pass the "RC_dateFrom" filter in the .env file ( /.env ) Note : The call-log is designed to fetch 100 records per page.

Save the call-recordings to Local File System

require(__DIR__ . '/demo/callRecording.php');

Aim : Save the call-recordings to your local file system using file stream writer. Creates a directory called "Recordings" and the recordings are stored as .mp3 / .wav format. Pre-requisite : Before you initiate the callRecording.php make sure to pass the "RC_dateFrom" filter in the .env file ( /.env )

Save the call-recordings to Amazon S3 Bucket

require(__DIR__ . '/demo/callRecording_AmazonS3.php');

Aim : Save the call-recordings to your Amazon S3 Buckets using amazon stream writer. Creates a directory called "Recordings" and the recordings are stored as .mp3 / .wav format. Pre-requisite : Before you initiate the callRecording.php make sure to pass the "RC_dateFrom" filter in the .env file ( /.env )

{
	"amazonAccessKey": "", 			// Amazon app key       
	"amazonSecretKey": ""			// Amazon app secret
}

Save the call-recordings to DropBox

require(__DIR__ . '/demo/callRecording_Dropbox.php');

Aim : Save the call-recordings to your Dropbox Application. Creates a directory called "Recordings" and the recordings are stored as .mp3 / .wav format. Pre-requisite : Before you initiate the callRecording_Dropbox.php make sure to pass the "dropBoxkey" and "dropBoxsecret" within the .env file ( /.env )

{
	"dropBoxkey": "", 			// Dropbox app key       
	"dropBoxsecret": ""			// Dropbox app secret
}

Please take a look in demo folder to see all the demo scripts.

Links

Project Repo

RingCentral SDK for PHP

RingCentral API Docs

RingCentral API Explorer

Contributions

Any reports of problems, comments or suggestions are most welcome.

Please report these on ringcentral-demos-data-archival's Issue Tracker in Github.

License

RingCentral SDK is available under an MIT-style license. See LICENSE.txt for details.

RingCentral SDK © 2016 by RingCentral

FAQ

About

Sample demos on how to leverage data archival with RingCentral REST API. https://developers.ringcentral.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages