config.h
e60a9728
 /*
4bd1673d
  *  $Id$
7dd0b342
  *
  * Copyright (C) 2001-2003 Fhg Fokus
  *
  * This file is part of ser, a free SIP server.
  *
  * ser is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
  * For a license to use the ser software under conditions
  * other than those described here, or to purchase support for this
  * software, please contact iptel.org by e-mail at the following addresses:
  *    info@iptel.org
  *
  * ser is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
c7489e45
  *
  * History:
  * --------
  * 2003-04-05 DEFAULT_*_URL introduced (jiri)
e60a9728
  */
 
 
 
7dd0b342
 
e60a9728
 #ifndef config_h
 #define config_h
 
4bd1673d
 #include "types.h"
 
e60a9728
 /* default sip port if none specified */
 #define SIP_PORT 5060
 
054cb6cf
 #define CFG_FILE CFG_DIR "ser.cfg"
e60a9728
 
 
1b1b19d8
 /* maximum number of addresses on which we will listen */
 #define MAX_LISTEN 16
 
 /* default number of child processes started */
 #define CHILD_NO    8
 
a15c363f
 #define RT_NO 10 /* routing tables number */
87405423
 #define FAILURE_RT_NO RT_NO /* on_failure routing tables number */
 #define ONREPLY_RT_NO RT_NO /* on_reply routing tables number */
3e429f5c
 #define DEFAULT_RT 0 /* default routing table */
a15c363f
 
 #define MAX_REC_LEV 100 /* maximum number of recursive calls */
0c5da34b
 #define ROUTE_MAX_REC_LEV 100 /* maximum number of recursive calls
3e429f5c
 							   for route()*/
a15c363f
 
7268726e
 #define MAX_URI_SIZE 1024	/* used when rewriting URIs */
 
b2e71d5b
 #define MY_VIA "Via: SIP/2.0/UDP "
 #define MY_VIA_LEN 17
 
82802743
 #define CONTENT_LENGTH "Content-Length: "
 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
af64f4fb
 
5655ca6f
 #define USER_AGENT "User-Agent: Sip EXpress router"\
5e39b907
 		"(" VERSION " (" ARCH "/" OS"))"
 #define USER_AGENT_LEN (sizeof(USER_AGENT)-1)
5655ca6f
 
4bb83e70
 #define SERVER_HDR "Server: Sip EXpress router "\
5e39b907
 		"(" VERSION " (" ARCH "/" OS"))"
 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
 
 #define MAX_WARNING_LEN  256
 		
caf80ae6
 #define MY_BRANCH ";branch="
 #define MY_BRANCH_LEN 8
676eb608
 
b2e71d5b
 
 #define MAX_PORT_LEN 7 /* ':' + max 5 letters + \0 */
 #define CRLF "\r\n"
 #define CRLF_LEN 2
 
c55adae8
 #define RECEIVED        ";received="
b2e71d5b
 #define RECEIVED_LEN 10
 
c55adae8
 #define TRANSPORT_PARAM ";transport="
 #define TRANSPORT_PARAM_LEN 11
 
2c60a4c3
 #define TOTAG_TOKEN ";tag="
 #define TOTAG_TOKEN_LEN (sizeof(TOTAG_TOKEN)-1)
814bd485
 
09f7cd2c
 #define RPORT ";rport="
 #define RPORT_LEN 7
 
e1e6c914
 #define ID_PARAM ";i="
 #define ID_PARAM_LEN 3
 
d531a5d5
 #define SRV_UDP_PREFIX "_sip._udp."
 #define SRV_TCP_PREFIX "_sip._tcp."
1b71270a
 #define SRV_PREFIX_LEN 10
 
22d4aa5d
 /*used only if PKG_MALLOC is defined*/
 #define PKG_MEM_POOL_SIZE 1024*1024
 
dda9dab1
 /*used if SH_MEM is defined*/
cef58030
 #define SHM_MEM_SIZE 32
628e3a5a
 
cd57180a
 #define TIMER_TICK 1
 
dda9dab1
 /* dimensioning buckets in q_malloc */
 /* size of the size2bucket table; everything beyond that asks for
    a variable-size kilo-bucket
  */
 #define MAX_FIXED_BLOCK         3072
 /* distance of kilo-buckets */
 #define BLOCK_STEP                      512
 /* maximum number of possible buckets */
 #define MAX_BUCKET		15
 
 /* receive buffer size -- preferably set low to
4bd1673d
    avoid terror of excessively huge messages; they are
    useless anyway
dda9dab1
 */
bbed656b
 #define BUF_SIZE 65535
dda9dab1
 
4bd1673d
 /* forwarding  -- Via buffer dimensioning */
dda9dab1
 #define MAX_VIA_LINE_SIZE	240
 #define MAX_RECEIVED_SIZE	57
09f7cd2c
 #define MAX_RPORT_SIZE		13
b2e71d5b
 
caf80ae6
 /* maximum number of branches per transaction */
 #define MAX_BRANCHES    4
4bd1673d
 
caf80ae6
 /* maximum length of a FIFO server command */
 #define MAX_FIFO_COMMAND 512
 
 /* buffer dimensions for FIFO server */
 #define MAX_CONSUME_BUFFER 1024
 /* where reply pipes may be opened */
 #define FIFO_DIR "/tmp/"
c55b0dfd
 #define FIFO_DIR_LEN 5
caf80ae6
 /* max length of the text of fifo 'print' command */
 #define MAX_PRINT_TEXT 256
fcefd3f4
 
 /* maximum length of Contact heder field in redirection replies */
 #define MAX_REDIRECTION_LEN 512
cafca31b
 
 /* used by FIFO statistics in module to terminate line;
    extra whitespaces are used to overwrite remainders of
    previous line if longer than current one
 */
 #define CLEANUP_EOL "      \n"
 
1c507b72
 /* how patient is ser with FIFO clients not awaiting a reply? 
 	4 x 80ms = 0.32 sec
 */
 #define FIFO_REPLY_RETRIES	4
 #define FIFO_REPLY_WAIT		80000
 
7958eeae
 /* magic cookie for transaction matching as defined in RFC3261 */
 #define MCOOKIE "z9hG4bK"
 #define MCOOKIE_LEN (sizeof(MCOOKIE)-1)
 /* Maximum length of values appended to Via-branch parameter */
 #define MAX_BRANCH_PARAM_LEN  (MCOOKIE_LEN+48)
 
 
049f64c2
 /* maximum path length */
 #define PATH_MAX_GUESS	1024
 
c7489e45
 #define DEFAULT_DB_URL "sql://ser:heslo@localhost/ser"
 #define DEFAULT_RODB_URL "sql://serro:47serro11@localhost/ser"
 
049f64c2
 
e60a9728
 #endif