Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Next release

* Fix: [iOS] show caller number or interpretted client name for performStartCallAction
* Docs: update CHANGELOG

## 0.3.2+1

* 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)
Expand Down
10 changes: 9 additions & 1 deletion ios/Classes/SwiftTwilioVoicePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,18 @@ public class SwiftTwilioVoicePlugin: NSObject, FlutterPlugin, FlutterStreamHand
}

self.sendPhoneCallEvents(description: "LOG|StartCallAction transaction request successful", isError: false)

var callerName: String?
if(handle.contains("client:")) {
let clientName = handle.replacingOccurrences(of: "client:", with: "")
callerName = self.clients[clientName]
} else {
callerName = handle;
}

let callUpdate = CXCallUpdate()
callUpdate.remoteHandle = callHandle
callUpdate.localizedCallerName = self.clients[handle] ?? self.clients["defaultCaller"] ?? self.defaultCaller
callUpdate.localizedCallerName = callerName ?? self.clients["defaultCaller"] ?? self.defaultCaller
callUpdate.supportsDTMF = false
callUpdate.supportsHolding = true
callUpdate.supportsGrouping = false
Expand Down