<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=TOP&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/TOP/IceBox+Configuration+for+Components">IceBox Configuration for Components</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~beagles">Brent Eagles</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        Added link to reference page on the base class code/api<br />
    </div>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >h1. Base Component Classes <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Asterisk SCF is a system comprised of function-specific components. While components may have independent and unique duties, they share a set of common features. After some initial development on the fundamental components, the common functionality was identified and refactored into <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">[</span>two</span> base <span class="diff-changed-words">classes<span class="diff-added-chars"style="background-color: #dfd;">|Base classes for Asterisk SCF Components]</span>:</span> {{AsteriskSCF::Component::Component}} and {{AsteriskSCF::Component::ComponentStateReplicator}}. As there are configuration properties associated with the refactored functionality, these were also refactored and have become a _de facto_ set of standard configuration properties. While various components may support additional properties, any that are built using these base classes automatically support the properties described here. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h1. Common Property Reference <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="IceBoxConfigurationforComponents-BaseComponentClasses"></a>Base Component Classes</h1>

<p>Asterisk SCF is a system comprised of function-specific components. While components may have independent and unique duties, they share a set of common features. After some initial development on the fundamental components, the common functionality was identified and refactored into <a href="/wiki/display/TOP/Base+classes+for+Asterisk+SCF+components" title="Base classes for Asterisk SCF components">two base classes</a>: <tt>AsteriskSCF::Component::Component</tt> and <tt>AsteriskSCF::Component::ComponentStateReplicator</tt>. As there are configuration properties associated with the refactored functionality, these were also refactored and have become a <em>de facto</em> set of standard configuration properties. While various components may support additional properties, any that are built using these base classes automatically support the properties described here.</p>

<h1><a name="IceBoxConfigurationforComponents-CommonPropertyReference"></a>Common Property Reference</h1>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Several of the properties referred to here are fully documented in the <a href="http://doc.zeroc.com/display/Ice/Ice+Manual" class="external-link" rel="nofollow">Ice Manual</a>. Since ZeroC has already done an excellent job, the descriptions are not repeated here.</td></tr></table></div> 

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property </th>
<th class='confluenceTh'> Valid Values/Examples </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> IceBox.InheritProperties </td>
<td class='confluenceTd'> 0,1 </td>
<td class='confluenceTd'> By default, the configuration file specified on the IceBox command line configures the IceBox server instance, not the IceBox services loaded by the configuration file. Including this property in the configuration file with a value of 1 causes the IceBox instance to configure the <tt>Ice::Communicator</tt> instances for each IceBox service with the properties of the file. If set to 0 (the default), the configuration for each IceBox service needs to be specified through alternate mechanisms (e.g. the IceBox.Service property for that component). Enabling this property makes configuration convenient. Complex deployments may benefit from keep configuration for each component separate. </td>
</tr>
<tr>
<td class='confluenceTd'> Ice.Default.CollocationOptimized </td>
<td class='confluenceTd'> 0,1 </td>
<td class='confluenceTd'> Ice allows calls on Ice objects that are local to the current process to be made directly, bypassing the usual remote procedure call mechanisms. These calls are essentially the same as direct calls on the servant objects. If collocation optimization is disabled, all calls through a proxy on an object, local or otherwise, are treated the same. Many components in Asterisk SCF will have collocation optimization disabled because AMI and AMD are used quite heavily and IceBox services loaded in the same IceBox server instance cannot use collocation optimized calls. </td>
</tr>
<tr>
<td class='confluenceTd'> Ice.ThreadPool.Client.Size </td>
<td class='confluenceTd'> n </td>
<td class='confluenceTd'> Configures the number of threads available to handle request replies and dispatch AMI requests. Asterisk SCF makes heavy use of AMI so a value of at least 4 is necessary. As production systems are likely to need more, configuring a resizable client thread pool may be necessary (TODO: link?)</td>
</tr>
<tr>
<td class='confluenceTd'> IceBox.Service.&lt;Component Instance ID&gt; </td>
<td class='confluenceTd'> &lt;library name&gt;:&lt;entry point&gt; [ options ]</td>
<td class='confluenceTd'> This property tells IceBox to load the component in <em>library name</em>, invoke the function <em>entry point</em>, possibly passing in command line arguments. The <em>Component Instance Id</em> part of the property name is important as it will serve as the prefix for several other configuration properties as well as set the component identifier when registering the component with the service locator. The <em>library name</em> identifies the DLL or shared library file name. IceBox adds the appropriate prefix, suffix and filename extension for the build configuration and operating system when locating and loading the library. </td>
</tr>
<tr>
<td class='confluenceTd'> &lt;Component ID&gt;.ServiceAdapter.[Object Adapter Properties] </td>
<td class='confluenceTd'> see <a href="http://doc.zeroc.com/display/Ice/Ice+Manual" class="external-link" rel="nofollow">Ice manual</a> </td>
<td class='confluenceTd'> Properties with the prefix &lt;Component ID&gt;.ServiceAdapter. configure the component's object adapter for providing functional services. The service adapter is where your service specific objects should be activated (e.g. bridge manager or routing implementation) </td>
</tr>
<tr>
<td class='confluenceTd'> &lt;Component ID&gt;.BackplaneAdapter.[Object Adapter Properties] </td>
<td class='confluenceTd'> see <a href="http://doc.zeroc.com/display/Ice/Ice+Manual" class="external-link" rel="nofollow">Ice manual</a> </td>
<td class='confluenceTd'> Properties with the prefix &lt;Component ID&gt;.BackplaneAdapter. configure the component's object adapter for providing administrative and infrastructure related services(e.g. replica status, component control, etc) </td>
</tr>
<tr>
<td class='confluenceTd'> LocatorService.Proxy </td>
<td class='confluenceTd'> An Ice object reference, e.g. LocatorService:default -h ascfhost -p 4421 </td>
<td class='confluenceTd'> Asterisk SCF components are accessed through discovery. Nearly all Asterisk SCF components and applications will require an object reference to access a service locator component. The actual form and values of the object reference depends on the deployment </td>
</tr>
<tr>
<td class='confluenceTd'> LocatorServiceManagement.Proxy </td>
<td class='confluenceTd'> An Ice object reference, e.g. LocatorServicemanager:default -h ascfhost -p 4422 </td>
<td class='confluenceTd'> Asterisk SCF components that provide services must register with the locator. Since registration with the service locator may require stricter access control than the discovery objects, the management of registering services is done through a different object accessible through a distinct set of endpoints. </td>
</tr>
</tbody></table>
</div>


<p>The number of common properties is quite short. It is likely that components will introduce their own properties. The Asterisk SCF <a href="#IceBoxConfigurationforComponents-exconfig">example configurations</a> serve as useful examples.</p>

<h1><a name="IceBoxConfigurationforComponents-ExampleConfigurationFiles"></a><a name="IceBoxConfigurationforComponents-exconfig"></a> Example Configuration Files</h1>

<h2><a name="IceBoxConfigurationforComponents-CoreComponents"></a>Core Components </h2>
<ul>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/ServiceDiscovery.conf?hb=true" class="external-link" rel="nofollow">ServiceDiscovery.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/Logger.conf?hb=true" class="external-link" rel="nofollow">Logger.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/BridgeManager.conf?hb=true" class="external-link" rel="nofollow">BridgeManager.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/RoutingService.conf?hb=true" class="external-link" rel="nofollow">RoutingService.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/MediaServiceRTP.conf?hb=true" class="external-link" rel="nofollow">MediaServiceRTP.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/MediaOperationCore.conf?hb=true" class="external-link" rel="nofollow">MediaOperationCore.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/MediaFormatGeneric.conf?hb=true" class="external-link" rel="nofollow">MediaFormatGeneric.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/SipService.conf?hb=true" class="external-link" rel="nofollow">SipService.conf</a></li>
</ul>


<h2><a name="IceBoxConfigurationforComponents-ReplicatorComponents"></a>Replicator Components </h2>
<ul>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/ServiceDiscoveryStateReplicator.conf?hb=true" class="external-link" rel="nofollow">ServiceDiscoveryStateReplicator.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/BridgeStateReplicator.conf?hb=true" class="external-link" rel="nofollow">BridgeStateReplicator.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/RoutingStateReplicator.conf?hb=true" class="external-link" rel="nofollow">RoutingStateReplicator.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/MediaServiceRTPStateReplicator.conf?hb=true" class="external-link" rel="nofollow">MediaServiceRTPStateReplicator.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/MediaOperationCoreStateReplicator.conf?hb=true" class="external-link" rel="nofollow">MediaOperationCoreStateReplicator.conf</a></li>
        <li><a href="https://code.asterisk.org/code/browse/astscf-examples/configs/SipStateReplicator.conf?hb=true" class="external-link" rel="nofollow">SipStateReplicator.conf</a></li>
</ul>


<h2><a name="IceBoxConfigurationforComponents-AlternativeView"></a>Alternative View </h2>

<ul>
        <li><a href="http://git.asterisk.org/gitweb/?p=asterisk-scf/examples.git;a=tree" class="external-link" rel="nofollow">GitWeb</a></li>
</ul>



    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=TOP">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://wiki.asterisk.org/wiki/display/TOP/IceBox+Configuration+for+Components">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=19009520&revisedVersion=8&originalVersion=7">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/TOP/IceBox+Configuration+for+Components?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>