Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

config.h

Go to the documentation of this file.
00001 /*
00002  *  $Id: config.h,v 1.79 2009/01/04 14:52:42 bpintea Exp $
00003  *
00004  * Copyright (C) 2001-2003 FhG Fokus
00005  *
00006  * This file is part of ser, a free SIP server.
00007  *
00008  * ser is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version
00012  *
00013  * For a license to use the ser software under conditions
00014  * other than those described here, or to purchase support for this
00015  * software, please contact iptel.org by e-mail at the following addresses:
00016  *    info@iptel.org
00017  *
00018  * ser is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License 
00024  * along with this program; if not, write to the Free Software 
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  * History:
00028  * --------
00029  * 2003-04-05  DEFAULT_*_URL introduced (jiri)
00030  * 2003-07-04  fixed SRV lookup prefix for TLS/sips (andrei)
00031  * 2005-04-25  MAX_BRANCH_PARAM_LEN too small, fixed (andrei)
00032  *
00033  */
00034 
00035 
00036 
00037 
00038 #ifndef config_h
00039 #define config_h
00040 
00041 #include "types.h"
00042 
00043 /* default sip port if none specified */
00044 #define SIP_PORT  5060
00045 #define SIPS_PORT 5061
00046 
00047 #define CFG_FILE CFG_DIR "ser.cfg"
00048 
00049 #define TLS_PKEY_FILE "cert.pem" 
00050 #define TLS_CERT_FILE "cert.pem"
00051 #define TLS_CA_FILE 0 /* no CA list file by default */
00052 
00053 
00054 /* maximum number of addresses on which we will listen */
00055 #define MAX_LISTEN 16
00056 
00057 /* default number of child processes started */
00058 #define CHILD_NO    8
00059 
00060 #define RT_NO 2 /* routing tables number */
00061 #define FAILURE_RT_NO RT_NO /* on_failure routing tables number */
00062 #define ONREPLY_RT_NO RT_NO /* on_reply routing tables number */
00063 #define BRANCH_RT_NO RT_NO /* branch_route routing tables number */
00064 #define ONSEND_RT_NO 1  /* onsend_route routing tables number */
00065 #define DEFAULT_RT 0 /* default routing table */
00066 
00067 #define MAX_REC_LEV 100 /* maximum number of recursive calls */
00068 #define ROUTE_MAX_REC_LEV 100 /* maximum number of recursive calls
00069                                                            for route()*/
00070 
00071 #define MAX_URI_SIZE 1024       /* used when rewriting URIs */
00072 
00073 #define MY_VIA "Via: SIP/2.0/UDP "
00074 #define MY_VIA_LEN (sizeof(MY_VIA) - 1)
00075 
00076 #define ROUTE_PREFIX "Route: "
00077 #define ROUTE_PREFIX_LEN (sizeof(ROUTE_PREFIX) - 1)
00078 
00079 #define ROUTE_SEPARATOR ", "
00080 #define ROUTE_SEPARATOR_LEN (sizeof(ROUTE_SEPARATOR) - 1)
00081 
00082 #define CONTENT_LENGTH "Content-Length: "
00083 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
00084 
00085 #define USER_AGENT "User-Agent: Sip EXpress router"\
00086                 "(" VERSION " (" ARCH "/" OS_QUOTED "))"
00087 #define USER_AGENT_LEN (sizeof(USER_AGENT)-1)
00088 
00089 #define SERVER_HDR "Server: Sip EXpress router "\
00090                 "(" VERSION " (" ARCH "/" OS_QUOTED "))"
00091 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
00092 
00093 #define MAX_WARNING_LEN  256
00094                 
00095 #define MY_BRANCH ";branch="
00096 #define MY_BRANCH_LEN (sizeof(MY_BRANCH) - 1)
00097 
00098 #define MAX_PORT_LEN 7 /* ':' + max 5 letters + \0 */
00099 #define CRLF "\r\n"
00100 #define CRLF_LEN (sizeof(CRLF) - 1)
00101 
00102 #define RECEIVED        ";received="
00103 #define RECEIVED_LEN (sizeof(RECEIVED) - 1)
00104 
00105 #define TRANSPORT_PARAM ";transport="
00106 #define TRANSPORT_PARAM_LEN (sizeof(TRANSPORT_PARAM) - 1)
00107 
00108 #define COMP_PARAM ";comp="
00109 #define COMP_PARAM_LEN (sizeof(COMP_PARAM)-1)
00110 
00111 #define SIGCOMP_NAME "sigcomp"
00112 #define SIGCOMP_NAME_LEN (sizeof(SIGCOMP_NAME)-1)
00113 
00114 #define SERGZ_NAME "sergz"
00115 #define SERGZ_NAME_LEN (sizeof(SERGZ_NAME)-1)
00116 
00117 #define TOTAG_TOKEN ";tag="
00118 #define TOTAG_TOKEN_LEN (sizeof(TOTAG_TOKEN)-1)
00119 
00120 #define RPORT ";rport="
00121 #define RPORT_LEN (sizeof(RPORT) - 1)
00122 
00123 #define ID_PARAM ";i="
00124 #define ID_PARAM_LEN (sizeof(ID_PARAM) - 1)
00125 
00126 #define SRV_UDP_PREFIX "_sip._udp."
00127 #define SRV_UDP_PREFIX_LEN (sizeof(SRV_UDP_PREFIX) - 1)
00128 
00129 #define SRV_TCP_PREFIX "_sip._tcp."
00130 #define SRV_TCP_PREFIX_LEN (sizeof(SRV_TCP_PREFIX) - 1)
00131 
00132 #define SRV_TLS_PREFIX "_sips._tcp."
00133 #define SRV_TLS_PREFIX_LEN (sizeof(SRV_TLS_PREFIX) - 1)
00134 
00135 #define SRV_SCTP_PREFIX "_sip._sctp."
00136 #define SRV_SCTP_PREFIX_LEN (sizeof(SRV_SCTP_PREFIX) - 1)
00137 
00138 #define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN
00139 
00140 /*used only if PKG_MALLOC is defined*/
00141 #define PKG_MEM_POOL_SIZE 4*1024*1024
00142 
00143 /*used if SH_MEM is defined*/
00144 #define SHM_MEM_SIZE 32
00145 
00146 
00147 /* dimensioning buckets in q_malloc */
00148 /* size of the size2bucket table; everything beyond that asks for
00149    a variable-size kilo-bucket
00150  */
00151 #define MAX_FIXED_BLOCK         3072
00152 /* distance of kilo-buckets */
00153 #define BLOCK_STEP                      512
00154 /* maximum number of possible buckets */
00155 #define MAX_BUCKET              15
00156 
00157 /* receive buffer size -- preferably set low to
00158    avoid terror of excessively huge messages; they are
00159    useless anyway
00160 */
00161 #define BUF_SIZE 65535
00162 
00163 /* forwarding  -- Via buffer dimensioning */
00164 #define MAX_VIA_LINE_SIZE       240
00165 #define MAX_RECEIVED_SIZE       57
00166 #define MAX_RPORT_SIZE          13
00167 
00168 /* maximum number of branches per transaction */
00169 #define MAX_BRANCHES    12
00170 
00171 /* max length of the text of fifo 'print' command */
00172 #define MAX_PRINT_TEXT 256
00173 
00174 /* maximum length of Contact header field in redirection replies */
00175 #define MAX_REDIRECTION_LEN 512
00176 
00177 /* used by FIFO statistics in module to terminate line;
00178    extra whitespaces are used to overwrite remainders of
00179    previous line if longer than current one
00180 */
00181 #define CLEANUP_EOL "      \n"
00182 
00183 /* magic cookie for transaction matching as defined in RFC3261 */
00184 #define MCOOKIE "z9hG4bK"
00185 #define MCOOKIE_LEN (sizeof(MCOOKIE)-1)
00186 /* Maximum length of values appended to Via-branch parameter */
00187 #define MAX_BRANCH_PARAM_LEN  (MCOOKIE_LEN+8 /*int2hex*/ + 1 /*sep*/ + \
00188                                                                 MD5_LEN /* max(int2hex, MD5_LEN) */ \
00189                                                                 + 1 /*sep*/ + 8 /*int2hex*/ + \
00190                                                                 1 /*extra space, needed by t_calc_branch*/)
00191 
00192 #define DEFAULT_SER_KILL_TIMEOUT 60 /* seconds */
00193 
00194 /* maximum path length */
00195 #define PATH_MAX_GUESS  1024
00196 
00197 #define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser"
00198 #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1)
00199 
00200 #define DEFAULT_RODB_URL "mysql://serro:47serro11@localhost/ser"
00201 #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1)
00202 
00203 /* table holding versions of other ser tables */
00204 #define VERSION_TABLE "version"
00205 #define VERSION_COLUMN "table_version"
00206 #define TABLENAME_COLUMN "table_name"
00207 
00208 /* minimum packet size; smaller packets will be dropped silently */
00209 #define MIN_UDP_PACKET        32
00210 
00211 #define MIN_SCTP_PACKET  MIN_UDP_PACKET 
00212 
00213 #define DEFAULT_RADIUS_CONFIG "/usr/local/etc/radiusclient/radiusclient.conf"
00214 
00215 #define DEFAULT_DID "_default"
00216 
00217 #endif

Generated on Thu Sep 9 04:15:41 2010 for SIPExpressRouter by  doxygen 1.3.9.1