Call logs legs details

  • 1
  • Question
  • Updated 9 months ago

Hello All,

At this point I don’t know if I need to use call logs with Details/Legs or not.

I want to get a count of all inbound and outbound call made per company user.

And display UserName and count number.

Right Now I am looking at the LEGS details.

Scenario:

I made a call out from my Ringcentral soft phone +19167502475 to my company’s desk phone 17048978566

But the legs show me 2 legs. Below.  Why does leg[0] show me a to: of 19167502475 (which is what I dialed from), and a from: of 17048978566what I dialed to.

And LEG[1] shows the opposite?

"legs": [

        {

          "startTime": "2017-12-01T16:37:24.760Z",

          "duration": 30,

          "type": "Voice",

          "direction": "Outbound",

          "action": "RingOut Web",

          "result": "Accepted",

          "to": {

            "phoneNumber": "+19167502475",

            "location": "Sacramento (North), CA"

          },

          "from": {

            "phoneNumber": "+17048978566",

            "name": "RingCentral API"

          },

          "transport": "PSTN",

          "billing": {

            "costIncluded": 0,

            "costPurchased": 0

          },

          "legType": "RingOutWebToSubscriber",

          "extension": {

            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/150344004/extension/150344004";,

            "id": 150344004

          }

        },

        {

          "startTime": "2017-12-01T16:37:27.942Z",

          "duration": 27,

          "type": "Voice",

          "direction": "Outbound",

          "action": "RingOut Web",

          "result": "Call connected",

          "to": {

            "phoneNumber": "+17048978566",

            "location": "Davidson, NC"

          },

          "from": {

            "phoneNumber": "+19167502475",

            "name": "RingCentral API"

          },

          "transport": "PSTN",

          "legType": "RingOutWebToCaller",

          "extension": {

            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/150344004/extension/150344004";,            "id": 150344004

          },

          "master": true

        }

      ]

    }

Thanks,

Keith.

 

Photo of Keith Stephens Fax

Keith Stephens Fax

  • 150 Points 100 badge 2x thumb

Posted 10 months ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,908 Points 5k badge 2x thumb
Is it a ringout call? Ringout is different from direct call. And there is an intermediate number to connect from and to.
Photo of Keith Stephens Fax

Keith Stephens Fax

  • 150 Points 100 badge 2x thumb
What is the difference between the 2 calls?  Also how do I make a direct call in my sandbox?
Thanks,
Keith
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,996 Points 5k badge 2x thumb
You can make direct call or ringout with the softphone: https://devcommunity.ringcentral.com/ringcentraldev/topics/setup-devtest-phone-setup
Photo of Keith Stephens Fax

Keith Stephens Fax

  • 150 Points 100 badge 2x thumb
I need to get a user names and a count of direct incoming and outgoing calls?  Apparently I have been going about this wrong since there is a difference between the two call methods.
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,858 Points 5k badge 2x thumb
Usernames are not always available (if stranger calls, there is no way to know its name). To get call logs, you can use the call log API: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefCallLog.html
(Edited)
Photo of Keith Stephens Fax

Keith Stephens Fax

  • 150 Points 100 badge 2x thumb
Sorry let me clarify, I need the user names of the person in our company that made the call. So I can say our employee John Doe made 50 outgoing calls this week, Jane Doe made 150 outgoing calls this week.

And the same with incoming calls John Doe received/picked up 10 calls this week, Jane Doe received/picked up 15 calls this week.  We don't need to know who called into the office.

With regards to ringout and direct dial the link did not help with that, it only showed how to switch the softphone to your sandbox.  In my softphone setting I only have the ability to make RingOut calls, how do I make a direct dial call?  At this point I don't think I need to deal with Ringouts.
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,858 Points 5k badge 2x thumb
Hi Keith, If your softphone is unable to make direct call, I think it is a problem of your RingCentral account. Please post a question here https://community.ringcentral.com/ringcentral.  Representatives there are good at such questions. It is for non-developer users. This forum is for programming questions only. 

And for the username and call counts, I think the information is available in RingCentral service web. You can request more detail in https://community.ringcentral.com/ringcentral