question

janielle2936 avatar image
janielle2936 asked benjamin-dean commented

How long does a ringout ID live for?

Firstly, ringout is working correctly, it dials two numbers and connects them together successfully.


When I send a POST request to the Ringout REST API endpoint, I get a ringout ID back. I then use this ringout ID and issue a GET request every few seconds to track when both parties have answered there calls. ( I am aware of webhooks, but webhooks don't give me the callee's status)


{  
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/XXXX/extension/XXXXXX/ringout/XXx";,
  "id": xxx,
  "status": {
                 
    "callStatus": "Success",
    "callerStatus": "Success",
    "calleeStatus": "Success"
  }
}


I use this same polling technique to work out when either party has disconnected from the call.

{  
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/xxxx/extension/xxxx/ringout/xxxx";,
  "id": xxx,
  "status": {
                 
    "callStatus": "CannotReach",
    "callerStatus": "Finished",
    "calleeStatus": "Finished"
  }
}


I noticed that the ringout ID only lives for about 30 seconds, after this time when I send a GET request I get this response even though the phone call is still taking place.


{  
"errorCode": "CMN-102",
  "message": "Resource for parameter [ringoutId] is not found",
  "errors": [
    {
                 
      "errorCode": "CMN-102",
      "message": "Resource for parameter [ringoutId] is not found",
      "parameterName": "ringoutId"
    }
  ],
  "parameterName": "ringoutId"

}


Is this the expected behaviour for a ringout call, does the ID disappear after 30 seconds, even though the call is still active?



ringout
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

anton-nikitin avatar image
anton-nikitin answered benjamin-dean commented
Ringout ID lives until both call legs are established (or canceled). You cannot use this ID to check the status of a call which is already connected to both parties or to cancel already connected call.

In order to monitor status of an established call you should use our presence notifications.
2 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

janielle2936 avatar image janielle2936 commented ·
ok, I understand, thanks
0 Likes 0 ·
benjamin-dean avatar image benjamin-dean commented ·
If you're the person who posted the same question in StackOverflow, I'm going to reference the URL to this response in the answer there (as Anton's answer can be considered definitive).
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys