Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv23570/channels

Modified Files:
        chan_sip.c 
Log Message:
add domains documentation and rename config option


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.865
retrieving revision 1.866
diff -u -d -r1.865 -r1.866
--- chan_sip.c  26 Sep 2005 23:07:50 -0000      1.865
+++ chan_sip.c  26 Sep 2005 23:14:59 -0000      1.866
@@ -480,7 +480,7 @@
 
 static AST_LIST_HEAD_STATIC(domain_list, domain);
 
-int allow_external_invites;
+int allow_external_domains;
 
 /* sip_history: Structure for saving transactions within a SIP dialog */
 struct sip_history {
@@ -6312,7 +6312,7 @@
 
                domain_context[0] = '\0';
                if (!check_sip_domain(p->domain, domain_context, 
sizeof(domain_context))) {
-                       if (allow_external_invites && (req->method == 
SIP_INVITE || req->method == SIP_REFER)) {
+                       if (!allow_external_domains && (req->method == 
SIP_INVITE || req->method == SIP_REFER)) {
                                ast_log(LOG_DEBUG, "Got SIP %s to non-local 
domain '%s'; refusing request.\n", sip_methods[req->method].text, p->domain);
                                return -2;
                        }
@@ -7896,7 +7896,7 @@
        ast_cli(fd, "  Allow unknown access:   %s\n", global_allowguest ? "Yes" 
: "No");
        ast_cli(fd, "  Promsic. redir:         %s\n", 
ast_test_flag(&global_flags, SIP_PROMISCREDIR) ? "Yes" : "No");
        ast_cli(fd, "  SIP domain support:     %s\n", 
AST_LIST_EMPTY(&domain_list) ? "No" : "Yes");
-       ast_cli(fd, "  Call to non-local dom.: %s\n", allow_external_invites ? 
"Yes" : "No");
+       ast_cli(fd, "  Call to non-local dom.: %s\n", allow_external_domains ? 
"Yes" : "No");
        ast_cli(fd, "  URI user is phone no:   %s\n", 
ast_test_flag(&global_flags, SIP_USEREQPHONE) ? "Yes" : "No");
        ast_cli(fd, "  Our auth realm          %s\n", global_realm);
        ast_cli(fd, "  Realm. auth:            %s\n", authl ? "Yes": "No");
@@ -11902,7 +11902,7 @@
        default_language[0] = '\0';
        default_fromdomain[0] = '\0';
        default_qualify = 0;
-       allow_external_invites = 1;     /* Allow external invites */
+       allow_external_domains = 1;     /* Allow external invites */
        externhost[0] = '\0';
        externexpire = 0;
        externrefresh = 10;
@@ -12089,8 +12089,8 @@
                        ast_parse_allow_disallow(&prefs, &global_capability, 
v->value, 1);
                } else if (!strcasecmp(v->name, "disallow")) {
                        ast_parse_allow_disallow(&prefs, &global_capability, 
v->value, 0);
-               } else if (!strcasecmp(v->name, "allowexternalinvites")) {
-                       allow_external_invites = ast_true(v->value);
+               } else if (!strcasecmp(v->name, "allowexternaldomains")) {
+                       allow_external_domains = ast_true(v->value);
                } else if (!strcasecmp(v->name, "autodomain")) {
                        auto_sip_domains = ast_true(v->value);
                } else if (!strcasecmp(v->name, "domain")) {
@@ -12135,9 +12135,9 @@
                 v = v->next;
        }
 
-       if (!allow_external_invites && AST_LIST_EMPTY(&domain_list)) {
-               ast_log(LOG_WARNING, "To disallow external INVITEs, you need to 
configure local SIP domains.\n");
-               allow_external_invites = 1;
+       if (!allow_external_domains && AST_LIST_EMPTY(&domain_list)) {
+               ast_log(LOG_WARNING, "To disallow external domains, you need to 
configure local SIP domains.\n");
+               allow_external_domains = 1;
        }
        
        /* Build list of authentication to various SIP realms, i.e. service 
providers */

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to