public async Task <RingCentral.UserCallLogRecord> GetCallLogs() { try { RestClient client = await GetClient(); var parameters = new ReadUserCallLogParameters(); parameters.view = "Detailed"; var resp = await client.Restapi().Account().Extension().CallLog().List(parameters); foreach (RingCentral.UserCallLogRecord record in resp.records) { Console.WriteLine("Call type: " + record.type); } var resp2 = await client.Restapi().Account().Extension().MessageStore().List(); //var resp3 = await client.Restapi().Account().Presence(); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(null); }
static private async Task read_user_calllog() { var parameters = new ReadUserCallLogParameters(); parameters.view = "Detailed"; var resp = await restClient.Restapi().Account().Extension().CallLog().List(parameters); foreach (CallLogRecord record in resp.records) { Console.WriteLine("Call type: " + record.type); } }
static private async Task read_user_calllog() { RestClient rc = new RestClient("client_id", "client_secret", false); await rc.Authorize("username", "extension_number", "password"); var parameters = new ReadUserCallLogParameters(); parameters.view = "Detailed"; var resp = await rc.Restapi().Account().Extension().CallLog().List(parameters); foreach (CallLogRecord record in resp.records) { Console.WriteLine("Call type: " + record.type); } }
public static async Task authorize2(string username, string extension, string password) { string clientId = "1Fc-YQzESNuDNEEQv289YQ"; string clientSecret = "16y8qLwNSaW9JLphyJkGqQKe37-YGUSDCJ4jdjZolFMg"; RestClient rc = new RestClient(clientId, clientSecret, false); await rc.Authorize(username, extension, password); int daysBack = -7; var fromDate = DateTime.UtcNow.AddDays(daysBack).ToString("yyyy-MM-ddTHH:mm:ssZ"); Console.WriteLine("date: " + fromDate); ReadUserCallLogParameters logParameters = new ReadUserCallLogParameters { extensionNumber = Program.clientExtension, showBlocked = true, phoneNumber = Program.clientUsername, direction = new[] { "Inbound", "Outbound" }, //sessionId = "<ENTER VALUE>", //type = new[] { "Voice", "Fax" }, //transport = new[] { "PSTN", "VoIP" }, //view = 'Simple', //withRecording = true, //recordingType = 'Automatic', //dateTo = "<ENTER VALUE>", dateFrom = fromDate, page = 1, perPage = 100, showDeleted = true }; Console.WriteLine("created log parameters"); var r = await rc.Restapi().Account("~").Extension("~").CallLog().List(logParameters); //process response Console.WriteLine("log:"); for (int i = 0; i < r.records.Length; i++) { Console.WriteLine(r.records[i]); } }
static private async Task read_user_calllog() { RestClient rc = new RestClient("UJnZe75_RPieDcx9PPL3sQ", "JVoBgGEETSSHJvFQ3l7MLA4LCkpdmcTKeuccWkSgqLDA", false); await rc.Authorize("+19802691329", "101", "deadpool@1"); var parameters = new ReadUserCallLogParameters(); parameters.view = "Detailed"; var resp = await rc.Restapi().Account().Extension().CallLog().List(parameters); foreach (var record in resp.records) { Console.WriteLine("Call type: " + record.type); Console.WriteLine("Call type: " + record.to); Console.WriteLine("Call type: " + record.from); Console.WriteLine("Call type: " + record.duration); } }
/// <summary> /// Operation: Get User Call Log Records /// HTTP Method: GET /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/call-log /// Rate Limit Group: Heavy /// App Permission: ReadCallLog /// User Permission: ReadCallLog /// </summary> public async Task <RingCentral.UserCallLogResponse> List(ReadUserCallLogParameters queryParams = null, CancellationToken?cancellationToken = null) { return(await rc.Get <RingCentral.UserCallLogResponse>(this.Path(false), queryParams, cancellationToken)); }
/// <summary> /// Returns call log records filtered by parameters specified. /// HTTP Method: get /// Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/call-log /// Rate Limit Group: Heavy /// App Permission: ReadCallLog /// User Permission: ReadCallLog /// </summary> public async Task <UserCallLogResponse> List(ReadUserCallLogParameters queryParams = null, RestRequestConfig restRequestConfig = null) { return(await rc.Get <UserCallLogResponse>(Path(false), queryParams, restRequestConfig)); }