Reputation: 19
I am working on implementing caller name (CNAM) feature for both incoming and outgoing calls. Instead of displaying a phone number, I want the caller's name to reflect our company name.
I have already implemented the CNAM functionality; however, I am encountering an issue. Upon submitting the CNAM request, I noticed the following statuses:
Could you please provide guidance on the next steps or inform me of any additional requirements to complete the review process and enable the desired functionality?
Implementation:
Below is the API endpoint I am using to initiate a call:
// API endpoint to initiate a call
app.get('/make-call', (req, res) => {
const toNumber = req.query.to; // Phone number to call (e.g., +1234567890)
if (!toNumber) {
return res.status(400).send('To number is required');
}
client.calls
.create({
to: toNumber,
from: process.env.ENV_TWILLIO_NUMBER, // Your Twilio number
// callerName: 'Company Name', // Intended to display the company name
url: 'http://example.com/handle-call?callerName=Company%20Name',
CSID: process.env.ENV_PHONE_SID,
})
.then(call => {
console.log(call.sid);
res.status(200).send(`Call initiated to ${toNumber}`);
})
.catch(error => {
console.error('Error making the call:', error);
res.status(500).send('Error making the call');
});
});
Issue:
When an incoming call comes in from the number +14587963548, I expect the caller name CNAM to display as company name. However, this is not happening as expected.
Upvotes: 1
Views: 69