FreeCalypso > hg > themwi-system-sw
annotate libutil/mncc_debug.c @ 112:6aa63cf4620a
sip-in call clearing: select timeout implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 28 Sep 2022 18:59:55 -0800 |
parents | 660126bd5f59 |
children |
rev | line source |
---|---|
28
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* MNCC debug functions */ |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 #include <sys/types.h> |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 #include <sys/socket.h> |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <stdio.h> |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdint.h> |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include "../include/mncc.h" |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 char * |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 mncc_msg_name(msgtype) |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 { |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 static char buf[32]; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 switch (msgtype) { |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 case MNCC_SETUP_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 return "MNCC_SETUP_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 case MNCC_SETUP_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 return "MNCC_SETUP_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 case MNCC_SETUP_RSP: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 return "MNCC_SETUP_RSP"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 case MNCC_SETUP_CNF: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 return "MNCC_SETUP_CNF"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 case MNCC_SETUP_COMPL_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 return "MNCC_SETUP_COMPL_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 case MNCC_SETUP_COMPL_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 return "MNCC_SETUP_COMPL_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 case MNCC_CALL_CONF_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 return "MNCC_CALL_CONF_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 case MNCC_CALL_PROC_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 return "MNCC_CALL_PROC_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 case MNCC_PROGRESS_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 return "MNCC_PROGRESS_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 case MNCC_ALERT_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 return "MNCC_ALERT_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 case MNCC_ALERT_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 return "MNCC_ALERT_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 case MNCC_NOTIFY_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 return "MNCC_NOTIFY_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 case MNCC_NOTIFY_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 return "MNCC_NOTIFY_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 case MNCC_DISC_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 return "MNCC_DISC_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 case MNCC_DISC_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 return "MNCC_DISC_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 case MNCC_REL_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 return "MNCC_REL_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 case MNCC_REL_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 return "MNCC_REL_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 case MNCC_REL_CNF: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 return "MNCC_REL_CNF"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 case MNCC_FACILITY_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 return "MNCC_FACILITY_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 case MNCC_FACILITY_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 return "MNCC_FACILITY_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 case MNCC_START_DTMF_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 return "MNCC_START_DTMF_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 case MNCC_START_DTMF_RSP: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 return "MNCC_START_DTMF_RSP"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 case MNCC_START_DTMF_REJ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 return "MNCC_START_DTMF_REJ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 case MNCC_STOP_DTMF_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 return "MNCC_STOP_DTMF_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 case MNCC_STOP_DTMF_RSP: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 return "MNCC_STOP_DTMF_RSP"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 case MNCC_MODIFY_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 return "MNCC_MODIFY_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 case MNCC_MODIFY_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 return "MNCC_MODIFY_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 case MNCC_MODIFY_RSP: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 return "MNCC_MODIFY_RSP"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 case MNCC_MODIFY_CNF: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 return "MNCC_MODIFY_CNF"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 case MNCC_MODIFY_REJ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 return "MNCC_MODIFY_REJ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 case MNCC_HOLD_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 return "MNCC_HOLD_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 case MNCC_HOLD_CNF: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 return "MNCC_HOLD_CNF"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 case MNCC_HOLD_REJ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 return "MNCC_HOLD_REJ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 case MNCC_RETRIEVE_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 return "MNCC_RETRIEVE_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 case MNCC_RETRIEVE_CNF: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 return "MNCC_RETRIEVE_CNF"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 case MNCC_RETRIEVE_REJ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 return "MNCC_RETRIEVE_REJ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 case MNCC_USERINFO_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 return "MNCC_USERINFO_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 case MNCC_USERINFO_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 return "MNCC_USERINFO_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 case MNCC_REJ_REQ: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 return "MNCC_REJ_REQ"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 case MNCC_REJ_IND: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 return "MNCC_REJ_IND"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 case MNCC_BRIDGE: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 return "MNCC_BRIDGE"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 case MNCC_RTP_CREATE: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 return "MNCC_RTP_CREATE"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 case MNCC_RTP_CONNECT: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 return "MNCC_RTP_CONNECT"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 case MNCC_RTP_FREE: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 return "MNCC_RTP_FREE"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 case MNCC_SOCKET_HELLO: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 return "MNCC_SOCKET_HELLO"; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 default: |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 sprintf(buf, "MNCC msgtype 0x%x", msgtype); |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 return buf; |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 } |
660126bd5f59
themwi-mncc: fix one bug, add debug syslog output
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 } |