[Home]

Summary:ASTERISK-08989: [patch] fix totalAnalysisTime to handle periods of no channel activity
Reporter:cmaj (cmaj)Labels:
Date Opened:2007-03-12 13:13:05Date Closed:2008-01-31 18:05:23.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_amd
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) amd-dont-wait-too-long-for-frames-take2.diff.txt
( 1) amd-dont-wait-too-long-for-frames-take3.diff.txt
Description:This is the same problem reported in 7462, but the attached patch fixes the problem.  That bug was opened nine months ago, and then closed two months ago with no resolution.  I'm sure when a better solution is found for Asterisk 1.6 that this patch will no longer be required, but that doesn't help people trying to stabilize on the 1.4 branch.
Comments:By: cmaj (cmaj) 2007-03-12 17:55:20

Second patch is better and works with more providers.

By: Sky Greg (skygreg) 2007-03-21 10:41:52

This patch seems to work for me.

Using AMD to detect on outbound call on a SIP provider, AMD freeze and i have to manually hangup the call. Using AMD with an internal SIP phone or IAX phone: works.

With this patch applyed, AMD detect fine using the SIP provider.

Thanks !

By: cmaj (cmaj) 2007-03-21 16:05:06

skygreg, I've been using the "take3" patch the past week or so.  Seems to be working better than "take2", but it would be great if you could test that one, too.

I still don't like either of these patches.  They get the job done -- that's about it.

By: Sky Greg (skygreg) 2007-03-22 03:51:35

Hi, i try take3 with asterisk 1.4.1, here the output supposed to detect a human voice: "Allo bonjour ?" :

   -- Executing [s@detect:4] AMD("Local/*81002XXXXXXXX@fromami-d5ba,1", "") in new stack
   -- AMD: Local/*81002XXXXXXXX@fromami-d5ba,1 (null) (null) (Fmt: 64)
   -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]
   -- AMD: Changed state to STATE_IN_SILENCE
   -- AMD: Channel [Local/*81002XXXXXXXX@fromami-d5ba,1]. Too long...
   -- AMD: Channel [Local/*81002XXXXXXXX@fromami-d5ba,1]. Too long...

and here output supposed to detect a machine (long silence) :

Executing [s@detect:4] AMD("Local/*81002XXXXXXXX@fromami-0c86,1", "") in new stack
   -- AMD: Local/*8100247324833@fromami-0c86,1 (null) (null) (Fmt: 64)
   -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]
   -- AMD: Changed state to STATE_IN_SILENCE
   -- AMD: Channel [Local/*81002XXXXXXXX@fromami-0c86,1]. Too long...
   -- AMD: Channel [Local/*81002XXXXXXXX@fromami-0c86,1]. Too long...


So take2 seems to work better than take3 in my case ....

Is this patch in asterisk 1.4.2 ?

By: cmaj (cmaj) 2007-05-01 20:46:39

I just upgraded a box to 1.4.4, and tried patch 2, which applies cleanly.  I also think patch 2 works much better than patch 3.  But again, it is not perfect.

By: Jason Parker (jparker) 2007-06-21 16:43:18

file: You closed out 7462 - do you still think that fixing it directly in app_amd is the wrong thing to do?

By: Michiel van Baak (mvanbaak) 2007-09-23 05:20:40

file, any thoughts on this ?

By: Matt Riddell (zx81) 2007-10-23 21:27:28

I've just installed this on a couple of machines who were actually getting hung channels - all in AMD.

After installation they have had no hung channels.

By: Matt Riddell (zx81) 2007-11-03 23:40:12

Another two systems in the past couple of days with latest tarballs.

Basically the channels would hang in AMD but AMD was not doing anything.

So, same thing again, applied the take3 patch, recompiled and the problem was gone.

There haven't been any changes to AMD since the patch was initially written so it still applies fine to Asterisk 1.4.13.

By: Raj Jain (rjain) 2007-11-04 15:29:38.000-0600

I'm running into the same issue (AMD app hangs). The take3 patch works for me. Thanks for creating and contributing it.

Can somebody pls. comment on when will this be fixed in the trunk? Apparently, this patch is working satisfactorily for people who have tested it.

By: Matt Riddell (zx81) 2007-12-23 20:15:05.000-0600

Is there some type of information the 'powers that be' would like me to provide to assist in getting this committed?

By: Matt Riddell (zx81) 2008-01-28 18:50:50.000-0600

And another one today on SVN-branch-1.4-r99718:

pbx*CLI> show channels
Channel              Location             State   Application(Data)            
SIP/primary-b4549138 s@press1-live-and-am Up      AMD()                        
SIP/primary-0a270678 s@press1-live-and-am Up      AMD()                        
SIP/primary-0a652d60 s@press1-live-and-am Up      AMD()                        
SIP/primary-09f4de78 s@press1-live-and-am Up      AMD()



By: Matt Riddell (zx81) 2008-01-30 17:51:39.000-0600

And of course adding the patch removed the problem - the system has passed about 30k calls since the patch was applied and no hung channels anymore

By: Digium Subversion (svnbot) 2008-01-31 18:03:42.000-0600

Repository: asterisk
Revision: 101649

U   branches/1.4/apps/app_amd.c

------------------------------------------------------------------------
r101649 | mmichelson | 2008-01-31 18:03:42 -0600 (Thu, 31 Jan 2008) | 9 lines

From bugtracker: "fix totalAnalysisTime to handle periods of no channel activity"

(closes issue ASTERISK-8989)
Reported by: cmaj
Patches:
     amd-dont-wait-too-long-for-frames-take3.diff.txt uploaded by cmaj (license 111)
Tested by: cmaj, skygreg, ZX81, rjain


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

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

By: Digium Subversion (svnbot) 2008-01-31 18:05:23.000-0600

Repository: asterisk
Revision: 101650

_U  trunk/
U   trunk/apps/app_amd.c

------------------------------------------------------------------------
r101650 | mmichelson | 2008-01-31 18:05:22 -0600 (Thu, 31 Jan 2008) | 17 lines

Merged revisions 101649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101649 | mmichelson | 2008-01-31 18:06:37 -0600 (Thu, 31 Jan 2008) | 9 lines

From bugtracker: "fix totalAnalysisTime to handle periods of no channel activity"

(closes issue ASTERISK-8989)
Reported by: cmaj
Patches:
     amd-dont-wait-too-long-for-frames-take3.diff.txt uploaded by cmaj (license 111)
Tested by: cmaj, skygreg, ZX81, rjain


........

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

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