Turn on usecallerid if distinctiveringdetection is on (bug #2389)
authorMark Spencer <markster@digium.com>
Tue, 7 Sep 2004 01:56:18 +0000 (01:56 +0000)
committerMark Spencer <markster@digium.com>
Tue, 7 Sep 2004 01:56:18 +0000 (01:56 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index e9cb8e3..d674954 100755 (executable)
@@ -6158,6 +6158,12 @@ static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_p
                tmp->restrictcid = restrictcid;
                tmp->use_callingpres = use_callingpres;
                tmp->priindication_oob = priindication_oob;
+               if (tmp->usedistinctiveringdetection) {
+                       if (!tmp->use_callerid) {
+                               ast_log(LOG_NOTICE, "Distinctive Ring detect requires 'usecallerid' be on\n");
+                               tmp->use_callerid = 1;
+                       }
+               }
 
                strncpy(tmp->accountcode, accountcode, sizeof(tmp->accountcode)-1);
                tmp->amaflags = amaflags;