Fetch display name from the Phonebook instead showing 'Unknown Caller…#230
Fetch display name from the Phonebook instead showing 'Unknown Caller…#230agent515 wants to merge 1 commit intocybex-dev:masterfrom
Conversation
|
Thank you for the PR - will review and merge this week. |
cybex-dev
left a comment
There was a problem hiding this comment.
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.
| 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.
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.
Great addition, though not all apps using twilio_voice make use of contacts or "from" values.
|
Keeping this PR open, will require a review by @agent515 after I complete the app resolve call parameter callback feature. |
…' everytime.
Fixes #214 #202