How to find the callerStatus and calleeStatus for RingCentral calls?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















How do I get call status for past calls?



I want to get the callerStatus and calleeStatus status which I see in the RingOut Status API response but I'm not sure what to use for the ringOutId in the URL path:



https://developer.ringcentral.com/api-reference#RingOut-getRingOutCallStatus



Request



GET /restapi/v1.0/account/400162076008/extension/400162076009/ring-out/Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM



Response



HTTP 200 OK

{
"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/400162076008/extension/400162076009/ring-out/2",
"id" : "Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM",
"status" : {
"callStatus" : "Success",
"callerStatus" : "Success",
"calleeStatus" : "Success"
}
}


When making a RingOut Status call without a ringOutId, I was hoping to get a list of calls, but I get the following error instead:



Resource for parameter [ringOutId] is not found


What do I use for ringOutId? How can I get the callerStatus and calleeStatus for calls?










share|improve this question































    0















    How do I get call status for past calls?



    I want to get the callerStatus and calleeStatus status which I see in the RingOut Status API response but I'm not sure what to use for the ringOutId in the URL path:



    https://developer.ringcentral.com/api-reference#RingOut-getRingOutCallStatus



    Request



    GET /restapi/v1.0/account/400162076008/extension/400162076009/ring-out/Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM



    Response



    HTTP 200 OK

    {
    "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/400162076008/extension/400162076009/ring-out/2",
    "id" : "Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM",
    "status" : {
    "callStatus" : "Success",
    "callerStatus" : "Success",
    "calleeStatus" : "Success"
    }
    }


    When making a RingOut Status call without a ringOutId, I was hoping to get a list of calls, but I get the following error instead:



    Resource for parameter [ringOutId] is not found


    What do I use for ringOutId? How can I get the callerStatus and calleeStatus for calls?










    share|improve this question



























      0












      0








      0








      How do I get call status for past calls?



      I want to get the callerStatus and calleeStatus status which I see in the RingOut Status API response but I'm not sure what to use for the ringOutId in the URL path:



      https://developer.ringcentral.com/api-reference#RingOut-getRingOutCallStatus



      Request



      GET /restapi/v1.0/account/400162076008/extension/400162076009/ring-out/Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM



      Response



      HTTP 200 OK

      {
      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/400162076008/extension/400162076009/ring-out/2",
      "id" : "Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM",
      "status" : {
      "callStatus" : "Success",
      "callerStatus" : "Success",
      "calleeStatus" : "Success"
      }
      }


      When making a RingOut Status call without a ringOutId, I was hoping to get a list of calls, but I get the following error instead:



      Resource for parameter [ringOutId] is not found


      What do I use for ringOutId? How can I get the callerStatus and calleeStatus for calls?










      share|improve this question
















      How do I get call status for past calls?



      I want to get the callerStatus and calleeStatus status which I see in the RingOut Status API response but I'm not sure what to use for the ringOutId in the URL path:



      https://developer.ringcentral.com/api-reference#RingOut-getRingOutCallStatus



      Request



      GET /restapi/v1.0/account/400162076008/extension/400162076009/ring-out/Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM



      Response



      HTTP 200 OK

      {
      "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/400162076008/extension/400162076009/ring-out/2",
      "id" : "Y3MxNzE4NDkyODg0NDM5MDJAMTAuNjIuMjkuMzM",
      "status" : {
      "callStatus" : "Success",
      "callerStatus" : "Success",
      "calleeStatus" : "Success"
      }
      }


      When making a RingOut Status call without a ringOutId, I was hoping to get a list of calls, but I get the following error instead:



      Resource for parameter [ringOutId] is not found


      What do I use for ringOutId? How can I get the callerStatus and calleeStatus for calls?







      phone-call calllog ringcentral ringout






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 16:29







      Grokify

















      asked Nov 22 '18 at 8:36









      GrokifyGrokify

      7,55322440




      7,55322440
























          1 Answer
          1






          active

          oldest

          votes


















          0














          RingOut Active Call Status



          The RingOut Status API is only used when making phone calls via RingOut. The ringOutId is returned in the response for the Make RingOut API. It also only returns status while the call is in progress and a short time later, after which, it will return a 404.



          API Ref: https://developer.ringcentral.com/api-reference#RingOut-makeRingOutCall



          RingOut Historical Call Status



          To get call status for historical calls, use the Call Log API. By default, the service will return status for the overall call in the result property. To get status on individual parties on the call, known as legs, use the Detailed Call Log API. The following URLs are available:



          Company Call Log (all users)



          GET /restapi/v1.0/account/~/call-log?view=Detailed


          https://developer.ringcentral.com/api-reference#Call-Log-loadCompanyCallLog



          User Extension Call Log



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


          https://developer.ringcentral.com/api-reference#Call-Log-loadUserCallLog



          With the detailed view, you will receive a response with the legs property, which is an array of call log records also known as a Call Detail Records (CDR). An example record is shown below. Each call in the legs array has a result property. result is used instead of status because the call log only lists completed calls. Each leg has a legType property that can be used to identify the caller and callee.



          For example, legType can be set to:




          • RingOutClientToCaller

          • RingOutClientToSubscriber


          RingOutClientToSubscriber can be used for the calleeStatus. This gives us:





          • callerStatus = leg.result where leg.legType == 'RingOutClientToCaller'


          • calleeStatus = leg.result where leg.legType == 'RingOutClientToSubscriber'



          Note: It's possible for a CDR to only have one leg. This can happen if the result is Busy. In RingOut, if one party is busy, it can be an optimization to not call the other party. Many times, our customers will use RingOut to call their employee first, and if the employee picks up, then call the customer. If the employee isn't there, there's no reason to call the customer and have them listen to a busy tone.




          Here's a response call log record example:



          {
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016/call-log/L6HbCN6tB1nyDUA?view=Detailed",
          "id": "L6HbCN6tB1nyDUA",
          "sessionId": "575838550017",
          "startTime": "2018-11-22T08:42:05.500Z",
          "duration": 19,
          "type": "Voice",
          "direction": "Outbound",
          "action": "RingOut PC",
          "result": "Call connected",
          "to": {
          "phoneNumber": "+12125550111",
          "name": "Daenerys Targaryen",
          },
          "from": {
          "phoneNumber": "+16505550101",
          "name": "John Snow"
          },
          "extension": {
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
          "id": 727097016
          },
          "transport": "PSTN",
          "lastModifiedTime": "2018-11-22T08:42:30.007Z",
          "billing": {
          "costIncluded": 0.0,
          "costPurchased": 0.0
          },
          "legs": [
          {
          "startTime": "2018-11-22T08:42:05.257Z",
          "duration": 20,
          "type": "Voice",
          "direction": "Outbound",
          "action": "RingOut PC",
          "result": "Call connected",
          "to": {
          "phoneNumber": "+16505550101",
          "name": "John Snow"
          },
          "from": {
          "phoneNumber": "+12125550111",
          "name": "Daenerys Targaryen",
          },
          "extension": {
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
          "id": 727097016
          },
          "transport": "PSTN",
          "billing": {
          "costIncluded": 0.0,
          "costPurchased": 0.0
          },
          "legType": "RingOutClientToSubscriber"
          },
          {
          "startTime": "2018-11-22T08:42:05.500Z",
          "duration": 19,
          "type": "Voice",
          "direction": "Outbound",
          "action": "RingOut PC",
          "result": "Call connected",
          "to": {
          "phoneNumber": "+12125550111",
          "name": "Daenerys Targaryen",
          },
          "from": {
          "phoneNumber": "+16505550101",
          "name": "John Snow"
          },
          "extension": {
          "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
          "id": 727097016
          },
          "transport": "PSTN",
          "legType": "RingOutClientToCaller",
          "master": true
          }
          ]
          },



          Note: In the detailed call log example, the to and from for the RingOutClientToCaller leg coincide with the to and from for the overall call, while they are reversed for the RingOutClientToSubscriber leg to the callee. This is because the callee will be connect with the caller, whose number is in the to property from their perspective.







          share|improve this answer


























            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%2f53426791%2fhow-to-find-the-callerstatus-and-calleestatus-for-ringcentral-calls%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














            RingOut Active Call Status



            The RingOut Status API is only used when making phone calls via RingOut. The ringOutId is returned in the response for the Make RingOut API. It also only returns status while the call is in progress and a short time later, after which, it will return a 404.



            API Ref: https://developer.ringcentral.com/api-reference#RingOut-makeRingOutCall



            RingOut Historical Call Status



            To get call status for historical calls, use the Call Log API. By default, the service will return status for the overall call in the result property. To get status on individual parties on the call, known as legs, use the Detailed Call Log API. The following URLs are available:



            Company Call Log (all users)



            GET /restapi/v1.0/account/~/call-log?view=Detailed


            https://developer.ringcentral.com/api-reference#Call-Log-loadCompanyCallLog



            User Extension Call Log



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


            https://developer.ringcentral.com/api-reference#Call-Log-loadUserCallLog



            With the detailed view, you will receive a response with the legs property, which is an array of call log records also known as a Call Detail Records (CDR). An example record is shown below. Each call in the legs array has a result property. result is used instead of status because the call log only lists completed calls. Each leg has a legType property that can be used to identify the caller and callee.



            For example, legType can be set to:




            • RingOutClientToCaller

            • RingOutClientToSubscriber


            RingOutClientToSubscriber can be used for the calleeStatus. This gives us:





            • callerStatus = leg.result where leg.legType == 'RingOutClientToCaller'


            • calleeStatus = leg.result where leg.legType == 'RingOutClientToSubscriber'



            Note: It's possible for a CDR to only have one leg. This can happen if the result is Busy. In RingOut, if one party is busy, it can be an optimization to not call the other party. Many times, our customers will use RingOut to call their employee first, and if the employee picks up, then call the customer. If the employee isn't there, there's no reason to call the customer and have them listen to a busy tone.




            Here's a response call log record example:



            {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016/call-log/L6HbCN6tB1nyDUA?view=Detailed",
            "id": "L6HbCN6tB1nyDUA",
            "sessionId": "575838550017",
            "startTime": "2018-11-22T08:42:05.500Z",
            "duration": 19,
            "type": "Voice",
            "direction": "Outbound",
            "action": "RingOut PC",
            "result": "Call connected",
            "to": {
            "phoneNumber": "+12125550111",
            "name": "Daenerys Targaryen",
            },
            "from": {
            "phoneNumber": "+16505550101",
            "name": "John Snow"
            },
            "extension": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
            "id": 727097016
            },
            "transport": "PSTN",
            "lastModifiedTime": "2018-11-22T08:42:30.007Z",
            "billing": {
            "costIncluded": 0.0,
            "costPurchased": 0.0
            },
            "legs": [
            {
            "startTime": "2018-11-22T08:42:05.257Z",
            "duration": 20,
            "type": "Voice",
            "direction": "Outbound",
            "action": "RingOut PC",
            "result": "Call connected",
            "to": {
            "phoneNumber": "+16505550101",
            "name": "John Snow"
            },
            "from": {
            "phoneNumber": "+12125550111",
            "name": "Daenerys Targaryen",
            },
            "extension": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
            "id": 727097016
            },
            "transport": "PSTN",
            "billing": {
            "costIncluded": 0.0,
            "costPurchased": 0.0
            },
            "legType": "RingOutClientToSubscriber"
            },
            {
            "startTime": "2018-11-22T08:42:05.500Z",
            "duration": 19,
            "type": "Voice",
            "direction": "Outbound",
            "action": "RingOut PC",
            "result": "Call connected",
            "to": {
            "phoneNumber": "+12125550111",
            "name": "Daenerys Targaryen",
            },
            "from": {
            "phoneNumber": "+16505550101",
            "name": "John Snow"
            },
            "extension": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
            "id": 727097016
            },
            "transport": "PSTN",
            "legType": "RingOutClientToCaller",
            "master": true
            }
            ]
            },



            Note: In the detailed call log example, the to and from for the RingOutClientToCaller leg coincide with the to and from for the overall call, while they are reversed for the RingOutClientToSubscriber leg to the callee. This is because the callee will be connect with the caller, whose number is in the to property from their perspective.







            share|improve this answer






























              0














              RingOut Active Call Status



              The RingOut Status API is only used when making phone calls via RingOut. The ringOutId is returned in the response for the Make RingOut API. It also only returns status while the call is in progress and a short time later, after which, it will return a 404.



              API Ref: https://developer.ringcentral.com/api-reference#RingOut-makeRingOutCall



              RingOut Historical Call Status



              To get call status for historical calls, use the Call Log API. By default, the service will return status for the overall call in the result property. To get status on individual parties on the call, known as legs, use the Detailed Call Log API. The following URLs are available:



              Company Call Log (all users)



              GET /restapi/v1.0/account/~/call-log?view=Detailed


              https://developer.ringcentral.com/api-reference#Call-Log-loadCompanyCallLog



              User Extension Call Log



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


              https://developer.ringcentral.com/api-reference#Call-Log-loadUserCallLog



              With the detailed view, you will receive a response with the legs property, which is an array of call log records also known as a Call Detail Records (CDR). An example record is shown below. Each call in the legs array has a result property. result is used instead of status because the call log only lists completed calls. Each leg has a legType property that can be used to identify the caller and callee.



              For example, legType can be set to:




              • RingOutClientToCaller

              • RingOutClientToSubscriber


              RingOutClientToSubscriber can be used for the calleeStatus. This gives us:





              • callerStatus = leg.result where leg.legType == 'RingOutClientToCaller'


              • calleeStatus = leg.result where leg.legType == 'RingOutClientToSubscriber'



              Note: It's possible for a CDR to only have one leg. This can happen if the result is Busy. In RingOut, if one party is busy, it can be an optimization to not call the other party. Many times, our customers will use RingOut to call their employee first, and if the employee picks up, then call the customer. If the employee isn't there, there's no reason to call the customer and have them listen to a busy tone.




              Here's a response call log record example:



              {
              "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016/call-log/L6HbCN6tB1nyDUA?view=Detailed",
              "id": "L6HbCN6tB1nyDUA",
              "sessionId": "575838550017",
              "startTime": "2018-11-22T08:42:05.500Z",
              "duration": 19,
              "type": "Voice",
              "direction": "Outbound",
              "action": "RingOut PC",
              "result": "Call connected",
              "to": {
              "phoneNumber": "+12125550111",
              "name": "Daenerys Targaryen",
              },
              "from": {
              "phoneNumber": "+16505550101",
              "name": "John Snow"
              },
              "extension": {
              "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
              "id": 727097016
              },
              "transport": "PSTN",
              "lastModifiedTime": "2018-11-22T08:42:30.007Z",
              "billing": {
              "costIncluded": 0.0,
              "costPurchased": 0.0
              },
              "legs": [
              {
              "startTime": "2018-11-22T08:42:05.257Z",
              "duration": 20,
              "type": "Voice",
              "direction": "Outbound",
              "action": "RingOut PC",
              "result": "Call connected",
              "to": {
              "phoneNumber": "+16505550101",
              "name": "John Snow"
              },
              "from": {
              "phoneNumber": "+12125550111",
              "name": "Daenerys Targaryen",
              },
              "extension": {
              "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
              "id": 727097016
              },
              "transport": "PSTN",
              "billing": {
              "costIncluded": 0.0,
              "costPurchased": 0.0
              },
              "legType": "RingOutClientToSubscriber"
              },
              {
              "startTime": "2018-11-22T08:42:05.500Z",
              "duration": 19,
              "type": "Voice",
              "direction": "Outbound",
              "action": "RingOut PC",
              "result": "Call connected",
              "to": {
              "phoneNumber": "+12125550111",
              "name": "Daenerys Targaryen",
              },
              "from": {
              "phoneNumber": "+16505550101",
              "name": "John Snow"
              },
              "extension": {
              "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
              "id": 727097016
              },
              "transport": "PSTN",
              "legType": "RingOutClientToCaller",
              "master": true
              }
              ]
              },



              Note: In the detailed call log example, the to and from for the RingOutClientToCaller leg coincide with the to and from for the overall call, while they are reversed for the RingOutClientToSubscriber leg to the callee. This is because the callee will be connect with the caller, whose number is in the to property from their perspective.







              share|improve this answer




























                0












                0








                0







                RingOut Active Call Status



                The RingOut Status API is only used when making phone calls via RingOut. The ringOutId is returned in the response for the Make RingOut API. It also only returns status while the call is in progress and a short time later, after which, it will return a 404.



                API Ref: https://developer.ringcentral.com/api-reference#RingOut-makeRingOutCall



                RingOut Historical Call Status



                To get call status for historical calls, use the Call Log API. By default, the service will return status for the overall call in the result property. To get status on individual parties on the call, known as legs, use the Detailed Call Log API. The following URLs are available:



                Company Call Log (all users)



                GET /restapi/v1.0/account/~/call-log?view=Detailed


                https://developer.ringcentral.com/api-reference#Call-Log-loadCompanyCallLog



                User Extension Call Log



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


                https://developer.ringcentral.com/api-reference#Call-Log-loadUserCallLog



                With the detailed view, you will receive a response with the legs property, which is an array of call log records also known as a Call Detail Records (CDR). An example record is shown below. Each call in the legs array has a result property. result is used instead of status because the call log only lists completed calls. Each leg has a legType property that can be used to identify the caller and callee.



                For example, legType can be set to:




                • RingOutClientToCaller

                • RingOutClientToSubscriber


                RingOutClientToSubscriber can be used for the calleeStatus. This gives us:





                • callerStatus = leg.result where leg.legType == 'RingOutClientToCaller'


                • calleeStatus = leg.result where leg.legType == 'RingOutClientToSubscriber'



                Note: It's possible for a CDR to only have one leg. This can happen if the result is Busy. In RingOut, if one party is busy, it can be an optimization to not call the other party. Many times, our customers will use RingOut to call their employee first, and if the employee picks up, then call the customer. If the employee isn't there, there's no reason to call the customer and have them listen to a busy tone.




                Here's a response call log record example:



                {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016/call-log/L6HbCN6tB1nyDUA?view=Detailed",
                "id": "L6HbCN6tB1nyDUA",
                "sessionId": "575838550017",
                "startTime": "2018-11-22T08:42:05.500Z",
                "duration": 19,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "from": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "lastModifiedTime": "2018-11-22T08:42:30.007Z",
                "billing": {
                "costIncluded": 0.0,
                "costPurchased": 0.0
                },
                "legs": [
                {
                "startTime": "2018-11-22T08:42:05.257Z",
                "duration": 20,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "from": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "billing": {
                "costIncluded": 0.0,
                "costPurchased": 0.0
                },
                "legType": "RingOutClientToSubscriber"
                },
                {
                "startTime": "2018-11-22T08:42:05.500Z",
                "duration": 19,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "from": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "legType": "RingOutClientToCaller",
                "master": true
                }
                ]
                },



                Note: In the detailed call log example, the to and from for the RingOutClientToCaller leg coincide with the to and from for the overall call, while they are reversed for the RingOutClientToSubscriber leg to the callee. This is because the callee will be connect with the caller, whose number is in the to property from their perspective.







                share|improve this answer















                RingOut Active Call Status



                The RingOut Status API is only used when making phone calls via RingOut. The ringOutId is returned in the response for the Make RingOut API. It also only returns status while the call is in progress and a short time later, after which, it will return a 404.



                API Ref: https://developer.ringcentral.com/api-reference#RingOut-makeRingOutCall



                RingOut Historical Call Status



                To get call status for historical calls, use the Call Log API. By default, the service will return status for the overall call in the result property. To get status on individual parties on the call, known as legs, use the Detailed Call Log API. The following URLs are available:



                Company Call Log (all users)



                GET /restapi/v1.0/account/~/call-log?view=Detailed


                https://developer.ringcentral.com/api-reference#Call-Log-loadCompanyCallLog



                User Extension Call Log



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


                https://developer.ringcentral.com/api-reference#Call-Log-loadUserCallLog



                With the detailed view, you will receive a response with the legs property, which is an array of call log records also known as a Call Detail Records (CDR). An example record is shown below. Each call in the legs array has a result property. result is used instead of status because the call log only lists completed calls. Each leg has a legType property that can be used to identify the caller and callee.



                For example, legType can be set to:




                • RingOutClientToCaller

                • RingOutClientToSubscriber


                RingOutClientToSubscriber can be used for the calleeStatus. This gives us:





                • callerStatus = leg.result where leg.legType == 'RingOutClientToCaller'


                • calleeStatus = leg.result where leg.legType == 'RingOutClientToSubscriber'



                Note: It's possible for a CDR to only have one leg. This can happen if the result is Busy. In RingOut, if one party is busy, it can be an optimization to not call the other party. Many times, our customers will use RingOut to call their employee first, and if the employee picks up, then call the customer. If the employee isn't there, there's no reason to call the customer and have them listen to a busy tone.




                Here's a response call log record example:



                {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016/call-log/L6HbCN6tB1nyDUA?view=Detailed",
                "id": "L6HbCN6tB1nyDUA",
                "sessionId": "575838550017",
                "startTime": "2018-11-22T08:42:05.500Z",
                "duration": 19,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "from": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "lastModifiedTime": "2018-11-22T08:42:30.007Z",
                "billing": {
                "costIncluded": 0.0,
                "costPurchased": 0.0
                },
                "legs": [
                {
                "startTime": "2018-11-22T08:42:05.257Z",
                "duration": 20,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "from": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "billing": {
                "costIncluded": 0.0,
                "costPurchased": 0.0
                },
                "legType": "RingOutClientToSubscriber"
                },
                {
                "startTime": "2018-11-22T08:42:05.500Z",
                "duration": 19,
                "type": "Voice",
                "direction": "Outbound",
                "action": "RingOut PC",
                "result": "Call connected",
                "to": {
                "phoneNumber": "+12125550111",
                "name": "Daenerys Targaryen",
                },
                "from": {
                "phoneNumber": "+16505550101",
                "name": "John Snow"
                },
                "extension": {
                "uri": "https://platform.ringcentral.com/restapi/v1.0/account/727097016/extension/727097016",
                "id": 727097016
                },
                "transport": "PSTN",
                "legType": "RingOutClientToCaller",
                "master": true
                }
                ]
                },



                Note: In the detailed call log example, the to and from for the RingOutClientToCaller leg coincide with the to and from for the overall call, while they are reversed for the RingOutClientToSubscriber leg to the callee. This is because the callee will be connect with the caller, whose number is in the to property from their perspective.








                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 23 '18 at 10:55

























                answered Nov 22 '18 at 9:44









                GrokifyGrokify

                7,55322440




                7,55322440
































                    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%2f53426791%2fhow-to-find-the-callerstatus-and-calleestatus-for-ringcentral-calls%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

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?