![Cisco SPA1112 Скачать руководство пользователя страница 28](http://html.mh-extra.com/html/cisco/spa1112/spa1112_provisioning-manual_63552028.webp)
Creating XML Provisioning Scripts
Using Provisioning Parameters
Provisioning Guide for Cisco SPA100 and SPA200 Series Analog Telephone Adapters
28
2
Within each Profile_Rule* parameter, all of the alternatives except the last one must
provide a conditional expression. This expression is evaluated and processed as
follows:
1. Conditions are evaluated from left to right, until one is found that evaluates as
true (or until one alternative is found with no conditional expression)
2. Any accompanying assignment expression is evaluated, if present
3. If a URL is specified as part of that alternative, an attempt is made to download
the profile located at the specified URL, and update the internal parameters
accordingly.
If all alternatives have conditional expressions, and none evaluates to true (or if the
whole profile rule is empty), then the entire Profile_Rule* parameter is skipped,
and the next profile rule parameter in the sequence is evaluated.
The following are some examples of valid programming for a single Profile_Rule*
parameter.
The following example resyncs unconditionally to the profile at the specified URL,
performing an HTTP GET request to the remote provisioning server.
http://remote.server.com/cisco/$MA.cfg
In the following example, the device resyncs to two different URLs, depending on
the registration state of Line 1. In case of lost registration, the device performs an
HTTP POST to a CGI script, transmitting the contents of the macro expanded
GPP_A (which may provide additional information on the state of the device).
($REGTMR1 eq 0)? http://p.tel.com/has-reg.cfg
| [--post a] http://p.tel.com/lost-reg?
In the following example, the device resyncs to the same server, but provides
additional information if a certificate is not installed in the unit (for legacy pre-2.0
units).
(“$CCERT” eq “Installed”)? https://p.tel.com/config?
| https://p.tel.com/config?cisco$MAU
In the following example, Line 1 is disabled until GPP_A is set equal to Provisioned
through the first URL. Afterwards, it resyncs to the second URL.
(“$A” ne “Provisioned”)? (Line_Enable_1_ = “No”;)! https://p.tel.com/init-
prov
| https://p.tel.com/configs