Unfortunately, with the device id limitation, this API can be used mainly to answer incoming calls to a desk/hard phone only.
But if you want to try out with the RC app. here is a workaround solution.
Manually make an outbound call from your RC app to any phone number and answer the call. Then read the user active calls with the view=Detailed and parse the "from" object from the response to detect the device id. The device id will remain the same until you change your internet connection.
E.g. response
{
uri: 'https://platform.ringcentral.com/restapi/v1.0/account/80964XXX/extension/6228832XXX/call-log/YILblmt5jMJPzUA?view=Detailed',
id: 'YILblmt5jMJPzUA',
sessionId: '1166748370016',
startTime: '2023-11-02T14:03:54.000Z',
duration: 104,
durationMs: 104000,
type: 'Voice',
internalType: 'LongDistance',
direction: 'Outbound',
action: 'VoIP Call',
result: 'Call connected',
to: {
...
},
from: {
name: 'Paco Vu',
extensionNumber: '11119',
device: {
uri: 'https://platform.ringcentral.com/restapi/v1.0/account/80964xxx/device/802404970016',
id: '802404970016'
}
},
...
In case of out bound in the user active call API (https://developers.ringcentral.com/api-reference/Call-Log/listExtensionActiveCalls) I am getting the device ID but not getting the party Id. So please suggest from which API we will get party id and device id both to answer the incoming call using answering call API (https://developers.ringcentral.com/api-reference/Call-Control/answerCallParty)
I am getting the error in response of answer call API.
Actually i need the answer call functionality for inbound calls.