[Asterisk-Dev] Setting "Digest realm"

Greg Boehnlein damin at nacs.net
Sun Aug 15 07:51:24 MST 2004


Hello,
	In a discussion on IRC, Justinnnn was talking about setting the 
Digest Realm in sip packets. As a result, he created the following patch:

--- chan_sip.c.orig     Mon Aug 16 00:41:02 2004
+++ chan_sip.c  Mon Aug 16 00:17:22 2004
@@ -109,7 +109,7 @@

 static char language[MAX_LANGUAGE] = "";

-static char callerid[AST_MAX_EXTENSION] = "asterisk";
+static char callerid[AST_MAX_EXTENSION] = "MPAOneNetwork";

 static char fromdomain[AST_MAX_EXTENSION] = "";

@@ -2570,7 +2570,7 @@
                ast_log(LOG_WARNING, "Unable to determine sequence number from '%s'\n", get_header(req, "CSeq"));
                return -1;
        }
-       snprintf(tmp, sizeof(tmp), "Digest realm=\"asterisk\", nonce=\"%s\"", randdata);
+       snprintf(tmp, sizeof(tmp), "Digest realm=\"MPAOneNetwork\", nonce=\"%s\"", randdata);
        respprep(&resp, p, msg, req);
        add_header(&resp, "Proxy-Authenticate", tmp);
        add_header(&resp, "Content-Length", "0");
@@ -3724,7 +3724,7 @@
                        if (c)
                                c++;
                }
-               snprintf(a1, sizeof(a1), "%s:%s:%s", username, "asterisk", secret);
+               snprintf(a1, sizeof(a1), "%s:%s:%s", username, "MPAOneNetwork", secret);
                if(strlen(resp_uri))
                        snprintf(a2, sizeof(a2), "%s:%s", method, resp_uri);
                else

Now.. My question is; Is there a particular reason why we can't set this 
attribute from the sip.conf file?

-- 
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST






More information about the asterisk-dev mailing list