<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2166/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/Notes+on+Ice+Config+Files">Notes on Ice Config Files</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~khunt">Ken Hunt</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>{info}  <br></td></tr>
            <tr><td class="diff-changed-lines" >Developer note: The getName() operation in the C++ base component returns the IceBox service name of a <span class="diff-changed-words">component<span class="diff-added-chars"style="background-color: #dfd;">, or in other words, the Asterisk SCF instance id</span>.</span> <br></td></tr>
            <tr><td class="diff-unchanged" >{info} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="NotesonIceConfigFiles-Introduction"></a>Introduction</h2>

<p>This page provides information on the nature of the Ice configuration files that allow the Asterisk SCF components to find the Service Locator, and publish their services to other components in the system. </p>

<h2><a name="NotesonIceConfigFiles-IceBoxServiceName%3DAsteriskSCFComponentinstanceid"></a>IceBox Service Name = Asterisk SCF Component instance id</h2>

<p>In general, configuration properties derive from the IceBox service name of the component. To recognize the IceBox service name, when you see:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>IceBox.Service.TestBridge=bridgeservice:create
</pre>
</div></div>

<p>The IceBox service name is "TestBridge". This name is used as the Component's instance name in Asterisk SCF. </p>

<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>Just FYI, the name on the right-side of the equals sign identifies the library (or DLL) and the operation in that library used by IceBox to create the service. So in this case, an operation named "create()" in a library named "bridgeservice.so" (or bridgeservice.dll) will be invoked by IceBox to create a service named TestBridge.</td></tr></table></div>

<p>For the Service Adapter (the adapter used to publish the primary interfaces that the component provides to the Asterisk SCF system), the properties are prefixed with:</p>

<p>&lt;instanceName&gt;.ServiceAdapter</p>

<p>For the backplane services (used for Asterisk SCF plumbing tasks, such as replication, configuration, component services, etc.):</p>

<p>&lt;instanceName&gt;.BackplaneAdapter</p>

<p>So, in a test, if you want to explicitly specify the Endpoints for the TestBridge, you'd have something like:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>TestBridge.ServiceAdapter.Endpoints=default -p 57011
TestBridge.BackplaneAdapter.Endpoints=default -p 57012
</pre>
</div></div>

<p>For any other property, you would just prefix with the component's instance id, like this:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>TestBridge.Standalone = true
</pre>
</div></div>

<p>Note that using the component's instance id (rather than something generic, such as "Bridge") is useful if you ever want to run more than one instance of the service in the same IceBox instance, which can be hand during testing.</p>

<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>Developer note: The getName() operation in the C++ base component returns the IceBox service name of a component, or in other words, the Asterisk SCF instance id.</td></tr></table></div>

<h2><a name="NotesonIceConfigFiles-Globalparams"></a>Global params</h2>

<p>The service locator and service locator management interfaces are considered global, and should by specified as:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>LocatorService.Proxy=LocatorService:tcp -p 4411
LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
</pre>
</div></div>

<h2><a name="NotesonIceConfigFiles-ServiceDiscoverParamsforthecomponent"></a>Service Discover Params for the component</h2>

<p>The component will register with the Service Locator using parameters based on a Category for a particular interface, a service name and component instance id. The category is defined in slice. The component instance id is the same as the IceBox service name. </p>

<p>If the component wishes to use a service locator Service Name other than "default" (for example, "test", it should define:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>TestBridge.ServiceName=test
</pre>
</div></div>

<p>If this property is omitted, the ServiceName used for registering with the Service Locator will be "default". </p>
    </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/Notes+on+Ice+Config+Files">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=18415834&revisedVersion=11&originalVersion=10">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/TOP/Notes+on+Ice+Config+Files?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>