Index: chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.379 diff -u -r1.379 chan_zap.c --- chan_zap.c 17 Nov 2004 06:18:33 -0000 1.379 +++ chan_zap.c 5 Dec 2004 16:16:32 -0000 @@ -274,6 +274,9 @@ /* How long (ms) to ignore Polarity Switch events after we answer a call */ static int polarityonanswerdelay = 600; +/* When to send the CallerID signals (rings) */ +static int sendcalleridafter = DEFAULT_CIDRINGS; + /* Protect the monitoring thread, so only one process can kill or start it, and not when it's doing something critical. */ AST_MUTEX_DEFINE_STATIC(monlock); @@ -561,6 +564,7 @@ int hanguponpolarityswitch; int polarityonanswerdelay; struct timeval polaritydelaytv; + int sendcalleridafter; #ifdef ZAPATA_PRI struct zt_pri *pri; struct zt_pvt *bearer; @@ -1561,7 +1565,7 @@ } else { if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCADENCE, NULL)) ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name); - p->cidrings = DEFAULT_CIDRINGS; + p->cidrings = p->sendcalleridafter; } @@ -6628,6 +6632,7 @@ tmp->polarityonanswerdelay = polarityonanswerdelay; tmp->hanguponpolarityswitch = hanguponpolarityswitch; + tmp->sendcalleridafter = sendcalleridafter; } if (tmp && !here) { @@ -9755,6 +9760,8 @@ polarityonanswerdelay = atoi(v->value); } else if (!strcasecmp(v->name, "hanguponpolarityswitch")) { hanguponpolarityswitch = ast_true(v->value); + } else if (!strcasecmp(v->name, "sendcalleridafter")) { + sendcalleridafter = atoi(v->value); } } else ast_log(LOG_WARNING, "Ignoring %s\n", v->name);