Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated @ 2023-08-09T10:26:41.916650
HTML
headtrue
encodingUTF-8
<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2023"><meta name="DC.rights.owner" content="(C) Copyright 2023"><meta name="DC.type" content="topic"><meta name="prodname" content="Virtuo EMS"><meta name="version" content="Virtuo 4.8.0"><meta name="platform" content="All"><meta name="DC.date.modified" content="2023-0308-2809"><meta name="DC.date.issued" content="2023-0308-2809"><meta name="DC.date.available" content="2023-0308-2809"><meta name="ChapterNumbering" content="no"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="topic_title_Basic_Concepts_d1e15"><link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"><link rel="stylesheet" type="text/css" href="https://documentation.media5corp.com/download/attachments/45482024/commonltr.css"><link rel="stylesheet" type="text/css" href="https://documentation.media5corp.com/download/attachments/45482024/custom.css"><title>Using Configuration Conditions for Virtuo Provisioning</title></head><body class="nobody"><header role="banner"><div class="topicmeta title">Using Configuration Conditions for Virtuo Provisioning</div><div class="topicmeta date">2023-0308-28<09</div><div class="topicmeta product">Virtuo EMS</div><div class="topicmeta version">Virtuo 4.8.0</div><div class="topicmeta pdf"><a href="https://documentation.media5corp.com/download/attachments/45482024/Using%20Configuration%20Conditions%20for%20Virtuo%20Provisioning.pdf" rel="nofollow">Download PDF Document</a></div><hr><span style="float: inline-end;"></span></header><nav role="toc"><ul><li><a href="#topic_title_Basic_Concepts_d1e15">Basic Concepts</a><ul><li><a href="#concept_rws_wn5_rkb">Logical Statements</a></li><li><a href="#concept_odt_srz_rkb">Syntax Errors in Virtuo Configuration</a></li></ul></li><li><a href="#topic_title_Basic_Tasks_d1e18">Basic Tasks</a><ul><li><a href="#task_yjz_sbv_rkb">Editing a Configuration with Logical Statements</a></li></ul></li><li><a href="#topic_title_Examples_d1e20">Examples</a><ul><li><a href="#reference_tk4_jmk_vkb">Multiple Firmware Upgrade Before Provisioning</a></li><li><a href="#reference_tk4_jmk_vkc">Different Provisioning Per Unit Model</a></li></ul></li><li><a href="#reference_ur5_yx3_ps">Available Documentation</a></li><li><a href="#concept_fqm_rv4_k4">Copyright Notice</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1"><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="nested0" aria-labelledby="ariaid-title1" id="topic_title_Basic_Concepts_d1e15">
   <h1 class="title topictitle1" id="ariaid-title1">Basic Concepts</h1>
<article class="topic concept nested1" aria-labelledby="ariaid-title2" id="concept_rws_wn5_rkb">
 <h2 class="title topictitle2" id="ariaid-title2">Logical Statements</h2>
 
 <div class="body conbody"><p class="shortdesc">Logical statements can be used in the configuration associated with a unit in the Virtuo
  EMS. </p>
  <p class="p">Logical statements can be used by Virtuo to return a custom configuration based on the values
   of the current unit configuration. When a unit requests a configuration from the Virtuo EMS, the
   logical statements included in the configuration are evaluated first. The Virtuo EMS then returns
   the resulting configuration to the unit without the logical statements. </p>
  <div class="p">
   <table class="table frame-all" id="concept_rws_wn5_rkb__table_uy4_wr5_rkb"><caption></caption><colgroup><col style="width:39.0625%"><col style="width:60.9375%"></colgroup><thead class="thead">
      <tr class="row">
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__1">Supported Statements</th>
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__2">Description</th>
      </tr>
     </thead><tbody class="tbody">
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__1">%if [condition to evaluate]</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__2">A logical statement block always starts with %if</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__1">%elseif [condition to evaluate]</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__2">After the %if, there be can 0 or more %elseif</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__1">%else</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__2">After the %if and the %elseif, there can be 0 or 1 %else</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__1">%endif</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_uy4_wr5_rkb__entry__2">A logical statement block always ends with %endif</td>
      </tr>
     </tbody></table>
  </div>
  <div class="p">
   <table class="table frame-all" id="concept_rws_wn5_rkb__table_i43_bs5_rkb"><caption></caption><colgroup><col style="width:29.069767441860467%"><col style="width:70.93023255813954%"></colgroup><thead class="thead">
      <tr class="row">
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">Supported Operators</th>
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">Description</th>
      </tr>
     </thead><tbody class="tbody">
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">==</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">equal</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">!=</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">not equal</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">=~</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">contains</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">!~</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">does not contain</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">&gt; </td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">greater than</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">&gt;=</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">greater than or equal</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">&lt; </td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">smaller than</td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__1">&lt;=</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_i43_bs5_rkb__entry__2">smaller than or equal</td>
      </tr>
     </tbody></table>
  </div>
  <p class="p">If a configuration contains a syntax error, the Virtuo EMS will not return the configuration to
   the units and a log will be generated. If a unit requests a configuration , and the configuration
   contains a syntax error, the unit will receive an empty configuration and the '404 Parsing error'
   HTTP error message.</p>
  <div class="p">
   <table class="table frame-all" id="concept_rws_wn5_rkb__table_cff_sgk_vkb"><caption></caption><colgroup><col style="width:50%"><col style="width:50%"></colgroup><thead class="thead">
      <tr class="row">
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">Supported Conditions</th>
       <th class="entry colsep-1 rowsep-1" id="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">Description</th>
      </tr>
     </thead><tbody class="tbody">
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">unit.firmware.version</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">
        <p class="p">Compares the unit firmware version.</p>
        <p class="p">Supports these two formats. For more details refer to the <a class="xref" href="https://documentation.media5corp.com/display/DGWLATEST/DGW+Software+Numbering+Convention" target="_blank">DGW Software Numbering Convention</a> document published on the <a class="xref" href="https://documentation.media5corp.com/" target="_blank">Media5 Documentation Portal</a>.</p>
        <ul class="ul" id="concept_rws_wn5_rkb__ul_ilp_1hk_vkb">
         <li class="li">2.0.MAJOR.BUILD (old format)</li>
         <li class="li">MAJOR.MINOR.BUILD (new format)</li>
        </ul>
        <p class="p">For example:</p>
        <ul class="ul" id="concept_rws_wn5_rkb__ul_jlp_1hk_vkb">
         <li class="li">2.0.42.768 (latest version in the old format)</li>
         <li class="li">42.1.857 (first version in the new format)</li>
         <li class="li">45.3.1971-526-g2328c6252 (engineering version)</li>
        </ul>
       </td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">unit.license_key</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">
        <p class="p">Compares the unit license key.</p>
        <p class="p">Most often used to check first if defined.</p>
       </td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">
         <p class="p">unit.mac_address</p>
         <p class="p">unit.serial_number</p>
         <p class="p">unit.uuid</p>
       </td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">
        <p class="p">Compares the unit identifiers.</p>
        <p class="p">Note: The unit.uuid is valid only for the Sentinel CS series.</p>
       </td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">unit.product.family</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">
        <p class="p">Compares the unit product family. Possible values are:</p>
        <ul class="ul">
         <li class="li">Mediatrix 3000 Series</li>
         <li class="li">Mediatrix 4100 Series (4102)</li>
         <li class="li">Mediatrix 4100 Series (4108/4116/4124)</li>
         <li class="li">Mediatrix 4400 Series</li>
         <li class="li">Mediatrix C7 Series</li>
         <li class="li">Mediatrix G7 Series</li>
         <li class="li">Mediatrix S7 Series</li>
         <li class="li">Sentinel 100</li>
         <li class="li">Sentinel 400</li>
         <li class="li">Sentinel CS</li>
        </ul>
       </td>
      </tr>
      <tr class="row">
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__1">unit.user_agent</td>
       <td class="entry colsep-1 rowsep-1" headers="concept_rws_wn5_rkb__table_cff_sgk_vkb__entry__2">
        <p class="p">Compares the content of the unit User-Agent header.</p>
        <p class="p">Most often used against the "=~" operator (also known as the "contains" operator).</p>
       </td>
      </tr>
     </tbody></table>
  </div>
 </div>
</article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic concept nested1" aria-labelledby="ariaid-title3" id="concept_odt_srz_rkb">
 <h2 class="title topictitle2" id="ariaid-title3">Syntax Errors in Virtuo Configuration</h2>
 
 <div class="body conbody"><p class="shortdesc">When editing a configuration with logical statements, the syntax of the statements is
  verified when saving the configuration.</p>
  <p class="p">If there is a syntax error in the configuration, it is saved but an error is displayed.
   Furthermore, the Virtuo EMS will not return the configuration to the units. If a unit requests a
   configuration, and this configuration contains a syntax error, the unit receives an empty
   configuration  and the '404 Parsing error' HTTP error. A log is also generated when a syntax
   error is present in the configuration.</p>
 </div>
</article></article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic nested0 nobody" aria-labelledby="ariaid-title4" id="topic_title_Basic_Tasks_d1e18">
   <h1 class="title topictitle1" id="ariaid-title4">Basic Tasks</h1>
<article class="topic task nested1" aria-labelledby="ariaid-title5" id="task_yjz_sbv_rkb">
    <h2 class="title topictitle2" id="ariaid-title5">Editing a Configuration with Logical Statements</h2>
    <div class="body taskbody">
        <section class="section context"><div class="tasklabel"><strong class="sectiontitle tasklabel">Context</strong></div></section>
        <section id="task_yjz_sbv_rkb__steps_jh3_wbv_rkb"><div class="tasklabel"><strong class="sectiontitle tasklabel">Steps</strong></div><ol class="ol steps" id="task_yjz_sbv_rkb__steps_jh3_wbv_rkb"><li class="li step">
                <span class="ph cmd">In Virtuo EMS, click <span class="keyword wintitle">Configuration</span>.</span>
            </li><li class="li step">
                <span class="ph cmd">From the <span class="keyword wintitle">Configuration</span> page,
                    click the <img class="image" id="task_yjz_sbv_rkb__image_dpl_ttz_rkb" src="https://documentation.media5corp.com/download/attachments/45482024/pencilgris.png" width="13"> located on the same line as the configuration to
                    edit. </span>
            </li><li class="li step">
                <span class="ph cmd">Edit the configuration directly in the script field.</span>
            </li><li class="li step">
                <span class="ph cmd">Click <span class="keyword wintitle">Save</span>.</span>
            </li></ol></section>
        <section class="section result"><div class="tasklabel"><strong class="sectiontitle tasklabel">Result</strong></div>
            <p class="p">When editing a configuration with logical statements, the syntax of the statements is
                verified upon saving. If there is a syntax error, the configuration is still saved
                but an error will be displayed.</p>
        </section>
    </div>
</article></article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic nested0 nobody" aria-labelledby="ariaid-title6" id="topic_title_Examples_d1e20">
   <h1 class="title topictitle1" id="ariaid-title6">Examples</h1>
<article class="topic reference nested1" aria-labelledby="ariaid-title7" id="reference_tk4_jmk_vkb">
  <h2 class="title topictitle2" id="ariaid-title7">Multiple Firmware Upgrade Before Provisioning</h2>
  <div class="body refbody">
    <section class="section">
      <pre class="pre codeblock"><code>%if unit.firmware.version &lt; 2.0.38
    # Trigger intermediate firmware upgrade using uncompressed .ZIP files.
    ...
%elseif unit.firmware.version != 45.3.1971
    # Ensure all units are on DGW version 45.3.1971.
    Fpu.MfpUrl = "URL to the .bin firmware file"
    Fpu.AutomaticRestartEnable = "Enable"
    # Launch firmware upgrade
    Fpu.Install
%else
    # Provision only when units are on firmware 45.3.1971
    SipEp.DefaultStaticRegistrarServerHost = "my_registar_fqdn"
    SipEp.DefaultStaticProxyHomeDomainHost = "my_proxy_ip_address"
    ...
%endif</code></pre>
    </section>
    <section class="section">
      <p class="p">The above configuration group in Virtuo would have the following behavior for units
        contacting Virtuo:</p>
      <table class="table" id="reference_tk4_jmk_vkb__table_myv_23q_vkb"><caption></caption><colgroup><col style="width:35.97122302158273%"><col style="width:64.02877697841726%"></colgroup><thead class="thead">
            <tr class="row">
              <th class="entry colsep-1 rowsep-1" id="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__1"> Unit Firmware Version Examples</th>
              <th class="entry colsep-1 rowsep-1" id="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__2">Returned Configuration </th>
            </tr>
          </thead><tbody class="tbody">
            <tr class="row">
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__1">Dgw 2.0.32.599</td>
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__2">
                <p class="p"># Trigger intermediate firmware upgrade using uncompressed .ZIP files.</p>
                <p class="p">...</p>
              </td>
            </tr>
            <tr class="row">
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__1">
                <p class="p">Dgw 2.0.40.761</p>
                <p class="p">Dgw 42.1.857</p>
                <p class="p">Dgw 46.0.1234</p>
              </td>
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__2">
                <p class="p"># Ensure all units are on DGW version 45.3.1971.</p>
                <p class="p">Fpu.MfpUrl = "URL to the .bin firmware file"</p>
                <p class="p">Fpu.AutomaticRestartEnable = "Enable"</p>
                <p class="p"># Launch firmware upgrade</p>
                <p class="p">Fpu.Install</p>
              </td>
            </tr>
            <tr class="row">
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__1">
                <p class="p">Dgw 45.3.1971</p>
                <p class="p">Dgw 45.3.1971-526-g2328c6252</p>
              </td>
              <td class="entry colsep-1 rowsep-1" headers="reference_tk4_jmk_vkb__table_myv_23q_vkb__entry__2">
                <p class="p"># Provision only when units are on firmware 45.3.1971</p>
                <p class="p">SipEp.DefaultStaticRegistrarServerHost = "my_registar_fqdn"</p>
                <p class="p">SipEp.DefaultStaticProxyHomeDomainHost = "my_proxy_ip_address"</p>
                <p class="p">…</p>
              </td>
            </tr>
          </tbody></table>
    </section>
  </div>
</article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic reference nested1" aria-labelledby="ariaid-title8" id="reference_tk4_jmk_vkc">
  <h2 class="title topictitle2" id="ariaid-title8">Different Provisioning Per Unit Model</h2>
  <div class="body refbody">
    <section class="section">
      <pre class="pre codeblock"><code># Provision external scripts, depending on the User-Agent header.
%if unit.user_agent =~ "Mediatrix C711"
    Conf.ScriptsTransferAndRun GenericFileName="c711.cfg" ...
%elseif unit.user_agent =~ "Mediatrix C731"
    Conf.ScriptsTransferAndRun GenericFileName="c731.cfg" ...
%endif
</code></pre>
    </section>
    <section class="section">
      <p class="p">Note that the above configuration uses the "=~" comparison operator, instead of the usual "==" operator.
      This is needed since the User-Agent header contains a lot of information, and it is often desirable to check
      against a subset of the whole header.</p>
      <p class="p">Examples of User-Agent header content:</p>
      <ul class="ul">
        <li class="li">Mediatrix 4102S/v48.0.2359-242-g6c0c355f2 4102-MX-D2000-449</li>
        <li class="li">Mediatrix C731/v48.4.2631 CXXX-MX-D2000-370</li>
        <li class="li">Mediatrix Sentinel 100 - 2 PRI 4 BRI 8 FXS 4 FXO/v48.4.2631 S100-MX-D2000-338</li>
        <li class="li">Mediatrix Sentinel/v48.4.2631 STNL-MX-D2000-492</li>
      </ul>
    </section>
  </div>
</article></article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic reference nested0" aria-labelledby="ariaid-title9" id="reference_ur5_yx3_ps">
  <h1 class="title topictitle1" id="ariaid-title9">Available Documentation</h1>

  <div class="body refbody">

    <section class="section">For more details, refer to the <a class="xref" href="https://documentation.media5corp.com/display/DGWLATEST/Latest+DGW" target="_blank">Mediatrix Documentation</a> published on the <a class="xref" href="https://documentation.media5corp.com/" target="_blank">Media5 Documentation Portal</a>.</section>

  </div>
</article><hr><span style="float: inline-end;"><a href="#">Top</a></span><article class="topic concept nested0" aria-labelledby="ariaid-title10" id="concept_fqm_rv4_k4">
 <h1 class="title topictitle1" id="ariaid-title10">Copyright Notice</h1>
 

 <div class="body conbody"><p class="shortdesc">Copyright © 2023 Media5 Corporation.</p>
  <p class="p">This document contains information that is proprietary to Media5 Corporation.</p>
  <p class="p">Media5 Corporation reserves all rights to this document as well as to the Intellectual Property
   of the document and the technology and know-how that it includes and represents.</p>
  <p class="p">This publication cannot be reproduced, neither in whole nor in part, in any form whatsoever,
   without written prior approval by Media5 Corporation.</p>
  <p class="p">Media5 Corporation reserves the right to revise this publication and make changes at any time
   and without the obligation to notify any person and/or entity of such revisions and/or
   changes.</p>
 </div>
</article></article></main></body></html>