[asterisk-users] Changing menuselect values from CLI and not TUI

Laurent Steffan asterisk at voip.nc
Tue Apr 14 01:23:23 CDT 2009


Le Tue, 14 Apr 2009 10:28:42 +1000, David Klaverstyn
<dave at klaverstyn.com.au> a écrit :

> Hi All,
> 
> I'm in the process of writing an install script and I would like to
> change some settings for the install process but I don't want the
> user to go into menuselect and make the changes manually.
> 
> Is there a way to make the changes to menuselect from the CLI?
> 
> As an example, selecting the iLBC codec.
> menuselect codec ilbc on
> 
> Regards
> David.

You might try to manipulate within your script the output of
menuselect (that would be "menuseleect.makeopts" if you haven't
changed the default). It seems rather straightforward to change or
delete variables and their values.

Another posssibility is to directly modify the input tree for
menuselect; for instance, selecting by default the ilbc codec, as per
your example, could be achieved by taking out the
"<defaultenabled>no</defaultenabled>" phrase in the XML description of
the ilbc codec option.

The choice between these two methods (and maybe others...)
probably depends on the structure of your install script, and the
frequency of the changes to the install options.

Best regards,
Laurent

-- 
Laurent Steffan               Consultant VOIP
Web:  http://VOIP.nc



More information about the asterisk-users mailing list