• Home
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • General
  • News & Announcements
  • Ideas
  • RingCentral Office
    • Getting Started
    • Authentication
    • App Graduation
    • API Betas & Developer Previews
    • REST API
      • Call Management API
      • Glip API
      • Meetings API
      • Messaging API (SMS, Fax, Voicemail)
      • Provisioning API
      • Voice and Telephony API
    • Environment (Sandbox, Gateway)
    • SDKs
    • Admin & Credentials
  • RingCentral Engage
    • Getting Started
    • REST API
      • Interactions API
      • Provisioning API
      • Routing API
  • Jobs/Requests for Help
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Users
  • Badges
Skip to main content
  • Create
    • Ask a question
    • Create an article
    • Post an idea
    • General
    • News & Announcements
    • Ideas
    • RingCentral Office
      • Getting Started
      • Authentication
      • App Graduation
      • API Betas & Developer Previews
      • REST API
        • Call Management API
        • Glip API
        • Meetings API
        • Messaging API (SMS, Fax, Voicemail)
        • Provisioning API
        • Voice and Telephony API
      • Environment (Sandbox, Gateway)
      • SDKs
      • Admin & Credentials
    • RingCentral Engage
      • Getting Started
      • REST API
        • Interactions API
        • Provisioning API
        • Routing API
    • Jobs/Requests for Help
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Sign in
  • Home
  • RingCentral Office

question

hambrise-alan avatar image
hambrise-alan asked · May 26, 2017 at 07:09 AM

I have created subscription using webhook and i am getting response. i need call record Id in the response.

I have created subscription using webhook and i am getting response as below. i need to fetch call record for this Event how can i do? please help to get it resolved.
{
  "uuid": "1343368781877007566-7030373935822630719",
  "event": "/restapi/v1.0/account/129965004/extension/129965004/presence?detailedTelephonyState=true",
  "timestamp": "2017-05-22T12:18:50.808Z",
  "subscriptionId": "83efa9c0-710a-4b06-a9fd-949834c7f713",
  "body": {
    "extensionId": 139055004,
    "telephonyStatus": "CallConnected",
    "activeCalls": [
      {
        "id": "PDhBLpqFMHGWlHSsd5foXioTWJVzGT3e",
        "direction": "Outbound",
        "from": "+16603314970",
        "to": "+19158701061",
        "telephonyStatus": "CallConnected",
        "sessionId": "19345726003"
      }
    ],
    "sequence": 542039,
    "presenceStatus": "Busy",
    "userStatus": "Available",
    "dndStatus": "TakeAllCalls",
    "allowSeeMyPresence": true,
    "ringOnMonitoredCall": false,
    "pickUpCallsOnHold": false
  }
}
topic-default
Comment
0
1 |1000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

4 Answers

· Write an Answer
  • Sort by Created Created
  • Sort by Oldest Oldest
  • Sort by Votes Votes
ak avatar image
ak answered · May 26, 2017 at 05:20 PM
You could use  Call-Log API filtered by ' sessionId' to match the Presence events ( Push notifications ) when you receive using webhooks.

For ex: 

You could use the sessionID from the webhook push notifications above ( 19345726003 ) to make an API call to Call - Log endpoint as below:

Request

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

Note: (  ~ ) tilde refers to the extension assigned to the account logged-in within the current session

If you would like to receive the account level call logs kindly use:
/restapi/v1.0/account/~/call-log?sessionId=19345726003

0 · Share
1 |1000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

hambrise-luke-alan-j avatar image
hambrise-luke-alan-j answered · May 27, 2017 at 03:15 PM
SessionID is ok, but for every notification type i am getting same session ID. what shall i do.
0 · Share
1 |1000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

ak avatar image
ak answered · May 30, 2017 at 04:48 PM
The sessionID remains same across the three events if it is for a specific call, for ex:

1.) Ringing
2.) Call Connected
3.) No Call 

For all the three notifications on a single call, you would receive the same sessionID for the push notifications.

May I know what is it that you are trying to achieve?


0 · Share
1 |1000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

hambrise-luke-alan-j avatar image
hambrise-luke-alan-j answered · May 31, 2017 at 03:04 AM
 I though session Id will be same for all calls. thank you i got it.
0 · Share
1 |1000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

question details

3 People are following this question.

hambrise-alan follows this question ak follows this question hambrise-luke-alan-j follows this question
Answers Subscribe to Answers Answers and Comments Subscribe to Comments and Answers

Related Questions

Absolute novice needing help with an API. Help? 2 Answers

Api requests not showing in sandbox api calls 13 Answers

brandId invalid 1 Answer

Call-log no record returned in SandBox 2 Answers

Can't delete users from the sandbox 2 Answers

  • Developer Home
  • ·
  • Community Guidelines
  • ·
  • Legal
  • ·
  • Privacy Notice