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
8 changes: 8 additions & 0 deletions Core/Resgrid.Config/SystemBehaviorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ public static class SystemBehaviorConfig
/// </summary>
public static string ApiTokenEncryptionPassphrase = "";

/// <summary>
/// Shared key trusted monitoring must present (X-Resgrid-Health-Key header) to call
/// the deep /health/full endpoint, which runs real SQL/Redis/TTS probes and returns
/// dependency detail. Empty (the default) disables /health/full entirely; the
/// shallow /health liveness endpoint is unaffected.
/// </summary>
public static string FullHealthCheckKey = "";

/// <summary>
/// The length the API token will be valid for once a user logs into the app
/// </summary>
Expand Down
11 changes: 10 additions & 1 deletion Core/Resgrid.Config/TtsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public static class TtsConfig
public static int S3PresignedUrlExpiryMinutes = 60;
public static string S3PublicBaseUrl = "";

/// <summary>
/// When true, voice webhooks degrade to Twilio's native &lt;Say&gt; verb (billed per
/// use by Twilio) if TTS audio can't be produced in time or generation fails.
/// Default off: an unavailable prompt is skipped so a TTS outage surfaces as
/// missing audio in the call — and in the logs — rather than as extra spend.
/// </summary>
public static bool TwilioSayFallbackEnabled = false;

public static string DefaultVoice = "en-us+klatt4";
public static int DefaultSpeed = 150;
public static int MaxConcurrentGenerations = 4;
Expand Down Expand Up @@ -70,7 +78,8 @@ public static class TtsConfig
"No status selection made. Returning to the main menu.",
"Invalid staffing selection. Returning to the main menu.",
"No staffing selection made. Returning to the main menu.",
"Thank you. Your response has been recorded."
"Thank you. Your response has been recorded.",
"Please wait while we prepare your dispatch information."
});

public static int RateLimitPermitLimit = 600;
Expand Down
3 changes: 3 additions & 0 deletions Core/Resgrid.Services/DepartmentsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ public void InvalidateDepartmentUserInCache(string userId, IdentityUser user = n
await _departmentSettingsService.SaveOrUpdateSettingAsync(d.DepartmentId, dispatchCode, DepartmentSettingTypes.InternalDispatchEmail, cancellationToken);
}

// New departments get modern notification sounds enabled by default
await _departmentSettingsService.SaveOrUpdateSettingAsync(d.DepartmentId, true.ToString(), DepartmentSettingTypes.EnableModernNotifications, cancellationToken);

return d;
}

Expand Down
11 changes: 7 additions & 4 deletions Providers/Resgrid.Providers.Number/OutboundVoiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public async Task<bool> CommunicateCallAsync(string phoneNumber, UserProfile pro
var options = new CreateCallOptions(new PhoneNumber(profile.GetPhoneNumber()), new PhoneNumber(number));
options.Url = new Uri(string.Format(Config.NumberProviderConfig.TwilioVoiceCallApiUrl, profile.UserId, call.CallId));
options.Method = "GET";
options.MachineDetection = "Enable";
//options.IfMachine = "Continue";
// No machine detection: nothing consumes AnsweredBy (no AMD status
// callback endpoint exists, IfMachine handling was never enabled), so
// AMD would only add Twilio's per-call detection fee — and, in its
// synchronous form, a multi-second answer delay. The webhook fires the
// moment the call is answered and dispatch playback starts immediately;
// a voicemail simply records the dispatch prompt.

var phoneCall = await CallResource.CreateAsync(options);
return true;
Expand All @@ -52,8 +56,7 @@ public async Task<bool> CommunicateCallAsync(string phoneNumber, UserProfile pro
var options = new CreateCallOptions(new PhoneNumber(profile.GetHomePhoneNumber()), new PhoneNumber(number));
options.Url = new Uri(string.Format(Config.NumberProviderConfig.TwilioVoiceCallApiUrl, profile.UserId, call.CallId));
options.Method = "GET";
options.MachineDetection = "Enable";
//options.IfMachine = "Continue";
// No machine detection — see the mobile branch above.

var phoneCall = await CallResource.CreateAsync(options);
return true;
Expand Down
Loading
Loading