-
Notifications
You must be signed in to change notification settings - Fork 99
Fetch display name from the Phonebook instead showing 'Unknown Caller… #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Thank you for the PR - will review and merge this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the addition, will be taking a look at this one. I'll need to review how the interpreted parameters interact with this addition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contributions, though quite thoughtful it may affect current users/apps concerning expected functionality and interpreting parameters & names.
|
||
let callUpdate = CXCallUpdate() | ||
callUpdate.remoteHandle = callHandle | ||
callUpdate.localizedCallerName = clients[from] ?? self.clients["defaultCaller"] ?? defaultCaller | ||
/// Apparently localizedCallerName overrides remoteHandle, so it was commented out fix "Unknown Caller" issue. | ||
// callUpdate.localizedCallerName = from ?? self.clients["defaultCaller"] ?? defaultCaller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't respect saved clients, integrating this change will affect others making use of the registerClient
feature.
I'm working on an different approach allowing the developer to interpret the name directly from the custom parameters, clients map, etc.
let callHandle = CXHandle(type: .generic, value: from) | ||
func reportIncomingCall(from: String, uuid: UUID) { | ||
// Using .phoneNumber to fetch display name from the Phonebook if the number is saved otherwise show literal string 'from'. | ||
let callHandle = CXHandle(type: .phoneNumber, value: from) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition, though not all apps using twilio_voice make use of contacts or "from" values.
…' everytime.
Fixes #214 #202