steps
1. I am subscribed to all the following extensions : departments, individual extension ids
2. whenever we recieve a call and the caller types the extension id for individual agent , we recieve the agents presence in subscription properly..
3. when I select on department 's extension on call, the call is not forwarded to agent directly, and I am not receiving that notification in callback for that agent. Instead I receive notification object for department extension as :
{
"uuid": "*",
"event": "/restapi/v1.0/account/*/extension/*/presence?detailedTelephonyState=true",
"timestamp": "*",
"subscriptionId": "*",
"ownerId": "*",
"body": {
"extensionId": *,
"sequence": *,
"presenceStatus": "Offline"
}
}
4. even when the presence of agent extension is already enabled
So I am not able to figure out if this is right way to do things.
My aim is to recieve department call and get the presence of agent using subscription api to whom the call is forwarded to.
the overall procedure coded is a follows:
1. get the list of extensions by department :
/account/~/extension?type=Department
2. then I loop over its data to get members of all department
getCallMembersExtensions = (allExtensions) => {4. prepare the presence links
return (extensionResults)=>{
let extensionDetails = extensionResults.json();
let memberList = extensionDetails.records.map(({id}) => {
allExtensions.push(this.getPresenceLink(id))
return platform.get('/account/~/department/${id}/members')
})
return Promise.all(memberList)
}
}
getMemberPresence = (allExtensions) => {5. set the presence
return (memberDetails) => {
console.log("memberDetails", memberDetails);
memberDetails.map((memberDatum) => {
let memberJson = memberDatum.json();
return memberJson.records.map((r) => {
allExtensions.push(this.getPresenceLink(r.id))
})
})
subscription5. listen to the events,
.setEventFilters([...allExtensions, '/account/~/presence'])
.register().then(function (response) {
console.log('Success: Subscription is listening');
}).catch(function(e) {
console.log('Subscription Error: ', e);
});
const subscription = getRcsdk().createSubscription();here I receive notifications for both direct agent extension on call or call queue extensions. but in case of call queue extension , I receive this data
subscription.on(subscription.events.notification, function(accountPresence) {
console.log("accountPresence", accountPresence)
});
{no caller info, nothing else.. moreover I was expecting that it forwards the call to particular agent(as the agent's ext id is also being listened, I may recieve a notification in callback for same, but this is not happening).
"uuid": "*",
"event": "/restapi/v1.0/account/*/extension/*/presence?detailedTelephonyState=true",
"timestamp": "*",
"subscriptionId": "*",
"ownerId": "*",
"body": {
"extensionId": *,
"sequence": *,
"presenceStatus": "Offline"
}
}
please let me know if I am missing something
Can you explain more on this?
3. when I select on department 's extension on call, the call is not forwarded to agent directly, and I am not receiving that notification in callback for that agent.
How do you select and how do you forward the call. Would be helpful if you provide some codes
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder