Skip to content

Commit 787fbe6

Browse files
authored
Merge pull request #302 from cybex-dev/feat_show_parsed_caller_name_on_outoging_call
Fixes iOS caller ID display in performStartCallAction
2 parents 29df436 + e8ffdee commit 787fbe6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Next release
2+
3+
* Fix: [iOS] show caller number or interpretted client name for performStartCallAction
4+
* Docs: update CHANGELOG
5+
16
## 0.3.2+1
27

38
* Fix: [iOS] Missed call notifications now show caller name (or full number) on title, and "Missed call" text in body. [Issue #299](https://github.com/cybex-dev/twilio_voice/issues/299)

ios/Classes/SwiftTwilioVoicePlugin.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,18 @@ public class SwiftTwilioVoicePlugin: NSObject, FlutterPlugin, FlutterStreamHand
930930
}
931931

932932
self.sendPhoneCallEvents(description: "LOG|StartCallAction transaction request successful", isError: false)
933+
934+
var callerName: String?
935+
if(handle.contains("client:")) {
936+
let clientName = handle.replacingOccurrences(of: "client:", with: "")
937+
callerName = self.clients[clientName]
938+
} else {
939+
callerName = handle;
940+
}
933941

934942
let callUpdate = CXCallUpdate()
935943
callUpdate.remoteHandle = callHandle
936-
callUpdate.localizedCallerName = self.clients[handle] ?? self.clients["defaultCaller"] ?? self.defaultCaller
944+
callUpdate.localizedCallerName = callerName ?? self.clients["defaultCaller"] ?? self.defaultCaller
937945
callUpdate.supportsDTMF = false
938946
callUpdate.supportsHolding = true
939947
callUpdate.supportsGrouping = false

0 commit comments

Comments
 (0)