Define acknowledged call termination and enable route tracing

This commit is contained in:
evgeny committed 2026-10-15 12:18:47 +02:00
1 parent 59fb020711
commit 3f41676a3d
3 files changed
+7 -1

No files matched your search

+2
View File
@@ -11,6 +11,8 @@ struct call_session {
struct ll_entry ll;
uint64_t call_id, group_id, peer_node_id;
uint8_t role, state, reason;
uint8_t end_subcmd;
uint64_t end_started_tb;
struct call_ctx *ctx;
struct CONN_MGR_HANDLE *cm_handle;
void *ring_timer, *invite_timer;
+4
View File
@@ -21,6 +21,7 @@ enum {
CALL_SUBCMD_BUSY = 0x05, /* {call_id:8} */
CALL_SUBCMD_CANCEL = 0x06, /* {call_id:8} */
CALL_SUBCMD_HANGUP = 0x07, /* {call_id:8, reason:1} */
CALL_SUBCMD_END_ACK = 0x08, /* {call_id:8}: подтверждение HANGUP/CANCEL/DECLINE */
CALL_SUBCMD_MEDIA = 0x10, /* call_pkt_media + payload[] */
};
@@ -64,6 +65,7 @@ struct call_pkt_decline { uint8_t subcmd; uint64_t call_id; uint8_t reason; };
struct call_pkt_busy { uint8_t subcmd; uint64_t call_id; };
struct call_pkt_cancel { uint8_t subcmd; uint64_t call_id; };
struct call_pkt_hangup { uint8_t subcmd; uint64_t call_id; uint8_t reason; };
struct call_pkt_end_ack { uint8_t subcmd; uint64_t call_id; };
struct call_pkt_media {
uint8_t subcmd; /* CALL_SUBCMD_MEDIA */
@@ -93,6 +95,8 @@ struct call_pkt_media {
#define CALL_NO_ROUTE_MAX_STRIKES 20 /* 20 × 300мс ≈ 6с без маршрута → fail-fast CONNECT_FAIL */
#define CALL_NO_TRAFFIC_TB 200000 /* 20с — нет входящих медиа → HANGUP */
#define CALL_TEARDOWN_DELAY_TB 5000 /* 500мс — задержка разрыва conn_mgr после завершения */
#define CALL_END_RETRY_TB 3000 /* 300мс — повтор финальной команды до END_ACK */
#define CALL_END_TIMEOUT_TB 200000 /* 20с — предел удержания завершённой сессии без END_ACK */
#define CALL_MAX_TX_FRAMES 750 /* 15с: 10с перебоя + 5с запаса */
#ifdef __cplusplus