Ticket #3792 (closed Bugs: fixed)

Opened 1 year ago

Last modified 1 year ago

Dialparties.agi not initialising $astman properly

Reported by: pscs Assigned to: p_lindheimer
Priority: major Milestone: 2.6
Component: Core Version: 2.5-branch
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

In dialparties.agi, $astman is not being initialised properly. This means that when phpagi_asmanager.php calls 'log', it uses error_log() to log entries. This can be very slow on some PCs. (on our server it takes about 0.1 seconds to log one line). Some AGI calls result in over 100 lines being logged, slowing things down considerably.

This manifested here as queues not working if there was more than one static member listed and is probably the same issue as at http://www.freepbx.org/forum/freepbx/users/queues-dialparties-agi-high-cpu-load#comment-21009

The $astman->pagi member needs to be initialised to the address of an AGI object, so that phpagi will use the much quicker 'VERBOSE' Asterisk method.

A quick fix is to add

$astman->pagi = & $AGI;

after

$astman = new AGI_AsteriskManager( );

at the start of dialparties.agi

A better fix may be to use

$astman = $AGI.new_AsteriskManager();

instead, but I'm not sure if the other effects of the new_AsteriskManager function are desirable or not.

Change History

07/24/09 14:18:46 changed by pscs

Sorry, the alternate fix should have been:

$astman = $AGI->new_AsteriskManager();

It does work for me, but I don't know if it may have undesired side effects

07/24/09 14:30:18 changed by p_lindheimer

  • component changed from - choose - to Core.

07/25/09 08:43:01 changed by p_lindheimer

see relevant discussion at:

http://freepbx.org/forum/freepbx/users/queues-dialparties-agi-high-cpu-load

I think you are correct, and then on top of that, the PHPAGI Config module or a manual config should generally have debug and error logging turned off to further reduce clutter.

07/25/09 08:43:58 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [7901]) fixes #3792 create astman handle from AGI's unique 'new' function

08/02/09 19:51:37 changed by p_lindheimer

(In [7917]) Merged revisions 7697,7699-7701,7703-7707,7709-7710,7713-7722,7725-7731,7735-7736,7739-7740,7744-7751,7753-7758,7761,7763,7765-7769,7771-7774,7776-7785,7787,7789-7791,7793-7794,7798,7806,7808-7809,7811-7813,7816,7818-7821,7838,7858-7865,7867,7871,7875-7878,7881-7882,7886-7887,7889-7890,7892-7893,7895-7896,7901 via svnmerge from http://svn.freepbx.org/modules/branches/2.6

........

r7697 | p_lindheimer | 2009-05-07 20:35:14 -0700 (Thu, 07 May 2009) | 1 line

fixes #3478 this appears to be an asterisk issue as it does not happen on all systems. Putting patch into 2.6 and after proper testing we can look at back porting it to 2.5

........

r7713 | mickecarlsson | 2009-05-08 12:38:29 -0700 (Fri, 08 May 2009) | 1 line

Fixed spelling errors in dialparties.agi

........

r7721 | xrobau | 2009-05-13 15:48:19 -0700 (Wed, 13 May 2009) | 2 lines

Apply fixes from #3423

........

r7728 | mickecarlsson | 2009-05-14 21:57:43 -0700 (Thu, 14 May 2009) | 1 line

Fixed spelling errors in extensions.conf

........

r7731 | xrobau | 2009-05-15 11:33:22 -0700 (Fri, 15 May 2009) | 2 lines

Minor tabindex warning cleanups

........

r7751 | p_lindheimer | 2009-05-26 12:42:42 -0700 (Tue, 26 May 2009) | 1 line

closes #3691 added usage of EXTENSION_STATE in dialparties in place of manager connection when present

........

r7753 | p_lindheimer | 2009-05-26 16:27:57 -0700 (Tue, 26 May 2009) | 1 line

use the STAT() function in place of the checksound.agi script for Asterisk 1.4+ systems, in vmx locater, to check for file

........

r7754 | p_lindheimer | 2009-05-26 17:11:23 -0700 (Tue, 26 May 2009) | 1 line

fixes #3693 change ZAP to DAHDI in trunk tech when generating config in ZAP2DAHDI compatibility mode

........

r7784 | p_lindheimer | 2009-06-01 12:19:05 -0700 (Mon, 01 Jun 2009) | 1 line

fixes #3705 so & can be used in sip and iax secrets, also modifies core_trunks_getDetails to provide a table of all the trunks from the new trunk table if no paramter is passed

........

r7838 | p_lindheimer | 2009-06-20 09:46:08 -0700 (Sat, 20 Jun 2009) | 1 line

add alwaysauthreject=yes to sip settings to enhance security

........

r7871 | p_lindheimer | 2009-06-26 22:04:39 -0700 (Fri, 26 Jun 2009) | 1 line

fix bug when accessing a stale page where the trunk no longer exists and no technology type is returned resulting in a sql query accessing a blank table

........

r7901 | p_lindheimer | 2009-07-25 08:43:58 -0700 (Sat, 25 Jul 2009) | 1 line

fixes #3792 create astman handle from AGI's unique 'new' function

........