Define automatic rejection policy for phone busy subscribers

This commit is contained in:
evgeny committed 2026-10-19 14:55:55 +02:00
1 parent d4cd80d3dd
commit a2fdbb6afb
3 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ int call_busy(struct UTUN_INSTANCE* inst);
/* Продолжить исходящий вызов после предупреждения о телефонной занятости. Только uasync. */
void call_continue(struct UTUN_INSTANCE* inst, uint64_t call_id);
/* Живой статус ОС: 0=неизвестно, 1=свободен, 2=занят. Только uasync; публикует BGP при изменении. */
void call_set_phone_state(struct UTUN_INSTANCE* inst, int state, int publish, int notify);
void call_set_phone_state(struct UTUN_INSTANCE* inst, int state, int publish, int notify, int reject);
/* Флаги BGP PHONE_KNOWN/BUSY с учётом собственного обычного звонка. Только uasync. */
uint8_t call_phone_status(struct UTUN_INSTANCE* inst);
+1
View File
@@ -40,6 +40,7 @@ enum {
CALL_REASON_NO_TRAFFIC = 5,
CALL_REASON_RING_TIMEOUT = 6,
CALL_REASON_CONNECT_FAIL = 7,
CALL_REASON_PHONE_BUSY = 8, /* автоматический отказ: абонент разговаривает по телефону */
};
#pragma pack(push, 1)
+1
View File
@@ -264,6 +264,7 @@ struct UTUN_INSTANCE {
uint8_t phone_state; // 0=неизвестно, 1=свободен, 2=занят; живое состояние ОС, не сохраняется
uint8_t phone_status_hidden; // не публиковать телефонную занятость в BGP
uint8_t phone_notify_enabled; // предупреждать вызывающего о телефонной занятости
uint8_t phone_reject_enabled; // отклонять входящие при телефонной занятости; приоритетнее предупреждения
struct utun_activity_cbk_entry* activity_cbks; // подписки на смену client_activity
struct peer_sleep_cbk_entry* peer_sleep_cbks; // подписки на смену спячки пира (keepalive)