comparison sip-in/sip_uas.c @ 80:a9944b66dcc5

sip-in: handle incoming BYE
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 20 Sep 2022 19:35:34 -0800
parents b0df2b200d77
children 0d6435808bcd
comparison
equal deleted inserted replaced
79:b0df2b200d77 80:a9944b66dcc5
11 #include <strings.h> 11 #include <strings.h>
12 #include <syslog.h> 12 #include <syslog.h>
13 #include "../libsip/parse.h" 13 #include "../libsip/parse.h"
14 #include "../libsip/uas_basic.h" 14 #include "../libsip/uas_basic.h"
15 #include "../libsip/out_msg.h" 15 #include "../libsip/out_msg.h"
16
17 static void
18 method_tbi(req, ess, sin)
19 struct sip_pkt_rx *req;
20 struct uas_parse_hdrs *ess;
21 struct sockaddr_in *sin;
22 {
23 syslog(LOG_ERR, "SIP method %s remains to be implemented",
24 req->req_method);
25 }
26 16
27 static void 17 static void
28 unsupported_method(req, ess, sin) 18 unsupported_method(req, ess, sin)
29 struct sip_pkt_rx *req; 19 struct sip_pkt_rx *req;
30 struct uas_parse_hdrs *ess; 20 struct uas_parse_hdrs *ess;
66 else if (!strcmp(msg->req_method, "ACK")) 56 else if (!strcmp(msg->req_method, "ACK"))
67 handle_sip_ack(msg, &ess, sin); 57 handle_sip_ack(msg, &ess, sin);
68 else if (!strcmp(msg->req_method, "CANCEL")) 58 else if (!strcmp(msg->req_method, "CANCEL"))
69 handle_sip_cancel(msg, &ess, sin); 59 handle_sip_cancel(msg, &ess, sin);
70 else if (!strcmp(msg->req_method, "BYE")) 60 else if (!strcmp(msg->req_method, "BYE"))
71 method_tbi(msg, &ess, sin); 61 handle_sip_bye(msg, &ess, sin);
72 else 62 else
73 unsupported_method(msg, &ess, sin); 63 unsupported_method(msg, &ess, sin);
74 } 64 }