aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-29 20:25:33 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-29 20:25:33 +0000
commit5fde1b871f8391ef3427144b66004005323d9873 (patch)
tree8f7f379a1befd8c1e044536177954ab8d80ffed8 /channels/chan_zap.c
parent653f5c97947970862b302b7bf8eab020584e102c (diff)
Merged revisions 119071 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119071 | tilghman | 2008-05-29 15:24:11 -0500 (Thu, 29 May 2008) | 7 lines Call waiting tone occurs too often, because it's getting serviced by both subchannels. (closes issue #11354) Reported by: cahen Patches: 20080512__bug11354.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@119072 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 6646ee2e1..5187685e2 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -329,10 +329,10 @@ static inline int zt_wait_event(int fd)
#define MASK_INUSE (1 << 1) /*!< Channel currently in use */
#define CALLWAITING_SILENT_SAMPLES ( (300 * 8) / READ_SIZE) /*!< 300 ms */
-#define CALLWAITING_REPEAT_SAMPLES ( (10000 * 8) / READ_SIZE) /*!< 300 ms */
+#define CALLWAITING_REPEAT_SAMPLES ( (10000 * 8) / READ_SIZE) /*!< 10,000 ms */
#define CIDCW_EXPIRE_SAMPLES ( (500 * 8) / READ_SIZE) /*!< 500 ms */
#define MIN_MS_SINCE_FLASH ( (2000) ) /*!< 2000 ms */
-#define DEFAULT_RINGT ( (8000 * 8) / READ_SIZE)
+#define DEFAULT_RINGT ( (8000 * 8) / READ_SIZE) /*!< 8,000 ms */
struct zt_pvt;
@@ -5414,8 +5414,10 @@ static struct ast_frame *zt_read(struct ast_channel *ast)
return &p->subs[index].f;
}
}
- if (p->callwaitingrepeat)
+ /* Ensure the CW timer decrements only on a single subchannel */
+ if (p->callwaitingrepeat && zt_get_index(ast, p, 1) == SUB_REAL) {
p->callwaitingrepeat--;
+ }
if (p->cidcwexpire)
p->cidcwexpire--;
/* Repeat callwaiting */