Summary:ASTERISK-07337: [patch] call not terminated after timelimit expires
Reporter:Kaloyan Kovachev (knk)Labels:
Date Opened:2006-07-13 10:07:43Date Closed:2006-11-08 17:20:21.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 1.4.diff
( 1) 14svn.diff
( 2) call_limit_fix.patch
Description:if warning frequency is defined the call may not be terminated on time, but after the next warning schedule.

****** STEPS TO REPRODUCE ******

Use Dial with option L(40000:30000:20000) - the call will be 50sec long
Comments:By: Serge Vecher (serge-v) 2006-07-13 10:12:46

bug fixing patch made possible by post 1.4 rewriting efforts in ASTERISK-6175. See KNK's note 0049127 in that report.

By: Kaloyan Kovachev (knk) 2006-08-18 11:52:33

just found that there was a similar patch in bug 6356, which is closed, but the patch wasn't applied and that's why there is still a problem.
Kevin have fixed part of the problem, which is the timelimit being less than the warning time, but there is also another one, which this patch (or the one from 6356) will fix.
Also 6356 is marked as related to 7397, which is yet another reason for L (and not only) to not work properly, but won't be fixed from either of the patches (more on 7397 will comment there)

By: Peng Yong (ppyy) 2006-08-18 13:00:25

this patch can't hangup the call exactly at the limit time.

By: Kaloyan Kovachev (knk) 2006-08-19 04:03:18

it does the same as the patch in 6356 and as specified in my previous post, there are other reasons too.
the changes made from Kevin in app_dial and this one will fix problems with the values given to L(), but there is still a problem when DTMF is received or when a custom warning or end sound is used, which takes longer to play than the 5 seconds given, which are different issues.

By: Kaloyan Kovachev (knk) 2006-08-19 04:44:54

Actually with the new whisper code in app_chanspy it is possible to move the L option logic completely out of the bridging code, which i am trying to do as addition to 6335, but still can't make it work properly.
When done, the DTMF problem will also not affect the L option and the warning sound could be played to both parties simultaneously, but this can't be added in 1.4 unfortunately.

By: Joshua C. Colp (jcolp) 2006-09-27 17:02:03

Is this still an issue we need to look at? I can't quite figure out if you want to continue this bug or not.

By: Kaloyan Kovachev (knk) 2006-09-28 02:44:36

yes it is still an issue.
The patch provided is quite simple and can be applied to fix the problem mentioned. The bug is just waiting for this to be closed and there is nothing to continue. :)
The lines in the patch are different (around line 3800-3820) for trunk and 1.4 and the channel.c is now in ./main instead ./
I may upload an updated patch ... for 1.4 or trunk?

By: Kaloyan Kovachev (knk) 2006-09-28 03:48:56

actualy there are no diferences between the patch for 1.4 and trunk, which i have just upladed.

By: Anthony LaMantia (alamantia) 2006-09-28 11:01:06

This looks good, can anyway one else test this patch and provide some feedback?

By: Anthony LaMantia (alamantia) 2006-09-28 11:38:46

i updated your patch a small bit, and made a new diff aginst the latest 1.4 svn trunk.

it's also in my svn team directory.. http://svn.digium.com/view/asterisk/team/anthonyl/7531-test/

you can view it there.

By: jmls (jmls) 2006-11-01 06:45:37.000-0600

can this be applied to svn ?

By: Kaloyan Kovachev (knk) 2006-11-01 07:10:45.000-0600

I wonder why this and the patch from bug 8050 are not applied yet as they are simple patches and they are definately fixing the bugs mentioned

By: Kaloyan Kovachev (knk) 2006-11-01 10:05:53.000-0600

yes, they are not related.
While working on 6335 i've found few bugs and many reasons why L option won't work. There many bugreports about this, but the main problem is probably that the L option code should not be in the ast_channel_bridge function at all.
I have tried to move the functionality there, but couldn't make the whisper code to play the start/warn/end file. I am not C developer and probably i am missing something small, but don't have the time at the moment to dig into it.

By: Steve Murphy (murf) 2006-11-08 17:17:47.000-0600

The patch has been applied to 1.4 in rev 47348.
And applied to trunk in rev  47349.

By: Steve Murphy (murf) 2006-11-08 17:20:20.000-0600

Looks like this bug can be closed.