How can I retrieve a RingCentral call recording from a monitored incoming call?Android Recording Incoming and Outgoing CallsAsterisk and recording incoming and outgoing callsHow to “Forward to Other's Phone” using the RingCentral API?How to List RingCentral Greetings?How can I access another extension's greeting using RingCentral?RingCentral incoming call notificationIncoming call notification for RingCentralTwilio Voice SDK - Record the Call (incoming and outgoing) in SwiftHow to make RingCentral sandbox calls with recording

How did the Super Star Destroyer Executor get destroyed exactly?

Why doesn't using multiple commands with a || or && conditional work?

Unlock My Phone! February 2018

What killed these X2 caps?

Is it acceptable for a professor to tell male students to not think that they are smarter than female students?

Would Slavery Reparations be considered Bills of Attainder and hence Illegal?

Should I tell management that I intend to leave due to bad software development practices?

Is it inappropriate for a student to attend their mentor's dissertation defense?

How dangerous is XSS?

Why didn't Miles's spider sense work before?

Ambiguity in the definition of entropy

Alternative to sending password over mail?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Should I cover my bicycle overnight while bikepacking?

Reverse dictionary where values are lists

How do I handle a potential work/personal life conflict as the manager of one of my friends?

Examples of smooth manifolds admitting inbetween one and a continuum of complex structures

Cursor Replacement for Newbies

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

Why was the shrinking from 8″ made only to 5.25″ and not smaller (4″ or less)?

Why do bosons tend to occupy the same state?

Avoiding direct proof while writing proof by induction

What does “the session was packed” mean in this context?

How do conventional missiles fly?



How can I retrieve a RingCentral call recording from a monitored incoming call?


Android Recording Incoming and Outgoing CallsAsterisk and recording incoming and outgoing callsHow to “Forward to Other's Phone” using the RingCentral API?How to List RingCentral Greetings?How can I access another extension's greeting using RingCentral?RingCentral incoming call notificationIncoming call notification for RingCentralTwilio Voice SDK - Record the Call (incoming and outgoing) in SwiftHow to make RingCentral sandbox calls with recording













0















I'm monitoring incoming calls on RingCentral by listening for the Call Session Notifications (CSN) telephony/sessions event filter:



/restapi/v1.0/account/~/extension/~/telephony/sessions


From this, I will receive events like the following. The recordings property will appear to indicate a recording is available. How can I retrieve this recording?




"uuid":"12345678901234567890",
"event":"/restapi/v1.0/account/11111111/extension/22222222/telephony/sessions",
"timestamp":"2019-03-08T22:30:40.059Z",
"subscriptionId":"11112222-3333-4444-5555-666677778888",
"ownerId":"33333333",
"body":
"sequence":7,
"sessionId":"1234567890",
"telephonySessionId":"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
"serverId":"10.13.22.20.TAM",
"eventTime":"2019-03-08T22:30:39.938Z",
"parties":[

"accountId":"11111111",
"extensionId":"22222222",
"id":"cs12345678901234567890-2",
"direction":"Inbound",
"to":
"phoneNumber":"+16505550100",
"name":"Jane Doe",
"extensionId":"22222222"
,
"from":
"phoneNumber":"+14155550100",
"name":"John Smith"
,
"recordings":[

"id":"44444444",
"active":false

],
"status":
"code":"Answered",
"rcc":false
,
"missedCall":false,
"standAlone":false,
"muted":false

],
"origin":
"type":"Call"












share|improve this question




























    0















    I'm monitoring incoming calls on RingCentral by listening for the Call Session Notifications (CSN) telephony/sessions event filter:



    /restapi/v1.0/account/~/extension/~/telephony/sessions


    From this, I will receive events like the following. The recordings property will appear to indicate a recording is available. How can I retrieve this recording?




    "uuid":"12345678901234567890",
    "event":"/restapi/v1.0/account/11111111/extension/22222222/telephony/sessions",
    "timestamp":"2019-03-08T22:30:40.059Z",
    "subscriptionId":"11112222-3333-4444-5555-666677778888",
    "ownerId":"33333333",
    "body":
    "sequence":7,
    "sessionId":"1234567890",
    "telephonySessionId":"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
    "serverId":"10.13.22.20.TAM",
    "eventTime":"2019-03-08T22:30:39.938Z",
    "parties":[

    "accountId":"11111111",
    "extensionId":"22222222",
    "id":"cs12345678901234567890-2",
    "direction":"Inbound",
    "to":
    "phoneNumber":"+16505550100",
    "name":"Jane Doe",
    "extensionId":"22222222"
    ,
    "from":
    "phoneNumber":"+14155550100",
    "name":"John Smith"
    ,
    "recordings":[

    "id":"44444444",
    "active":false

    ],
    "status":
    "code":"Answered",
    "rcc":false
    ,
    "missedCall":false,
    "standAlone":false,
    "muted":false

    ],
    "origin":
    "type":"Call"












    share|improve this question


























      0












      0








      0








      I'm monitoring incoming calls on RingCentral by listening for the Call Session Notifications (CSN) telephony/sessions event filter:



      /restapi/v1.0/account/~/extension/~/telephony/sessions


      From this, I will receive events like the following. The recordings property will appear to indicate a recording is available. How can I retrieve this recording?




      "uuid":"12345678901234567890",
      "event":"/restapi/v1.0/account/11111111/extension/22222222/telephony/sessions",
      "timestamp":"2019-03-08T22:30:40.059Z",
      "subscriptionId":"11112222-3333-4444-5555-666677778888",
      "ownerId":"33333333",
      "body":
      "sequence":7,
      "sessionId":"1234567890",
      "telephonySessionId":"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
      "serverId":"10.13.22.20.TAM",
      "eventTime":"2019-03-08T22:30:39.938Z",
      "parties":[

      "accountId":"11111111",
      "extensionId":"22222222",
      "id":"cs12345678901234567890-2",
      "direction":"Inbound",
      "to":
      "phoneNumber":"+16505550100",
      "name":"Jane Doe",
      "extensionId":"22222222"
      ,
      "from":
      "phoneNumber":"+14155550100",
      "name":"John Smith"
      ,
      "recordings":[

      "id":"44444444",
      "active":false

      ],
      "status":
      "code":"Answered",
      "rcc":false
      ,
      "missedCall":false,
      "standAlone":false,
      "muted":false

      ],
      "origin":
      "type":"Call"












      share|improve this question
















      I'm monitoring incoming calls on RingCentral by listening for the Call Session Notifications (CSN) telephony/sessions event filter:



      /restapi/v1.0/account/~/extension/~/telephony/sessions


      From this, I will receive events like the following. The recordings property will appear to indicate a recording is available. How can I retrieve this recording?




      "uuid":"12345678901234567890",
      "event":"/restapi/v1.0/account/11111111/extension/22222222/telephony/sessions",
      "timestamp":"2019-03-08T22:30:40.059Z",
      "subscriptionId":"11112222-3333-4444-5555-666677778888",
      "ownerId":"33333333",
      "body":
      "sequence":7,
      "sessionId":"1234567890",
      "telephonySessionId":"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
      "serverId":"10.13.22.20.TAM",
      "eventTime":"2019-03-08T22:30:39.938Z",
      "parties":[

      "accountId":"11111111",
      "extensionId":"22222222",
      "id":"cs12345678901234567890-2",
      "direction":"Inbound",
      "to":
      "phoneNumber":"+16505550100",
      "name":"Jane Doe",
      "extensionId":"22222222"
      ,
      "from":
      "phoneNumber":"+14155550100",
      "name":"John Smith"
      ,
      "recordings":[

      "id":"44444444",
      "active":false

      ],
      "status":
      "code":"Answered",
      "rcc":false
      ,
      "missedCall":false,
      "standAlone":false,
      "muted":false

      ],
      "origin":
      "type":"Call"









      voice telephony voice-recording ringcentral call-recording






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 23:23







      Grokify

















      asked Mar 8 at 22:40









      GrokifyGrokify

      7,54322439




      7,54322439






















          1 Answer
          1






          active

          oldest

          votes


















          0














          There are two ways to retrieve the recording using information in the event, specifically the recordings[0].id property and the sessionID property.



          1. directly calling the recording endpoint with the recordings[0].id property.

          2. indirectly by querying the call-log endpoint with the sessionId property


          Note: While the call is ongoing, the recording will not be available for retrieval, even when the recording id is present in the Call Session Notification event. The recording will be available to be retrieved shortly after the call concludes.




          1) Directly via Recording API



          You can call the Recording API endpoint and retrieve the media directly by manually constructing the recording URL as follows:



          https://media.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content


          In this example, the accountId is 11111111 and the recordingId is 44444444 for the following:



          https://media.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444/content


          This this approach can be quick, it may be error prone as RingCentral has changed the media hostname once in the past. While there are no anticipated, future changes, calling the call-log API and retrieving the full media URL from the response is the safer and recommended approach. See below for this approach.



          2) Indirectly via Call Log API



          Making an intermediate API call to the call-log API has the dual benefits of being the official approach for receiving a media URL an providing more metadata for the call. In this approach, the recording.id in the call-log record will match the recordings[0].id property in the Call Session Notification event.



          Both the company account and user extension call-log APIs can be called with the sessionId parameter from the event as shown:



          GET /restapi/v1.0/account/~/call-log?sessionId=sessionId
          GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=sessionId


          In this example, the sessionId is 1234567890 so you would have a Company Call Log API URL as follows



          GET /restapi/v1.0/account/~/call-log?sessionId=1234567890


          The response object will have a recording property that provides hypermedia links to get the media file. The file can be WAV or MP3 format which is communicated in the response Content-Type header.




          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100",
          "records": [

          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log/1234567890ABCDEFGabcdefgh?view=Simple",
          "id": "1234567890ABCDEFGabcdefgh",
          "sessionId": "1234567890",
          "startTime": "2019-03-08T22:30:29.505Z",
          "duration": 35,
          "type": "Voice",
          "direction": "Inbound",
          "action": "Phone Call",
          "result": "Accepted",
          "to":
          "phoneNumber": "+16505550100",
          "name": "Jane Doe"
          ,
          "from":
          "phoneNumber": "+14155550100",
          "name": "John Smith",
          "location": "San Francisco, CA"
          ,
          "recording":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444",
          "id": "44444444",
          "type": "OnDemand",
          "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/111111111/recording/44444444/content"
          ,
          "extension":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/111111111/extension/22222222",
          "id": 22222222
          ,
          "reason": "Accepted",
          "reasonDescription": "The call connected to and was accepted by this number."

          ],
          "paging":
          "page": 1,
          "perPage": 100,
          "pageStart": 0,
          "pageEnd": 0
          ,
          "navigation":
          "firstPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"
          ,
          "lastPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"








          share|improve this answer

























          • Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

            – Dibyendu Roy
            Mar 20 at 23:57











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071991%2fhow-can-i-retrieve-a-ringcentral-call-recording-from-a-monitored-incoming-call%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          There are two ways to retrieve the recording using information in the event, specifically the recordings[0].id property and the sessionID property.



          1. directly calling the recording endpoint with the recordings[0].id property.

          2. indirectly by querying the call-log endpoint with the sessionId property


          Note: While the call is ongoing, the recording will not be available for retrieval, even when the recording id is present in the Call Session Notification event. The recording will be available to be retrieved shortly after the call concludes.




          1) Directly via Recording API



          You can call the Recording API endpoint and retrieve the media directly by manually constructing the recording URL as follows:



          https://media.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content


          In this example, the accountId is 11111111 and the recordingId is 44444444 for the following:



          https://media.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444/content


          This this approach can be quick, it may be error prone as RingCentral has changed the media hostname once in the past. While there are no anticipated, future changes, calling the call-log API and retrieving the full media URL from the response is the safer and recommended approach. See below for this approach.



          2) Indirectly via Call Log API



          Making an intermediate API call to the call-log API has the dual benefits of being the official approach for receiving a media URL an providing more metadata for the call. In this approach, the recording.id in the call-log record will match the recordings[0].id property in the Call Session Notification event.



          Both the company account and user extension call-log APIs can be called with the sessionId parameter from the event as shown:



          GET /restapi/v1.0/account/~/call-log?sessionId=sessionId
          GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=sessionId


          In this example, the sessionId is 1234567890 so you would have a Company Call Log API URL as follows



          GET /restapi/v1.0/account/~/call-log?sessionId=1234567890


          The response object will have a recording property that provides hypermedia links to get the media file. The file can be WAV or MP3 format which is communicated in the response Content-Type header.




          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100",
          "records": [

          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log/1234567890ABCDEFGabcdefgh?view=Simple",
          "id": "1234567890ABCDEFGabcdefgh",
          "sessionId": "1234567890",
          "startTime": "2019-03-08T22:30:29.505Z",
          "duration": 35,
          "type": "Voice",
          "direction": "Inbound",
          "action": "Phone Call",
          "result": "Accepted",
          "to":
          "phoneNumber": "+16505550100",
          "name": "Jane Doe"
          ,
          "from":
          "phoneNumber": "+14155550100",
          "name": "John Smith",
          "location": "San Francisco, CA"
          ,
          "recording":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444",
          "id": "44444444",
          "type": "OnDemand",
          "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/111111111/recording/44444444/content"
          ,
          "extension":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/111111111/extension/22222222",
          "id": 22222222
          ,
          "reason": "Accepted",
          "reasonDescription": "The call connected to and was accepted by this number."

          ],
          "paging":
          "page": 1,
          "perPage": 100,
          "pageStart": 0,
          "pageEnd": 0
          ,
          "navigation":
          "firstPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"
          ,
          "lastPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"








          share|improve this answer

























          • Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

            – Dibyendu Roy
            Mar 20 at 23:57















          0














          There are two ways to retrieve the recording using information in the event, specifically the recordings[0].id property and the sessionID property.



          1. directly calling the recording endpoint with the recordings[0].id property.

          2. indirectly by querying the call-log endpoint with the sessionId property


          Note: While the call is ongoing, the recording will not be available for retrieval, even when the recording id is present in the Call Session Notification event. The recording will be available to be retrieved shortly after the call concludes.




          1) Directly via Recording API



          You can call the Recording API endpoint and retrieve the media directly by manually constructing the recording URL as follows:



          https://media.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content


          In this example, the accountId is 11111111 and the recordingId is 44444444 for the following:



          https://media.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444/content


          This this approach can be quick, it may be error prone as RingCentral has changed the media hostname once in the past. While there are no anticipated, future changes, calling the call-log API and retrieving the full media URL from the response is the safer and recommended approach. See below for this approach.



          2) Indirectly via Call Log API



          Making an intermediate API call to the call-log API has the dual benefits of being the official approach for receiving a media URL an providing more metadata for the call. In this approach, the recording.id in the call-log record will match the recordings[0].id property in the Call Session Notification event.



          Both the company account and user extension call-log APIs can be called with the sessionId parameter from the event as shown:



          GET /restapi/v1.0/account/~/call-log?sessionId=sessionId
          GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=sessionId


          In this example, the sessionId is 1234567890 so you would have a Company Call Log API URL as follows



          GET /restapi/v1.0/account/~/call-log?sessionId=1234567890


          The response object will have a recording property that provides hypermedia links to get the media file. The file can be WAV or MP3 format which is communicated in the response Content-Type header.




          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100",
          "records": [

          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log/1234567890ABCDEFGabcdefgh?view=Simple",
          "id": "1234567890ABCDEFGabcdefgh",
          "sessionId": "1234567890",
          "startTime": "2019-03-08T22:30:29.505Z",
          "duration": 35,
          "type": "Voice",
          "direction": "Inbound",
          "action": "Phone Call",
          "result": "Accepted",
          "to":
          "phoneNumber": "+16505550100",
          "name": "Jane Doe"
          ,
          "from":
          "phoneNumber": "+14155550100",
          "name": "John Smith",
          "location": "San Francisco, CA"
          ,
          "recording":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444",
          "id": "44444444",
          "type": "OnDemand",
          "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/111111111/recording/44444444/content"
          ,
          "extension":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/111111111/extension/22222222",
          "id": 22222222
          ,
          "reason": "Accepted",
          "reasonDescription": "The call connected to and was accepted by this number."

          ],
          "paging":
          "page": 1,
          "perPage": 100,
          "pageStart": 0,
          "pageEnd": 0
          ,
          "navigation":
          "firstPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"
          ,
          "lastPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"








          share|improve this answer

























          • Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

            – Dibyendu Roy
            Mar 20 at 23:57













          0












          0








          0







          There are two ways to retrieve the recording using information in the event, specifically the recordings[0].id property and the sessionID property.



          1. directly calling the recording endpoint with the recordings[0].id property.

          2. indirectly by querying the call-log endpoint with the sessionId property


          Note: While the call is ongoing, the recording will not be available for retrieval, even when the recording id is present in the Call Session Notification event. The recording will be available to be retrieved shortly after the call concludes.




          1) Directly via Recording API



          You can call the Recording API endpoint and retrieve the media directly by manually constructing the recording URL as follows:



          https://media.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content


          In this example, the accountId is 11111111 and the recordingId is 44444444 for the following:



          https://media.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444/content


          This this approach can be quick, it may be error prone as RingCentral has changed the media hostname once in the past. While there are no anticipated, future changes, calling the call-log API and retrieving the full media URL from the response is the safer and recommended approach. See below for this approach.



          2) Indirectly via Call Log API



          Making an intermediate API call to the call-log API has the dual benefits of being the official approach for receiving a media URL an providing more metadata for the call. In this approach, the recording.id in the call-log record will match the recordings[0].id property in the Call Session Notification event.



          Both the company account and user extension call-log APIs can be called with the sessionId parameter from the event as shown:



          GET /restapi/v1.0/account/~/call-log?sessionId=sessionId
          GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=sessionId


          In this example, the sessionId is 1234567890 so you would have a Company Call Log API URL as follows



          GET /restapi/v1.0/account/~/call-log?sessionId=1234567890


          The response object will have a recording property that provides hypermedia links to get the media file. The file can be WAV or MP3 format which is communicated in the response Content-Type header.




          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100",
          "records": [

          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log/1234567890ABCDEFGabcdefgh?view=Simple",
          "id": "1234567890ABCDEFGabcdefgh",
          "sessionId": "1234567890",
          "startTime": "2019-03-08T22:30:29.505Z",
          "duration": 35,
          "type": "Voice",
          "direction": "Inbound",
          "action": "Phone Call",
          "result": "Accepted",
          "to":
          "phoneNumber": "+16505550100",
          "name": "Jane Doe"
          ,
          "from":
          "phoneNumber": "+14155550100",
          "name": "John Smith",
          "location": "San Francisco, CA"
          ,
          "recording":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444",
          "id": "44444444",
          "type": "OnDemand",
          "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/111111111/recording/44444444/content"
          ,
          "extension":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/111111111/extension/22222222",
          "id": 22222222
          ,
          "reason": "Accepted",
          "reasonDescription": "The call connected to and was accepted by this number."

          ],
          "paging":
          "page": 1,
          "perPage": 100,
          "pageStart": 0,
          "pageEnd": 0
          ,
          "navigation":
          "firstPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"
          ,
          "lastPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"








          share|improve this answer















          There are two ways to retrieve the recording using information in the event, specifically the recordings[0].id property and the sessionID property.



          1. directly calling the recording endpoint with the recordings[0].id property.

          2. indirectly by querying the call-log endpoint with the sessionId property


          Note: While the call is ongoing, the recording will not be available for retrieval, even when the recording id is present in the Call Session Notification event. The recording will be available to be retrieved shortly after the call concludes.




          1) Directly via Recording API



          You can call the Recording API endpoint and retrieve the media directly by manually constructing the recording URL as follows:



          https://media.ringcentral.com/restapi/v1.0/account/accountId/recording/recordingId/content


          In this example, the accountId is 11111111 and the recordingId is 44444444 for the following:



          https://media.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444/content


          This this approach can be quick, it may be error prone as RingCentral has changed the media hostname once in the past. While there are no anticipated, future changes, calling the call-log API and retrieving the full media URL from the response is the safer and recommended approach. See below for this approach.



          2) Indirectly via Call Log API



          Making an intermediate API call to the call-log API has the dual benefits of being the official approach for receiving a media URL an providing more metadata for the call. In this approach, the recording.id in the call-log record will match the recordings[0].id property in the Call Session Notification event.



          Both the company account and user extension call-log APIs can be called with the sessionId parameter from the event as shown:



          GET /restapi/v1.0/account/~/call-log?sessionId=sessionId
          GET /restapi/v1.0/account/~/extension/~/call-log?sessionId=sessionId


          In this example, the sessionId is 1234567890 so you would have a Company Call Log API URL as follows



          GET /restapi/v1.0/account/~/call-log?sessionId=1234567890


          The response object will have a recording property that provides hypermedia links to get the media file. The file can be WAV or MP3 format which is communicated in the response Content-Type header.




          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100",
          "records": [

          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log/1234567890ABCDEFGabcdefgh?view=Simple",
          "id": "1234567890ABCDEFGabcdefgh",
          "sessionId": "1234567890",
          "startTime": "2019-03-08T22:30:29.505Z",
          "duration": 35,
          "type": "Voice",
          "direction": "Inbound",
          "action": "Phone Call",
          "result": "Accepted",
          "to":
          "phoneNumber": "+16505550100",
          "name": "Jane Doe"
          ,
          "from":
          "phoneNumber": "+14155550100",
          "name": "John Smith",
          "location": "San Francisco, CA"
          ,
          "recording":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/recording/44444444",
          "id": "44444444",
          "type": "OnDemand",
          "contentUri": "https://media.ringcentral.com/restapi/v1.0/account/111111111/recording/44444444/content"
          ,
          "extension":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/111111111/extension/22222222",
          "id": 22222222
          ,
          "reason": "Accepted",
          "reasonDescription": "The call connected to and was accepted by this number."

          ],
          "paging":
          "page": 1,
          "perPage": 100,
          "pageStart": 0,
          "pageEnd": 0
          ,
          "navigation":
          "firstPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"
          ,
          "lastPage":
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/call-log?view=Simple&sessionId=1234567890&page=1&perPage=100"









          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 19 at 18:05

























          answered Mar 8 at 23:08









          GrokifyGrokify

          7,54322439




          7,54322439












          • Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

            – Dibyendu Roy
            Mar 20 at 23:57

















          • Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

            – Dibyendu Roy
            Mar 20 at 23:57
















          Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

          – Dibyendu Roy
          Mar 20 at 23:57





          Also while the call is live and active, you would not be able to fetch the recording content from Endpoint. The Content will be available as soon as the Call ends.

          – Dibyendu Roy
          Mar 20 at 23:57



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071991%2fhow-can-i-retrieve-a-ringcentral-call-recording-from-a-monitored-incoming-call%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme