Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.626 diff -u -r1.626 chan_sip.c --- channels/chan_sip.c 10 Jan 2005 19:58:35 -0000 1.626 +++ channels/chan_sip.c 11 Jan 2005 14:49:27 -0000 @@ -164,7 +164,7 @@ static int apeerobjs = 0; static int regobjs = 0; -static int global_allowguest = 0; /* allow unathuncated peers to connect? */ +static int global_allowguest = 0; /* allow unauthenticated users/peers to connect? */ #define DEFAULT_MWITIME 10 static int global_mwitime = DEFAULT_MWITIME; /* Time between MWI checks for peers */ @@ -209,7 +209,8 @@ static int recordhistory = 0; /* Record SIP history. Off by default */ static char global_musicclass[MAX_LANGUAGE] = ""; /* Global music on hold class */ -static char global_realm[AST_MAX_EXTENSION] = "asterisk"; /* Default realm */ +#define DEFAULT_REALM "asterisk" +static char global_realm[AST_MAX_EXTENSION] = DEFAULT_REALM; /* Default realm */ static char regcontext[AST_MAX_EXTENSION] = ""; /* Context for auto-extensions */ /* Expire slowly */ @@ -285,7 +286,7 @@ #define SIP_NAT_ALWAYS (3 << 18) /* re-INVITE related settings */ #define SIP_REINVITE (3 << 20) /* two bits used */ -#define SIP_CAN_REINVITE (1 << 20) /* allow peers to be reinvited to send media directly to us */ +#define SIP_CAN_REINVITE (1 << 20) /* allow peers to be reinvited to send media directly p2p */ #define SIP_REINVITE_UPDATE (2 << 20) /* use UPDATE (RFC3311) when reinviting this peer */ /* "insecure" settings */ #define SIP_INSECURE (3 << 22) /* three settings, uses two bits */ @@ -8890,7 +8891,7 @@ } else if (!strcasecmp(v->name, "mask")) { maskfound++; inet_aton(v->value, &peer->mask); - } else if (!strcasecmp(v->name, "port")) { + } else if (!strcasecmp(v->name, "port") || !strcasecmp(v-name, "bindport") { if (!realtime && ast_test_flag(peer, SIP_DYNAMIC)) peer->defaddr.sin_port = htons(atoi(v->value)); else @@ -9011,7 +9012,7 @@ externrefresh = 10; strncpy(default_useragent, DEFAULT_USERAGENT, sizeof(default_useragent) - 1); strncpy(default_notifymime, DEFAULT_NOTIFYMIME, sizeof(default_notifymime) - 1); - global_realm[sizeof(global_realm)-1] = '\0'; + strncpy(global_realm, DEFAULT_REALM, sizeof(global_realm) - 1); strncpy(global_musicclass, "default", sizeof(global_musicclass) - 1); strncpy(default_callerid, DEFAULT_CALLERID, sizeof(default_callerid) - 1); memset(&outboundproxyip, 0, sizeof(outboundproxyip)); @@ -9085,7 +9086,7 @@ compactheaders = ast_true(v->value); } else if (!strcasecmp(v->name, "notifymimetype")) { strncpy(default_notifymime, v->value, sizeof(default_notifymime) - 1); - } else if (!strcasecmp(v->name, "musicclass")) { + } else if (!strcasecmp(v->name, "musicclass") || !strcasecmp(v->name, "musiconhold") { strncpy(global_musicclass, v->value, sizeof(global_musicclass) - 1); } else if (!strcasecmp(v->name, "language")) { strncpy(default_language, v->value, sizeof(default_language)-1); Index: configs/sip.conf.sample =================================================================== RCS file: /usr/cvsroot/asterisk/configs/sip.conf.sample,v retrieving revision 1.53 diff -u -r1.53 sip.conf.sample --- configs/sip.conf.sample 9 Jan 2005 18:05:41 -0000 1.53 +++ configs/sip.conf.sample 11 Jan 2005 14:49:27 -0000 @@ -24,13 +24,11 @@ context=default ; Default context for incoming calls ;allowguest=no ; Allow or reject guest calls (default is yes, this can also be set to 'osp' ; if asterisk was compiled with OSP support. -;recordhistory=yes ; Record SIP history by default - ; (see sip history / sip no history) ;realm=mydomain.tld ; Realm for digest authentication ; defaults to "asterisk" ; Realms MUST be globally unique according to RFC 3261 ; Set this to your host name or domain name -port=5060 ; UDP Port to bind to (SIP standard port is 5060) +bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls ; Note: Asterisk only uses the first host @@ -49,6 +47,8 @@ ;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY ;checkmwi=10 ; Default time between mailbox checks for peers ;videosupport=yes ; Turn on support for SIP video +;recordhistory=yes ; Record SIP history by default + ; (see sip history / sip no history) ;disallow=all ; First disallow all codecs ;allow=ulaw ; Allow codecs in order of preference