Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
class QueueInfo {
|
|
|
|
|
final int id;
|
|
|
|
|
final String name;
|
|
|
|
|
final String type;
|
|
|
|
|
final String? extension;
|
|
|
|
|
final int waitingCount;
|
|
|
|
|
|
|
|
|
|
QueueInfo({
|
|
|
|
|
required this.id,
|
|
|
|
|
required this.name,
|
|
|
|
|
required this.type,
|
|
|
|
|
this.extension,
|
|
|
|
|
required this.waitingCount,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
factory QueueInfo.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
return QueueInfo(
|
2026-03-06 15:32:22 -08:00
|
|
|
id: _toInt(json['id']),
|
|
|
|
|
name: (json['name'] ?? '') as String,
|
|
|
|
|
type: (json['type'] ?? '') as String,
|
Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
extension: json['extension'] as String?,
|
2026-03-06 15:32:22 -08:00
|
|
|
waitingCount: _toInt(json['waiting_count']),
|
Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
);
|
|
|
|
|
}
|
2026-03-06 15:32:22 -08:00
|
|
|
|
|
|
|
|
static int _toInt(dynamic value) {
|
|
|
|
|
if (value is int) return value;
|
|
|
|
|
if (value is String) return int.tryParse(value) ?? 0;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class QueueCall {
|
|
|
|
|
final String callSid;
|
|
|
|
|
final String fromNumber;
|
|
|
|
|
final String toNumber;
|
|
|
|
|
final int position;
|
|
|
|
|
final String status;
|
|
|
|
|
final int waitTime;
|
|
|
|
|
|
|
|
|
|
QueueCall({
|
|
|
|
|
required this.callSid,
|
|
|
|
|
required this.fromNumber,
|
|
|
|
|
required this.toNumber,
|
|
|
|
|
required this.position,
|
|
|
|
|
required this.status,
|
|
|
|
|
required this.waitTime,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
factory QueueCall.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
return QueueCall(
|
2026-03-06 15:32:22 -08:00
|
|
|
callSid: (json['call_sid'] ?? '') as String,
|
|
|
|
|
fromNumber: (json['from_number'] ?? '') as String,
|
|
|
|
|
toNumber: (json['to_number'] ?? '') as String,
|
|
|
|
|
position: _toInt(json['position']),
|
|
|
|
|
status: (json['status'] ?? '') as String,
|
|
|
|
|
waitTime: _toInt(json['wait_time']),
|
Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
);
|
|
|
|
|
}
|
2026-03-06 15:32:22 -08:00
|
|
|
|
|
|
|
|
static int _toInt(dynamic value) {
|
|
|
|
|
if (value is int) return value;
|
|
|
|
|
if (value is String) return int.tryParse(value) ?? 0;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
Add TWP Softphone Flutter app and complete mobile backend API
Backend: Add /voice/token endpoint with AccessToken + VoiceGrant for
mobile VoIP, implement unhold_call() with call leg detection, wire FCM
push notifications into call queue and webhook missed call handlers,
add data-only FCM message support for Android background wake, and add
Twilio API Key / Push Credential settings fields.
Flutter app: Full softphone with Twilio Voice SDK integration, JWT auth
with auto-refresh, SSE real-time queue updates, FCM push notifications,
Material 3 UI with dashboard, active call screen, dialpad, and call
controls (mute/speaker/hold/transfer).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:01:23 -08:00
|
|
|
}
|