Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agent515
Copy link
Contributor

@agent515 agent515 commented Apr 24, 2024

…' everytime.

Fixes #214 #202

@cybex-dev cybex-dev self-assigned this May 14, 2024
@cybex-dev
Copy link
Owner

Thank you for the PR - will review and merge this week.

Copy link
Owner

@cybex-dev cybex-dev left a 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.

Copy link
Owner

@cybex-dev cybex-dev left a 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
Copy link
Owner

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)
Copy link
Owner

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.

@cybex-dev cybex-dev added the iOS label Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Showing a 'Display Name' from the Contacts or 'From' field (just like Android) instead of default caller on iOS.
2 participants