Ticket #4125 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 2 years ago

Extend Extensions class to provide some level of comments and remove auto-generated custom-context includes

Reported by: p_lindheimer Assigned to:
Priority: minor Milestone: 2.8
Component: FreePBX Framework Version: 2.6-branch
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by p_lindheimer)

Add or extend to the following:

  • addSectionComment($section, $comment)
  • addInclude($section, $incsection, $comment="")
  • addSectionNoCustom($section, $setting)
  • disableCustomContexts($setting)

Has the following result:

  • addSectionComment('outrt-1','Emergency')
    [outrt-1] ; Emergency
    
  • addInclude('outrt-1', 'outbound-allroutes, 'Emergency')
    [outbound-allroutes]
    include => outrt-1 ; Emergency
    
  • addSectionNoCustom('outrt-1', true)
    [outrt-1] ; Emergency
    exten => 0,1,Noop(Macro(user-callerid): executed in outbound-allroutes PRI 1)                 
    

(*) Normally there would be an auto-generated entry of the form:

include => outrt-1-custom

This last one can be used to keep the system form generating the automatic custom context in cases where there is no reasonable usage of such an custom context because of the way Asterisk works and an inability to add any useful dialplan into such a case.

Or disable all generation with:

  • disableCustomContexts()

and add amportal.conf settting:

DISABLECUSTOMCONTEXTS=true|false

Change History

03/11/10 14:35:46 changed by p_lindheimer

  • description changed.

03/11/10 14:40:18 changed by p_lindheimer

  • summary changed from Extend Extensions class to provide some level of comments to Extend Extensions class to provide some level of comments and remove auto-generated custom-context includes.

03/11/10 14:42:07 changed by p_lindheimer

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

(In [9130]) closes #4125 adds some methods to ext-class to add comments and selectively or globally remove all auto-generated custom context includes, as well as amporta.conf setting to enact this and code in retrieve_conf to turn this on