# HG changeset patch # User Mychaela Falconia # Date 1680487530 28800 # Node ID f3164f732b845b20bae3d53864d21e5d615ea74a # Parent d3c99b41fb043a3086bcd0a5a393ec275ef4572d sip-manual-out: add tfo-stop command diff -r d3c99b41fb04 -r f3164f732b84 sip-manual-out/rtp_tx.c --- a/sip-manual-out/rtp_tx.c Sun Apr 02 18:01:34 2023 -0800 +++ b/sip-manual-out/rtp_tx.c Sun Apr 02 18:05:30 2023 -0800 @@ -27,6 +27,7 @@ static uint16_t tfo_fill_buf[9], tfo_req_buf[7]; static uint16_t *is_out_ptr; static unsigned is_out_count; +static int tfo_stop_req; void assign_rtpout_ssrc() @@ -81,7 +82,7 @@ if (is_out_count) { insert_is_msg(pkt.payload, *is_out_ptr++); is_out_count--; - if (!is_out_count) { + if (!is_out_count && !tfo_stop_req) { is_out_ptr = tfo_req_buf; is_out_count = 7; } @@ -103,4 +104,11 @@ encode_tfo_ext_words(sig, codec, 0, tfo_req_buf + 5); is_out_ptr = tfo_fill_buf; is_out_count = 9; + tfo_stop_req = 0; } + +void +stop_tfo_out() +{ + tfo_stop_req = 1; +} diff -r d3c99b41fb04 -r f3164f732b84 sip-manual-out/user_cmd.c --- a/sip-manual-out/user_cmd.c Sun Apr 02 18:01:34 2023 -0800 +++ b/sip-manual-out/user_cmd.c Sun Apr 02 18:05:30 2023 -0800 @@ -69,6 +69,8 @@ send_cancel_req(); else if (!strncmp(cp, "tfo-req", 7) && isspace(cp[7])) tfo_req_cmd(cp + 8); + else if (!strcmp(cp, "tfo-stop")) + stop_tfo_out(); else fprintf(stderr, "error: non-understood stdin command\n"); }