Skip to content

Commit 7f44ad3

Browse files
committed
Fix bug where ongoing calls would be removed from the known call ID list
Calls that lasted longer than the SMS idle time were being inadvertently purged from the call ID map, due to a failure to correctly unset the "sms only" flag on the session.
1 parent 841a33a commit 7f44ad3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/collector/sip_update_state.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636

3737
#define SIP_REDIRECT_GRACE_PERIOD 5
3838

39+
static void remove_smsonly_flag(openli_sip_worker_t *worker, char *callid) {
40+
voipcinmap_t *cid;
41+
42+
HASH_FIND(hh_callid, worker->knowncallids, callid, strlen(callid), cid);
43+
if (!cid) {
44+
return;
45+
}
46+
cid->smsonly = 0;
47+
}
48+
3949
static openli_sip_identity_t *sipid_matches_target(libtrace_list_t *targets,
4050
openli_sip_identity_t *sipid) {
4151

@@ -1183,6 +1193,7 @@ int sipworker_update_sip_state(openli_sip_worker_t *sipworker,
11831193
}
11841194
goto sipgiveup;
11851195
}
1196+
remove_smsonly_flag(sipworker, callid);
11861197
} else if (sip_is_register(sipworker->sipparser)) {
11871198
get_sip_paccess_network_info(sipworker->sipparser, &locptr, &loc_cnt);
11881199
if (( ret = process_sip_register(sipworker, callid, irimsg, pkts,

0 commit comments

Comments
 (0)