[Home]

Summary:ASTERISK-10865: Can not change Call-Waiting tone duration and frequency
Reporter:Fabrice CAHEN (cahen)Labels:
Date Opened:2007-11-22 20:09:03.000-0600Date Closed:2008-05-29 15:19:56
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_zap
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 11354-cwait-timing.diff
( 1) 20080512__bug11354.diff.txt
Description:Our users reports that the call-waiting tone on analog phones connected to Zaptel hardware (TDM400 & TDM2400) is too disturbing.
I tryed to change it's duration in indications.conf AND in zonedata.c (recompiled, etc...), but it doesn't change anything (changing other tones, ie dialtone works fine!).
Basically, whatever is configured in those 2 files, the CWT is 300ms long at 440Hz, and is repeated every 3 or 4 seconds! (it seems that a CWT is emitted at the beginning of each ring-back tone sent to the caller)

Another issue is that when a call is bridged between 2 local extensions, both parties hear the CWT, so no one knows who is concerned
Comments:By: Jason Parker (jparker) 2008-04-02 17:37:58

So, I looked into this, and I think I have a good understanding of why this happens.

For the actual call wait tone, it's a 440Hz tone for 300ms.  If you have callwaitingcallerid enabled, you also get 2750Hz and 2130Hz tones while that's playing.

Is it possibly those higher tones that the users are complaining about?

By: Fabrice CAHEN (cahen) 2008-04-02 18:04:35

Not at all... unfortunately this would have been too simple ;o)
callwaitingcallerid is disabled. If enabled, it is even worse.

The problem does not come from the tone's frequency, but from the repetition of the CWT every 5 seconds and it's duration (300ms is too long when repeated so often).
Their main problem is when their peer is dictating a telephone number or email address, they can't head a digit (or character) because they hear the CWT instead.

The solution would be to change the CWT in zaptel's zonedata.c, but i can't figure where the ZT_TONE_CALLWAIT constant is being used (according to my "grep -r", nowhere!)

As far as my knowledge of C leads me, i would guess that the solution resides in asterisk's channels/chan_zap.c in the zt_callwait() function, and found a quick and (very very very very) dirty hack to stop the CWT after the first has been issued by setting a "static int" flag... but am not sure at all that it is a safe solution. (if you really want, i can post the patch, but the better would be i think to use ZT_TONE_CALLWAIT instead...)

By: Jason Parker (jparker) 2008-04-02 18:27:45

Here is an ugly hack that will shorten the beep, and also delay longer (in theory) between beeps.

Note the 2400 (now 1200) - this is (simplified) beep ms * 8, and the 10000 (now 20000) at the top is the delay between beeps...in theory.

It's going to take a great deal of effort to rework how this all is generated, and to be honest, I don't see that being done in the near term.

I think it might be appropriate to suspend this issue (and of course leave the patch and this explanation up).  Thoughts?

By: Fabrice CAHEN (cahen) 2008-04-02 18:34:51

Well, i'll try that, thanks.

I don'k know if many people are using many analog ports... but Digium sells boards, so there sure are people to buy them, and i might not be the only one to be annoyed by this CWT issue.

About suspending... why not... maybe it will be taken into account for Asteisk 1.8 ;o)

By: Jason Parker (jparker) 2008-04-03 10:46:36

I'm not going to close this just yet.

I did a little bit of testing after re-reading your comment about the beep repeating every 3-4 seconds.  You're right (it's actually 5 seconds in most cases) - and that is a bug (it should be 10 seconds).

I can see why it's happening (both the connected channel and the waiting channel do an ast_read which each decrement the same delay counter), I'm just not entirely sure how to fix it yet.

I'm going to try to work something out for that today.

By: Fabrice CAHEN (cahen) 2008-04-03 10:55:14

Thanks a lot !!!

By: Tilghman Lesher (tilghman) 2008-05-12 12:36:58

qwell: any progress?

By: Jason Parker (jparker) 2008-05-12 12:42:04

No.  I don't have a clear understanding of why zt_read is called by every subchannel.  I suppose we could move the counter to the struct, but...

By: Tilghman Lesher (tilghman) 2008-05-12 15:05:29

Okay, this patch should make it so that the timer is only incremented once per sample, instead of once for each subchannel active.  Testing required.

By: Tilghman Lesher (tilghman) 2008-05-19 15:42:44

cahen:  does this patch work for you?

By: Digium Subversion (svnbot) 2008-05-29 15:17:51

Repository: asterisk
Revision: 119071

U   branches/1.4/channels/chan_zap.c

------------------------------------------------------------------------
r119071 | tilghman | 2008-05-29 15:17:50 -0500 (Thu, 29 May 2008) | 7 lines

Call waiting tone occurs too often, because it's getting serviced by both
subchannels.
(closes issue ASTERISK-10865)
Reported by: cahen
Patches:
      20080512__bug11354.diff.txt uploaded by Corydon76 (license 14)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119071

By: Digium Subversion (svnbot) 2008-05-29 15:19:19

Repository: asterisk
Revision: 119072

_U  trunk/
U   trunk/channels/chan_zap.c

------------------------------------------------------------------------
r119072 | tilghman | 2008-05-29 15:19:18 -0500 (Thu, 29 May 2008) | 15 lines

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 ASTERISK-10865)
Reported by: cahen
Patches:
      20080512__bug11354.diff.txt uploaded by Corydon76 (license 14)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119072

By: Digium Subversion (svnbot) 2008-05-29 15:19:56

Repository: asterisk
Revision: 119073

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_zap.c

------------------------------------------------------------------------
r119073 | tilghman | 2008-05-29 15:19:56 -0500 (Thu, 29 May 2008) | 23 lines

Merged revisions 119072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r119072 | tilghman | 2008-05-29 15:25:33 -0500 (Thu, 29 May 2008) | 15 lines

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 ASTERISK-10865)
Reported by: cahen
Patches:
      20080512__bug11354.diff.txt uploaded by Corydon76 (license 14)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119073