diff --git a/amethyst/src/main/AndroidManifest.xml b/amethyst/src/main/AndroidManifest.xml
index 47d037c358..36a10ab649 100644
--- a/amethyst/src/main/AndroidManifest.xml
+++ b/amethyst/src/main/AndroidManifest.xml
@@ -39,7 +39,7 @@
-
+
@@ -225,7 +225,7 @@
diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt
index 7c58e9648a..448b3fad39 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/call/CallForegroundService.kt
@@ -62,7 +62,7 @@ class CallForegroundService : Service() {
NOTIFICATION_ID,
notification,
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
- ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL
+ ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
} else {
0
},
diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt
index fd77b4d99c..8a9dd32db0 100644
--- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt
+++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/call/CallManager.kt
@@ -61,7 +61,7 @@ class CallManager(
companion object {
const val CALL_TIMEOUT_MS = 60_000L // 60 seconds ringing timeout
const val ENDED_DISPLAY_MS = 2_000L // show "call ended" briefly before resetting
- const val MAX_EVENT_AGE_SECONDS = 30L // discard signaling events older than this
+ const val MAX_EVENT_AGE_SECONDS = 20L // discard signaling events older than this
}
private fun isEventTooOld(event: Event): Boolean = TimeUtils.now() - event.createdAt > MAX_EVENT_AGE_SECONDS
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NIP-AC.md b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NIP-AC.md
index 0aab7141a1..6592d41eaf 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NIP-AC.md
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NIP-AC.md
@@ -215,7 +215,7 @@ This NIP does not mandate specific STUN or TURN servers. Clients SHOULD:
## Implementation Notes
- The `call-id` tag MUST be a UUID that is unique per call session. All signaling events for the same call share the same `call-id`.
-- Events SHOULD have short expiration times (~5 minutes) since signaling data is ephemeral and has no long-term value.
+- Events SHOULD have short expiration times (~20 seconds) since signaling data is ephemeral and has no long-term value.
- Clients SHOULD implement a ringing timeout (e.g., 60 seconds). If no answer is received, the call transitions to a "timed out" state.
- Clients SHOULD use a foreground service or equivalent mechanism to keep calls active when the app is backgrounded.
- The WebRTC `PeerConnection` SHOULD use Unified Plan SDP semantics.
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallAnswerEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallAnswerEvent.kt
index 6f9baf445f..e36619b457 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallAnswerEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallAnswerEvent.kt
@@ -48,7 +48,7 @@ class CallAnswerEvent(
companion object {
const val KIND = 25051
const val ALT_DESCRIPTION = "WebRTC call answer"
- const val EXPIRATION_SECONDS = 300L
+ const val EXPIRATION_SECONDS = 20L
fun build(
sdpAnswer: String,
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallHangupEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallHangupEvent.kt
index 46d6854baa..3251cbc5f4 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallHangupEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallHangupEvent.kt
@@ -48,7 +48,7 @@ class CallHangupEvent(
companion object {
const val KIND = 25053
const val ALT_DESCRIPTION = "WebRTC call hangup"
- const val EXPIRATION_SECONDS = 300L
+ const val EXPIRATION_SECONDS = 20L
fun build(
peerPubKey: HexKey,
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallIceCandidateEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallIceCandidateEvent.kt
index bf4e2ab478..4948110cd3 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallIceCandidateEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallIceCandidateEvent.kt
@@ -48,7 +48,7 @@ class CallIceCandidateEvent(
companion object {
const val KIND = 25052
const val ALT_DESCRIPTION = "WebRTC ICE candidate"
- const val EXPIRATION_SECONDS = 300L
+ const val EXPIRATION_SECONDS = 20L
fun build(
candidateJson: String,
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallOfferEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallOfferEvent.kt
index f63a64c1fa..71a4d94fb1 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallOfferEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallOfferEvent.kt
@@ -53,7 +53,7 @@ class CallOfferEvent(
companion object {
const val KIND = 25050
const val ALT_DESCRIPTION = "WebRTC call offer"
- const val EXPIRATION_SECONDS = 300L // 5 minutes
+ const val EXPIRATION_SECONDS = 20L
fun build(
sdpOffer: String,
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRejectEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRejectEvent.kt
index 6fb1c63bc4..f4e4a62cd8 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRejectEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRejectEvent.kt
@@ -48,7 +48,7 @@ class CallRejectEvent(
companion object {
const val KIND = 25054
const val ALT_DESCRIPTION = "WebRTC call rejection"
- const val EXPIRATION_SECONDS = 300L
+ const val EXPIRATION_SECONDS = 20L
fun build(
callerPubKey: HexKey,
diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRenegotiateEvent.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRenegotiateEvent.kt
index 8524d580d3..d4df637abe 100644
--- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRenegotiateEvent.kt
+++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/events/CallRenegotiateEvent.kt
@@ -48,7 +48,7 @@ class CallRenegotiateEvent(
companion object {
const val KIND = 25055
const val ALT_DESCRIPTION = "WebRTC call renegotiation"
- const val EXPIRATION_SECONDS = 300L
+ const val EXPIRATION_SECONDS = 20L
fun build(
sdpOffer: String,