Perl config file parsing - My Country Mobile

Asterisk: config is a fresh Perl module for Asterisk Perl config file parsing.

Get http://search.cpan.org/~hoowa/Asterisk-config/ for additional information.

Asterisk: config can parse and storing data together with Asterisk config data files.  This module service asterisk 1.0 1.2 1.4 1.6, also it additionally encourages Zaptel config data files.

Be aware model 0.9 syntax incompatible using 0.8.

Instance a fresh item of document.  Read information from stream_data or document.

Item VARIABLE

document config filename and course.  If a document exists (exp.  Info from stream_data ), you cannot rescue by save_file.

Keep_resource_array

use Re-Source selection when store fast than just open document; however, desire a lot more memory, default option enabled.  Utilize set_objvar to alter it out.

Reload_when_save

when rescue carried out, call.

Default option permit.  Utilize set_variable to alter it out.

Clean_when_reload

when re-load finished, automobile clean_assign with the latest thing.  Default option permit.  Utilize set_objvar to alter it out.

Commit_list

inside factor listed each control.  I simply do not change and transform this factor.

Parsed_conf

the inner factor of parsed.  I simply do not change and transform this factor.

Doesn’t comprise Unsection.

Fetch_keys_list

$sip_conf->fetch_keys_list(portion =>[portion identify |unsection]);

yield secrets set of domain or unsection.

Fetch_keys_hashref

$sip_conf->fetch_keys_hashref(portion =>[portion identify |unsection]);

yield referenced vital checklist (and keys price ), department price’unsection’ yield all unsection keys, even whether department identify unreachable yield collapsed.

Fetch_values_arrayref

$sip_conf->fetch_values_arrayref(portion =>[portion identify |unsection]( keyword =>keyword );

yield referenced worth listing, in case department identify unreachable yield collapsed.  If key title unreachable yield collapsed.

Get $sip_conf->Customize ();

re-load and parse config file.  When clean_when_reload authentic is going to perform clean_assign.

Assign_matchreplace

$sip_conf->assign_matchreplace(game =>[series ],substitute =>[series ]);

substitute for fresh info when paired.

* game -> series of coordinated info.

* re -> brand new statistics series.

Assign_append

$sip_conf->assign_append(stage =’ [‘upward’|’down”|’foot’], department =’ [segment title ]’ information =>’keyword =value’|[‘keyword =value’,”keyword =value’]|undefined);

encode info close to with domain.

* tip -> append info down / up / ft together with portion.

* department -> fit domain, be expecting’unsection’.

* information -> fresh re-place info in string/array/hash.

$sip_conf->assign_append(stage =’ [‘upward’|’down’|’More than’], segment =>[segment title ], comkey=>[key,value][ information =>’keyword =value’|[‘keyword =value’,”keyword =value’]|undefined;

encode info about with part Title and key/value exactly the identical segment.

* tip -> finished can vibrate with all key/value matched.

* comkey -> fit value and key.

$sip_conf->assign_append(stage =”upward’|’down”, information =”key=value’|[‘key=value’,”keyword =value’]|undefined);

easy track data with No segment.

unsection],information =>’key=value’ * department > section identify and’unsection’.

Assign_delsection

$sip_conf->assign_delsection(portion =>[portion identify |unsection]);

edit section title and department info.

* department > section and’unsection’.

 Assign_addsection

$sip_conf->assign_addsection(portion =>[portion ]);

insert element together with identify.

$sip_conf->assign_editkey(portion =>[portion identify |unsection][ keyword =>[keyname][ price =>[significance ], respectively new_value=>[new_value]);

change significance with paired section.if do not assign worth => may replace all of coordinated keywords.

unsection][ keyword =>[keyname][ price =>[price ]);

erase all of coordinated keyname within segment or at’unsection’.

When reload_when_save authentic is going to perform.  If no item factor document or document not exists or can not be rescue failed.  If specified new_file helps you to definitely save new file, default option overwrite objvar’document’.

EXAMPLES

find instance in origin sms tree.

AUTHORS

The Asterisk:config be Section of My Country Mobile open-source Telephony venture accessibility http://www. mycountrymobile.org for additional information.

SIP TrunkingSms ServicesVoice Termination