comparison sip-manual-out/bye_in.c @ 192:f8a33603288f

sip-manual-out: generate outgoing RTP stream with PCM silence
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 17 Mar 2023 13:45:31 -0800
parents 94b5831c017f
children
comparison
equal deleted inserted replaced
191:6ac96217c442 192:f8a33603288f
12 #include "../libsip/parse.h" 12 #include "../libsip/parse.h"
13 #include "../libsip/uas_basic.h" 13 #include "../libsip/uas_basic.h"
14 #include "../libsip/out_msg.h" 14 #include "../libsip/out_msg.h"
15 15
16 extern char call_id[]; 16 extern char call_id[];
17 extern int rtp_out_enable;
17 18
18 static void 19 static void
19 bye_correct_call(req, ess, sin) 20 bye_correct_call(req, ess, sin)
20 struct sip_pkt_rx *req; 21 struct sip_pkt_rx *req;
21 struct uas_parse_hdrs *ess; 22 struct uas_parse_hdrs *ess;
23 { 24 {
24 struct sip_msg_out resp; 25 struct sip_msg_out resp;
25 int rc; 26 int rc;
26 27
27 printf("Received BYE for our call, responding with 200\n"); 28 printf("Received BYE for our call, responding with 200\n");
29 rtp_out_enable = 0;
28 start_response_out_msg(&resp, "200 OK"); 30 start_response_out_msg(&resp, "200 OK");
29 rc = add_resp_basic_headers(&resp, ess, req->req_method); 31 rc = add_resp_basic_headers(&resp, ess, req->req_method);
30 if (rc < 0) { 32 if (rc < 0) {
31 fprintf(stderr, "sending 200 response: msg length exceeded\n"); 33 fprintf(stderr, "sending 200 response: msg length exceeded\n");
32 return; 34 return;