question

Curtis Harrison avatar image
Curtis Harrison asked Phong Vu answered

How do I get the original caller's information in call logs?

Using the

/restapi/v1.0/account/~/extension/~/call-log

API call. We get details of the call, including the "from" json object which includes phone number and contact (if available).


We are making a simple call log reporting application and the problem is if the receptionist transfers a call to a user than the 'from' field becomes filled out with the receptionist's extension and info, which isn't useful when reporting who you spent time on the phone with.


So the question becomes: how do I access the original caller info (specifically phone number and contact)?


Thanks!

call logs
1 |3000

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

Phong Vu avatar image
Phong Vu answered

Can you set the "view:Detailed" query param and check the first leg from the response.

/restapi/v1.0/account/~/extension/~/call-log?view=Detailed


1 |3000

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

Curtis Harrison avatar image
Curtis Harrison answered Curtis Harrison edited

So I am looking through all of the legs and I am not seeing anything about the original caller. Here is the legs response for that call log entry from the API call (note: For privacy concerns I have replaced all ids with x, "Boss" is the user who received the transfer x.101, "Receptionist" is the user who received the original call and transferred to the boss x.114, and YYYYYYYYYY is ourcompany's main number:

"legs" : [ {

"startTime" : "2020-09-16T19:43:15.448Z",

"duration" : 368,

"type" : "Voice",

"direction" : "Inbound",

"action" : "Phone Call",

"result" : "Accepted",

"to" : {

"name" : "Boss",

"extensionId" : "x",

"extensionNumber" : "101"

},

"from" : {

"name" : "Receptionist",

"extensionNumber" : "114"

},

"extension" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/extension/x",

"id" : x

},

"reason" : "Accepted",

"reasonDescription" : "The call connected to and was accepted by this number.",

"telephonySessionId" : "s-x",

"transport" : "PSTN",

"legType" : "Accept",

"master" : true

}, {

"startTime" : "2020-09-16T19:43:22.098Z",

"duration" : 355,

"type" : "Voice",

"direction" : "Outbound",

"action" : "VoIP Call",

"result" : "Call connected",

"to" : {

"phoneNumber" : "+YYYYYYYYYY",

"extensionNumber" : "101",

"location" : "City, ST"

},

"from" : {

"name" : "Boss",

"extensionId" : "x",

"extensionNumber" : "114",

"device" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/device/x",

"id" : "x"

}

},

"recording" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/recording/x",

"id" : "x",

"type" : "Automatic",

"contentUri" : "https://media.ringcentral.com/restapi/v1.0/account/x/recording/x/content"

},

"extension" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/extension/x",

"id" : x

},

"reason" : "Accepted",

"reasonDescription" : "The call connected to and was accepted by this number.",

"telephonySessionId" : "s-x",

"transport" : "VoIP",

"legType" : "PstnToSip"

}, {

"startTime" : "2020-09-16T19:43:32.494Z",

"duration" : 345,

"type" : "Voice",

"direction" : "Outbound",

"action" : "Transfer",

"result" : "Call connected",

"to" : {

"location" : "City, ST"

},

"from" : {

"name" : "Boss",

"extensionId" : "x",

"device" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/device/x",

"id" : "x"

}

},

"extension" : {

"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/x/extension/x",

"id" : x

},

"telephonySessionId" : "s-x",

"transport" : "PSTN",

"legType" : "TransferCall"

} ]



Here is what I can find in the admin portal call logs about this call. Looks like RC splits transferred calls into two call records assigned to different users (even though Boss ends up talking with the client the whole time). In this image I have left extensions alone (recall Boss is extension 101, and receptionist is extension 114), removed names, and changed numbers. (YYY)YYY-YYYY is our company number, and (XXX)XXX-XXXX is the incoming caller's number.




calllog.png (54.0 KiB)
1 |3000

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

Phong Vu avatar image
Phong Vu answered

Please open a support ticket so the developer support team can look into your account to investigate this case.

1 |3000

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

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