Hello All,
At this point I dont 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 companys 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": ";,
"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": "