Skip to content

incoming and out going caller name. #284

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 24 commits into
base: master
Choose a base branch
from

Conversation

bazl-E
Copy link
Contributor

@bazl-E bazl-E commented Jun 20, 2025

🚀 Enhancements to Call Handling and Management

Note: Apologies for the changes in the example/ folder — these were automatically refactored when updating Flutter.

📞 Call Management Improvements

  • Outgoing Caller Name Support:

    • Added a callerName parameter to the placeCall method to support setting a custom caller name when initiating a call.
    • Integrated into both Android and iOS platforms.
    • On Android, it's passed using TVConnectionService.EXTRA_CALLER_NAME.
  • Incoming Caller Name Display:

    • Incoming caller name is now supported and should be passed from the Twilio TwiML via your backend server.
    • If no contact name exists, fallback to the raw or formatted contact string.
  • Active Connection Cleanup:

    • Introduced clearActiveConnections in TVConnectionService to properly manage and clear active call connections once a call ends.

🆕 New Features

  • Restore Call After App Restart:
    • Implemented support for TVMethodChannels.GetActiveCallOnResumeFromTerminatedState to retrieve active call details when resuming the app after termination.

All features are supported on both Android and iOS, and have been thoroughly tested with my team.

bazl-E added 24 commits July 17, 2024 19:04
Preserve the device token for VoIP push notifications to avoid the need for users to restart the app to obtain a new device token. Removing the device token from UserDefaults caused registration failures.

fix : IOS not displaying caller number

if the user doesn't set a default caller name it will display the incoming caller number , if the already set a value user has to call [await TwilioVoice.instance.setDefaultCallerName('');] to make this work
Update the handling of the localized caller name in the `SwiftTwilioVoicePlugin.swift` file. Instead of using the `clients` dictionary to retrieve the caller name, always use the `formatUSPhoneNumber` function to format the caller's phone number. This ensures consistency and avoids potential issues with missing or incorrect caller names.

Note: This commit message follows the established convention of starting with a verb in the imperative form, followed by a concise description of the changes made.
# Conflicts:
#	android/build.gradle
#	android/src/main/kotlin/com/twilio/twilio_voice/TwilioVoicePlugin.kt
#	android/src/main/kotlin/com/twilio/twilio_voice/service/TVConnectionService.kt
#	android/src/main/kotlin/com/twilio/twilio_voice/types/TVMethodChannels.kt
#	example/ios/Runner.xcodeproj/project.pbxproj
#	ios/Classes/SwiftTwilioVoicePlugin.swift
#	ios/twilio_voice.podspec
#	lib/_internal/twilio_voice_web.dart
@bazl-E bazl-E closed this Jun 20, 2025
@bazl-E bazl-E reopened this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant