changeset 113:bfc97065bf51

sip-in: syslog beginning and clearing of calls
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 28 Sep 2022 19:08:13 -0800
parents 6aa63cf4620a
children a30c25fb4c2f
files sip-in/call.h sip-in/call_clear.c sip-in/invite.c
diffstat 3 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sip-in/call.h	Wed Sep 28 18:59:55 2022 -0800
+++ b/sip-in/call.h	Wed Sep 28 19:08:13 2022 -0800
@@ -19,6 +19,7 @@
 	char		*from_user;
 	unsigned	from_user_len;
 	int		use_100rel;
+	unsigned	in_tag_num;
 	/* PSTN side RTP info */
 	struct sockaddr_in pstn_rtp_local;
 	struct sockaddr_in pstn_rtp_remote;
--- a/sip-in/call_clear.c	Wed Sep 28 18:59:55 2022 -0800
+++ b/sip-in/call_clear.c	Wed Sep 28 19:08:13 2022 -0800
@@ -55,6 +55,8 @@
 		if (call->overall_state == OVERALL_STATE_DEAD_SIP &&
 		    call->sip_clear_time >= cur_event_time.tv_sec) {
 			*pp = call->next;
+			syslog(LOG_INFO, "call in%06u cleared",
+				call->in_tag_num);
 			free(call);
 			continue;
 		}
--- a/sip-in/invite.c	Wed Sep 28 18:59:55 2022 -0800
+++ b/sip-in/invite.c	Wed Sep 28 19:08:13 2022 -0800
@@ -298,6 +298,7 @@
 	call->pstn_rtp_remote.sin_addr = sdp_parse.ip_addr;
 	call->pstn_rtp_remote.sin_port = htons(sdp_parse.audio_port);
 	call->use_pcma = use_pcma;
+	call->in_tag_num = cycle_tag_num;
 	call->sdp_addend = cycle_sdp_addend;
 	/* generate 100 response */
 	start_response_out_msg(&resp, "100 Proceeding");
@@ -312,6 +313,7 @@
 	/* add to call list */
 	call->next = call_list;
 	call_list = call;
+	syslog(LOG_INFO, "call in%06u started", call->in_tag_num);
 	/* send CRCX to TMGW */
 	tmgw_send_crcx(call);
 	call->overall_state = OVERALL_STATE_CRCX;