class PureCloud::TelephonyApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Fetch SIP metadata Fetch SIP metadata that matches a given parameter. If exactMatch is passed as a parameter only sip records that have exactly that value will be returned. For example, some records contain conversationId but not all relevant records for that call may contain the conversationId so only a partial view of the call will be reflected @param date_start Start date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ @param date_end End date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ @param [Hash] opts the optional parameters @option opts [String] :call_id unique identification of the placed call @option opts [String] :to_user User
to who the call was placed @option opts [String] :from_user user who placed the call @option opts [String] :conversation_id Unique identification of the conversation @return [SipSearchResult]
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 37 def get_telephony_siptraces(date_start, date_end, opts = {}) data, _status_code, _headers = get_telephony_siptraces_with_http_info(date_start, date_end, opts) return data end
Get signed S3 URL for a pcap download
@param download_id unique id for the downloaded file in S3 @param [Hash] opts the optional parameters @return [SignedUrlResponse]
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 145 def get_telephony_siptraces_download_download_id(download_id, opts = {}) data, _status_code, _headers = get_telephony_siptraces_download_download_id_with_http_info(download_id, opts) return data end
Get signed S3 URL for a pcap download
@param download_id unique id for the downloaded file in S3 @param [Hash] opts the optional parameters @return [Array<(SignedUrlResponse
, Fixnum, Hash)>] SignedUrlResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 155 def get_telephony_siptraces_download_download_id_with_http_info(download_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.get_telephony_siptraces_download_download_id ..." end # verify the required parameter 'download_id' is set fail ArgumentError, "Missing the required parameter 'download_id' when calling TelephonyApi.get_telephony_siptraces_download_download_id" if download_id.nil? # resource path local_var_path = "/api/v2/telephony/siptraces/download/{downloadId}".sub('{format}','json').sub('{' + 'downloadId' + '}', download_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SignedUrlResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#get_telephony_siptraces_download_download_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Fetch SIP metadata Fetch SIP metadata that matches a given parameter. If exactMatch is passed as a parameter only sip records that have exactly that value will be returned. For example, some records contain conversationId but not all relevant records for that call may contain the conversationId so only a partial view of the call will be reflected @param date_start Start date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ @param date_end End date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ @param [Hash] opts the optional parameters @option opts [String] :call_id unique identification of the placed call @option opts [String] :to_user User
to who the call was placed @option opts [String] :from_user user who placed the call @option opts [String] :conversation_id Unique identification of the conversation @return [Array<(SipSearchResult
, Fixnum, Hash)>] SipSearchResult
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 52 def get_telephony_siptraces_with_http_info(date_start, date_end, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.get_telephony_siptraces ..." end # verify the required parameter 'date_start' is set fail ArgumentError, "Missing the required parameter 'date_start' when calling TelephonyApi.get_telephony_siptraces" if date_start.nil? # verify the required parameter 'date_end' is set fail ArgumentError, "Missing the required parameter 'date_end' when calling TelephonyApi.get_telephony_siptraces" if date_end.nil? # resource path local_var_path = "/api/v2/telephony/siptraces".sub('{format}','json') # query parameters query_params = {} query_params[:'dateStart'] = date_start query_params[:'dateEnd'] = date_end query_params[:'callId'] = opts[:'call_id'] if opts[:'call_id'] query_params[:'toUser'] = opts[:'to_user'] if opts[:'to_user'] query_params[:'fromUser'] = opts[:'from_user'] if opts[:'from_user'] query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SipSearchResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#get_telephony_siptraces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Request a download of a pcap file to S3
@param sip_search_public_request @param [Hash] opts the optional parameters @return [SipDownloadResponse]
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 210 def post_telephony_siptraces_download(sip_search_public_request, opts = {}) data, _status_code, _headers = post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts) return data end
Request a download of a pcap file to S3
@param sip_search_public_request @param [Hash] opts the optional parameters @return [Array<(SipDownloadResponse
, Fixnum, Hash)>] SipDownloadResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/telephony_api.rb, line 220 def post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.post_telephony_siptraces_download ..." end # verify the required parameter 'sip_search_public_request' is set fail ArgumentError, "Missing the required parameter 'sip_search_public_request' when calling TelephonyApi.post_telephony_siptraces_download" if sip_search_public_request.nil? # resource path local_var_path = "/api/v2/telephony/siptraces/download".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(sip_search_public_request) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SipDownloadResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#post_telephony_siptraces_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end