News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Ringout Flow notifications (WEBHOOKs) and Second leg start connected without connecting the first leg.
Tags: ringout, webhooks
Jun 5, 2018 at 8:26am   •   1 replies  •  0 likes
tony-abott

1. When we call RingOut API, it gets connected to second leg directly even when the 'PlayPrompt' is set to true and the first legged number is logged in through softPhone.


Here is how we are calling the API

$cparams["url"] = "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ring-out";
$cparams["header"] =array('Content-Type: application/json',"Authorization: Bearer ". $token_response['access_token']);
$cparams["params"]= array('from'=>array("phoneNumber"=>"5856009977"),'to'=>array("phoneNumber"=>"5855327141"));
$response = $this->curl_req($cparams);


This is how we are creating subscriptions (for WebHook's)

  $cparams["header"] =array('Content-Type: application/json',"Authorization: Bearer ". $token_response['access_token']);
  $cparams["params"]= array(
           'eventFilters'=>array("/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true&sipData=true","/restapi/v1.0/account/~/extension/~/presence/line/presence?detailedTelephonyState=true"),
           "deliveryMode" =>array(
              "transportType"=> "WebHook",
              "address"=> "https://xxxxxxxxxx.ceipal.com/RingCentral/getcalldetails")
           );
 $cparams["url"] = "https://platform.devtest.ringcentral.com/restapi/v1.0/subscription";
 $response = $this->curl_req($cparams);



And the subscription is getting failed for some reason. (can you please let us know the cause of this error. We are getting the same error since last 48hrs.)

(
    [errorCode] => SUB-505
    [message] => Subscriptions limit exceeded
    [errors] => Array
        (
            [0] => Array
                (
                    [errorCode] => SUB-505
                    [message] => Subscriptions limit exceeded
                )
        )
)



2. We would like to keep the track of Calls, SMS in our database; when the user sends sms or make a call from our application.


While ringing we are getting the presence as below:

{

  "uuid": "4369787660677498215",
  "event": "/restapi/v1.0/account/231607004/extension/231607004/presence",
  "timestamp": "2018-06-05T14:16:42.724Z",
  "subscriptionId": "8780795d-6e90-4df4-ab64-5342feb1ae39",
  "ownerId": "231607004",
  "body": {
  
    "extensionId": 231607004,
    "telephonyStatus": "Ringing",
    "presenceStatus": "Available",
    "userStatus": "Available",
    "dndStatus": "TakeAllCalls",
    "message": "Custom Status",
    "allowSeeMyPresence": true,
    "ringOnMonitoredCall": false,
    "pickUpCallsOnHold": true
  }
}

Once call connected, below is the presence:

{
  
  "uuid": "5107542592166768788",
  "event": "/restapi/v1.0/account/231607004/extension/231607004/presence?detailedTelephonyState=true",
  "timestamp": "2018-06-04T13:01:40.174Z",
  "subscriptionId": "ec05ff64-9647-44a0-8bbf-ea09eed380f3",
  "ownerId": "231607004",
  "body": {
  
    "extensionId": 231607004,
    "telephonyStatus": "CallConnected",
    "activeCalls": [
      {
  
        "id": "68087d60833d47f098205a8d139d1137",
        "direction": "Outbound",
        "fromName": "Tony Abott",
        "from": "+15876009977",
        "to": "+15855327141",
        "telephonyStatus": "CallConnected",
        "sessionId": "19012301004",
        "startTime": "2018-06-04T13:00:55.296Z"
      }
    ],
    "sequence": 7511,
    "presenceStatus": "Busy",
    "userStatus": "Available",
    "dndStatus": "TakeAllCalls",
    "message": "Custom Status",
    "allowSeeMyPresence": true,
    "ringOnMonitoredCall": false,
    "pickUpCallsOnHold": true,
    "totalActiveCalls": 1
  }
}

we don't find any common reference/unique_id in the above presence to keep track, please suggest us if there are any custom params that we can maintain.

1 Answer
answered on Jun 5, 2018 at 9:02am  
Hi Tony,

We have a subscription count limit. Now it's 20 active subscriptions per application and User. Please remove unused subscriptions, e.g. retrieve the list of subscriptions for current User and delete redundant. 

Regarding tracking question - Presence notifications will notify you about User's calls, each call has unique session id, so you can track it by sessionId, provided in activeCalls section. 

Please advise if you have any questions.

Thanks,

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us