libosip  5.3.0
osip_const.h
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2020 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 #ifndef _OSIP_CONST_H_
21 #define _OSIP_CONST_H_
22 
23 #ifdef ENABLE_MPATROL
24 #include <mpatrol.h>
25 #endif
26 
27 #define OSIP_CRLF "\r\n\0"
28 #define OSIP_CR "\r\0"
29 #define OSIP_LF "\n\0"
30 #define OSIP_SP " \0"
31 
32 #define ACCEPT "accept"
33 #define ACCEPT_ENCODING "accept-encoding"
34 #define ACCEPT_LANGUAGE "accept-language"
35 #define ALERT_INFO "alert-info"
36 #define ALLOW "allow"
37 #define AUTHENTICATION_INFO "authentication-info"
38 #define AUTHORIZATION "authorization"
39 #define CALL_ID "call-id"
40 #define CALL_ID_SHORT "i"
41 #define CALL_INFO "call-info"
42 #define CONTACT "contact"
43 #define CONTACT_SHORT "m"
44 #define CONTENT_DISPOSITION "content-disposition"
45 #define CONTENT_ENCODING_SHORT "e"
46 #define CONTENT_ENCODING "content-encoding"
47 #define CONTENT_LANGUAGE "content-language"
48 #define CONTENT_LENGTH_SHORT "l"
49 #define CONTENT_LENGTH "content-length"
50 #define CONTENT_TYPE_SHORT "c"
51 #define CONTENT_TYPE "content-type"
52 #define CSEQ "cseq"
53 #define SIPDATE "date"
54 #define ERROR_INFO "error-info"
55 #define EXPIRES "expires"
56 #define FROM "from"
57 #define FROM_SHORT "f"
58 #define IN_REPLY_TO "in-reply-to"
59 #define MAX_FORWARDS "max-forwards"
60 #define MIME_VERSION "mime-version"
61 #define MIN_EXPIRES "min-expires"
62 #define ORGANIZATION "organization"
63 #define PRIORITY "priority"
64 #define PROXY_AUTHENTICATE "proxy-authenticate"
65 #define PROXY_AUTHENTICATION_INFO "proxy-authentication-info"
66 #define PROXY_AUTHORIZATION "proxy-authorization"
67 #define PROXY_REQUIRE "proxy-require"
68 #define RECORD_ROUTE "record-route"
69 #define REPLY_TO "reply-to"
70 #define REQUIRE "require"
71 #define RETRY_AFTER "retry-after"
72 #define ROUTE "route"
73 #define SERVER "server"
74 #define SUBJECT "subject"
75 #define SUBJECT_SHORT "s"
76 #define SUPPORTED "supported"
77 #define TIMESTAMP "timestamp"
78 #define TO "to"
79 #define TO_SHORT "t"
80 #define UNSUPPORTED "unsupported"
81 #define USER_AGENT "user-agent"
82 #define VIA "via"
83 #define VIA_SHORT "v"
84 #define WARNING "warning"
85 #define WWW_AUTHENTICATE "www-authenticate"
86 
87 #define RESPONSE_CODES 51
88 
89 #define SIP_TRYING 100
90 #define SIP_RINGING 180
91 #define SIP_CALL_IS_BEING_FORWARDED 181
92 #define SIP_QUEUED 182
93 #define SIP_SESSION_PROGRESS 183
94 #define SIP_OK 200
95 #define SIP_ACCEPTED 202
96 #define SIP_MULTIPLE_CHOICES 300
97 #define SIP_MOVED_PERMANENTLY 301
98 #define SIP_MOVED_TEMPORARILY 302
99 #define SIP_USE_PROXY 305
100 #define SIP_ALTERNATIVE_SERVICE 380
101 #define SIP_BAD_REQUEST 400
102 #define SIP_UNAUTHORIZED 401
103 #define SIP_PAYMENT_REQUIRED 402
104 #define SIP_FORBIDDEN 403
105 #define SIP_NOT_FOUND 404
106 #define SIP_METHOD_NOT_ALLOWED 405
107 #define SIP_406_NOT_ACCEPTABLE 406
108 #define SIP_PROXY_AUTHENTICATION_REQUIRED 407
109 #define SIP_REQUEST_TIME_OUT 408
110 #define SIP_GONE 410
111 #define SIP_REQUEST_ENTITY_TOO_LARGE 413
112 #define SIP_REQUEST_URI_TOO_LARGE 414
113 #define SIP_UNSUPPORTED_MEDIA_TYPE 415
114 #define SIP_UNSUPPORTED_URI_SCHEME 416
115 #define SIP_BAD_EXTENSION 420
116 #define SIP_EXTENSION_REQUIRED 421
117 #define SIP_INTERVAL_TOO_BRIEF 423
118 #define SIP_TEMPORARILY_UNAVAILABLE 480
119 #define SIP_CALL_TRANSACTION_DOES_NOT_EXIST 481
120 #define SIP_LOOP_DETECTED 482
121 #define SIP_TOO_MANY_HOPS 483
122 #define SIP_ADDRESS_INCOMPLETE 484
123 #define SIP_AMBIGUOUS 485
124 #define SIP_BUSY_HERE 486
125 #define SIP_REQUEST_TERMINATED 487
126 #define SIP_NOT_ACCEPTABLE_HERE 488
127 #define SIP_BAD_EVENT 489
128 #define SIP_REQUEST_PENDING 491
129 #define SIP_UNDECIPHERABLE 493
130 #define SIP_INTERNAL_SERVER_ERROR 500
131 #define SIP_NOT_IMPLEMENTED 501
132 #define SIP_BAD_GATEWAY 502
133 #define SIP_SERVICE_UNAVAILABLE 503
134 #define SIP_SERVER_TIME_OUT 504
135 #define SIP_VERSION_NOT_SUPPORTED 505
136 #define SIP_MESSAGE_TOO_LARGE 513
137 #define SIP_BUSY_EVRYWHERE 600
138 #define SIP_DECLINE 603
139 #define SIP_DOES_NOT_EXIST_ANYWHERE 604
140 #define SIP_606_NOT_ACCEPTABLE 606
141 
143 #define OSIP_IS_SIP_INFO(x) (((x) >= 100) && ((x) < 200))
145 #define OSIP_IS_SIP_SUCCESS(x) (((x) >= 200) && ((x) < 300))
147 #define OSIP_IS_SIP_REDIRECT(x) (((x) >= 300) && ((x) < 400))
149 #define OSIP_IS_SIP_ERROR(x) (((x) >= 400) && ((x) < 600))
151 #define OSIP_IS_SIP_CLIENT_ERROR(x) (((x) >= 400) && ((x) < 500))
153 #define OSIP_IS_SIP_SERVER_ERROR(x) (((x) >= 500) && ((x) < 600))
154 
155 #endif /* _CONST_H_ */