@capgo/capacitor-twilio-voice 7.7.6 → 7.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -312,6 +312,54 @@ Keep in mind, this will make it so that you app can be accessed when the screen
312
312
  - [iOS Setup](https://www.twilio.com/docs/voice/sdks/ios/get-started)
313
313
  - [Android Setup](https://www.twilio.com/docs/voice/sdks/android/get-started)
314
314
 
315
+ ## Caller Name Display (CapacitorTwilioCallerName)
316
+
317
+ By default, incoming calls display the caller's phone number or client ID. You can customize this by passing a `CapacitorTwilioCallerName` parameter from your TwiML backend to display a friendly name instead.
318
+
319
+ ### Backend Setup
320
+
321
+ When generating your TwiML response for the `<Client>` dial, add the `CapacitorTwilioCallerName` parameter:
322
+
323
+ ```java
324
+ // Java example (see exemple-backend for full implementation)
325
+ Parameter callerNameParam = new Parameter.Builder()
326
+ .name("CapacitorTwilioCallerName")
327
+ .value("John Doe")
328
+ .build();
329
+
330
+ Client client = new Client.Builder(identity)
331
+ .parameter(callerNameParam)
332
+ .build();
333
+
334
+ Dial dial = new Dial.Builder()
335
+ .client(client)
336
+ .build();
337
+ ```
338
+
339
+ ```javascript
340
+ // Node.js example
341
+ const VoiceResponse = require('twilio').twiml.VoiceResponse;
342
+
343
+ const response = new VoiceResponse();
344
+ const dial = response.dial();
345
+ dial.client({
346
+ name: 'CapacitorTwilioCallerName',
347
+ value: 'John Doe'
348
+ }, identity);
349
+ ```
350
+
351
+ ### How It Works
352
+
353
+ 1. When your backend receives an incoming call, it generates TwiML to route the call
354
+ 2. Include the `CapacitorTwilioCallerName` parameter with the caller's display name
355
+ 3. The plugin automatically extracts this parameter and uses it for:
356
+ - iOS CallKit incoming call screen
357
+ - Android incoming call notification
358
+ - The `from` field in `callInviteReceived` events
359
+ - The `pendingInvites` array in `getCallStatus()`
360
+
361
+ If `CapacitorTwilioCallerName` is not provided, the plugin falls back to the caller's phone number or client ID.
362
+
315
363
  ## Usage
316
364
 
317
365
  ### Authentication
@@ -75,7 +75,7 @@ import org.json.JSONObject;
75
75
  )
76
76
  public class CapacitorTwilioVoicePlugin extends Plugin {
77
77
 
78
- private final String pluginVersion = "7.7.6";
78
+ private final String pluginVersion = "7.7.8";
79
79
 
80
80
  private static final String TAG = "CapacitorTwilioVoice";
81
81
  private static final String PREF_ACCESS_TOKEN = "twilio_access_token";
@@ -27,7 +27,7 @@ public protocol PushKitEventDelegate: AnyObject {
27
27
  */
28
28
  @objc(CapacitorTwilioVoicePlugin)
29
29
  public class CapacitorTwilioVoicePlugin: CAPPlugin, CAPBridgedPlugin, PushKitEventDelegate {
30
- private let pluginVersion: String = "7.7.6"
30
+ private let pluginVersion: String = "7.7.8"
31
31
 
32
32
  public let identifier = "CapacitorTwilioVoicePlugin"
33
33
  public let jsName = "CapacitorTwilioVoice"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-twilio-voice",
3
- "version": "7.7.6",
3
+ "version": "7.7.8",
4
4
  "description": "Integrates the Twilio Voice SDK into Capacitor",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",