Hi team,
We are using Send Digit API to send DTMF tones to all the customers who is calling us. We have our own service provider. I am using below script to send the DTMF digits of "22" and when we do test call we can hear the tones as well as API giving successful response. But the problem is our service provider can not able to capture the digits we are sending. Why our service provider need to capture the DTMF digit is, we need to start billing and stop billing based on the digits we are sending. So kindly help me here what should we do to get this working. Our service provider should be able to capture the digits.
async function sendDTMF(participantId, conversationId, oauthToken) {
const platformClientDtmf = require('purecloud-platform-client-v2');
const clientDtmf = platformClientDtmf.ApiClient.instance;
clientDtmf.setEnvironment(platformClientDtmf.PureCloudRegionHosts.us_west_2);
console.log("OauthToken", oauthToken);
clientDtmf.setAccessToken(oauthToken);
let apiInstanceConversation = new platformClientDtmf.ConversationsApi();
let opts = {
"body": {
"digits": "22"
}
};
await apiInstanceConversation.postConversationParticipantDigits(conversationId, participantId, opts)
.then(() => {
console.log("postConversationParticipantDigits returned successfully.");
})
.catch((err) => {
console.log("There was a failure calling postConversationParticipantDigits");
console.error(err);
});
// Sends DTMF to the participant
}
Thanks,
Magudeeswaran Nataraj