k/registrar/config.c

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  * This file is part of SIP-router, a free SIP server.
00004  *
00005  * SIP-router is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version
00009  *
00010  * SIP-router is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  */
00020 
00028 #include "../../cfg/cfg.h"
00029 #include "../../parser/msg_parser.h" /* method types */
00030 
00031 #include "config.h"
00032 
00033 struct cfg_group_registrar      default_registrar_cfg = {
00034                 3600,   /* default_expires */
00035                 0,      /* default_expires_range */
00036                 60,     /* min_expires */
00037                 0,      /* max_expires */
00038                 0,      /* max_contacts */
00039                 0,      /* retry_after */
00040                 0,      /* case_sensitive */
00041                 Q_UNSPECIFIED,  /* default_q */
00042                 1,      /* append_branches */
00043                 STR_NULL        /* realm_pref */
00044             };
00045 
00046 void    *registrar_cfg = &default_registrar_cfg;
00047 
00048 cfg_def_t       registrar_cfg_def[] = {
00049         {"default_expires",     CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, default_expires_stats_update,
00050                 "Contains number of second to expire if no expire hf or contact expire present" },
00051         {"default_expires_range",       CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 100, 0, default_expires_range_update,
00052                 "Percent from default_expires that will be used in generating the range for the expire interval"},
00053         {"min_expires",         CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, 0,
00054                 "The minimum expires value of a Contact. Value 0 disables the checking. "},
00055         {"max_expires",         CFG_VAR_INT | CFG_CB_ONLY_ONCE, 0, 0, 0, max_expires_stats_update,
00056                 "The maximum expires value of a Contact. Value 0 disables the checking. "},
00057         {"max_contacts",        CFG_VAR_INT | CFG_ATOMIC,       0, 0, 0, 0,
00058                 "The maximum number of Contacts for an AOR. Value 0 disables the checking. "},
00059         {"retry_after",         CFG_VAR_INT | CFG_ATOMIC,       0, 0, 0, 0,
00060                 "If you want to add the Retry-After header field in 5xx replies, set this parameter to a value grater than zero"},
00061         {"case_sensitive",      CFG_VAR_INT | CFG_ATOMIC,       0, 0, 0, 0,
00062                 "If set to 1 then AOR comparison will be case sensitive. Recommended and default is 0, case insensitive"},
00063         {"default_q",           CFG_VAR_INT | CFG_ATOMIC,       -1, 1000, 0, 0,
00064                 "The parameter represents default q value for new contacts."}, /* Q_UNSPECIFIED is -1 */
00065         {"append_branches",     CFG_VAR_INT ,                   0, 0, 0, 0,
00066                 "If set to 1(default), lookup will put all contacts found in msg structure"},
00067         {"realm_pref",          CFG_VAR_STR,                    0, 0, 0, 0,
00068                 "Realm prefix to be removed. Default is \"\""},
00069         {0, 0, 0, 0, 0, 0}
00070 };