问题
So, I'm now able to create a voice call (voip, no phone numbers) using the Twilio Sever JS SDK, executing the following code:
makeCall : function(req, res) {
req.checkBody({
'To' : {
notEmpty : true,
errorMessage : 'Invalid To'
}
});
req.getValidationResult().then(function(result) {
if (!result.isEmpty()) {
res.status(400).json(responseHandler.errorResponse("INVALID_FIELDS", result.mapped()));
return;
}
const twimlRes = new Twiml.VoiceResponse();
const dial = twimlRes.dial()
dial.client(req.body.To);
res.set('Content-Type', 'text/xml');
res.send(twimlRes.toString());
});
}
However on my phone and CallKit features (iOS) I only have access to a client ID, is there any method to update the ID to a friendlyName on getToken
or on even on dial
/ VoiceResponse
?
I already tried to follow this but I think it only applies to phone numbers? Correct me If I'm wrong but I have no outgoingCallerIds
..
EDIT: I also tried to add a callerId in the dial method:
twimlRes.dial({ callerId: 'Jose' })
But on my phone on my phone I have a transformed string which looks like the corresponding phone key numbers 5673
(Jose).
Thanks in advance
来源:https://stackoverflow.com/questions/46812414/twilio-voice-sdk-show-friendlyname-on-call