[asterisk-users] Missing "dialplan" commands in Asterisk 1.4.2 CLI

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Apr 24 08:10:30 MST 2007


On Tue, Apr 24, 2007 at 08:21:12AM -0600, Steve Murphy wrote:
> On Tue, 2007-04-24 at 00:56 -0500, Carlos Chavez wrote:
> > Tzafrir Cohen wrote:
> > >
> > >
> > > Or maybe it is the default and it is an implicit value?
> > >
> > > But even then you should be able to change the dialplan at runtime.
> > > Just not writng it back to the file.
> > >
> > > The "dialplan" commands are implemented in pbx_config.so . Are you sure 
> > > that this module is loaded?
> > >
> > >   
> > pbxskandiamty2*CLI> module show like pbx
> > Module                         Description                              
> > Use Count
> > pbx_loopback.so                Loopback Switch                          
> > 0        
> > pbx_config.so                  Text Extension Configuration             
> > 0        
> > pbx_spool.so                   Outgoing Spool Support                   
> > 0        
> > pbx_realtime.so                Realtime Switch                          
> > 0        
> > pbx_dundi.so                   Distributed Universal Number Discovery ( 
> > 0        
> > 
> >     It is loaded.  Both servers have the same modules and all say that 
> > use count is zero.
> 
> Taking things one at a time, I started with "dialplan save". Looking
> thru the source, in the load_module routine, I see...
> 
> 	if (static_config && !write_protect_config)
> 		ast_cli_register(&cli_dialplan_save);
> 
> So, if the static_config is false, or if write_protect_config is true,
> it won't register this command. Check your config file, extensions.conf,
> and see what you set those vars to...
> 
> The sample config says:
> 
> ; The "General" category is for certain variables.  
> ;
> [general]
> ;
> ; If static is set to no, or omitted, then the pbx_config will rewrite
> ; this file when extensions are modified.  Remember that all comments
> ; made in the file will be lost when that happens. 
> ;
> ; XXX Not yet implemented XXX
> ;
> static=yes
> ;
> ; if static=yes and writeprotect=no, you can save dialplan by
> ; CLI command 'save dialplan' too
> ;
> writeprotect=no
> ;
> 
> So, to get the behavior you are seeing, all you have to do is leave out
> the static=yes line

The sample extensions.conf claims:

;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes

So the default is "static=no"?

What's the rationale for this dangerous default?

Recall that a value enabled in the sample confiug file is still not
"enabled by default".

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list