<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/Component+Configuration">Component Configuration</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~beagles">Brent Eagles</a>
    </h4>
        <br/>
                         <h4>Changes (3)</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" >This page contains information regarding dynamic configuration of Asterisk SCF components. This is not to be confused with load-time Ice configuration. <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Each component contains a Python script designed to aid in configuration of the component. The configurator uses Python&#39;s ConfigParser class to read [.ini-style|http://en.wikipedia.org/wiki/INI_file] text files. For those familiar with Asterisk&#39;s text configuration files, the format should be familiar. The file is composed of sections, denoted with a name in square brackets, and items, denoted with a {{name=value}} syntax. In the majority of cases, {{ConfigurationGroups}} correspond to a section of the file, and {{ConfigurationItems}} correspond to one or more of the items in the file. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Each component that supports or requires configuration contains a configuration utility in the form of a Python script. The configurator uses Python&#39;s ConfigParser class to read [.ini-style|http://en.wikipedia.org/wiki/INI_file] text files. Those experienced with Asterisk&#39;s text configuration files will find the format familiar. The file is composed of sections, denoted with a name in square brackets, and items, denoted with a {{name=value}} syntax. In the majority of cases, {{ConfigurationGroups}} correspond to a section of the file, and {{ConfigurationItems}} correspond to one or more of the items in the file. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Running the Configurator  <br> <br>Configurators rely on some environment variables to be set. First, you&#39;ll need to add a couple of items to your {{PYTHONPATH}}. You will need to add the path to Ice&#39;s python definitions (on Linux, this is /opt/Ice-3.4.2/python/ by default) and the path to the Asterisk SCF {{configurator}} repo. You will also need to set the {{ASTSCF_HOME}} environment variable. This is the path to the {{slice}} subdirectory of the Asterisk SCF {{slice}} repo. On Unix-like systems, this is done using the following command:  <br> <br>{noformat}  <br>$ export PYTHONPATH=/opt/Ice-3.4.2/python:/home/asteriskscf/gitall/configurator  <br>$ export ASTSCF_HOME=/home/asteriskscf/gitall/slice/slice  <br>{noformat}  <br> <br>Now that you have the appropriate environment variables set up, you can actually run the configurator script. Below is an example for how you would run the SIP configurator script.  <br> <br>{noformat}  <br>$ cd /home/asteriskscf/gitall/sip/config  <br>$ ./SipConfigurator.py --wipe --config=Sip.config --locator=&quot;LocatorService:tcp -p 4411&quot;  <br>{noformat}  <br> <br>h2. Sample Configuration Files <br> <br>For your convenience, here are links to the sample configuration files for all components that support dynamic configuration over Ice. The same content can be found in each of the component repositories in the {{config/}} directory.  <br> <br>|| Component || Link to Configuration File || <br>| SIP Session Gateway | https://code.asterisk.org/code/browse/astscf-sip-release/config/Sip.config?hb=true | <br>| RTP Media Gateway | https://code.asterisk.org/code/browse/astscf-media_rtp_pjmedia-release/config/Rtp.config?hb=true | <br>| Generic Media Format | https://code.asterisk.org/code/browse/astscf-mediaformatgeneric-release/config/MediaFormatGeneric.config?hb=true | <br>| Logging Service | https://code.asterisk.org/code/browse/astscf-logger-release/server/config/Logger.config?hb=true | <br>| UDPTL Media Gateway | https://code.asterisk.org/code/browse/astscf-media_transport_udptl-release/config/Udptl.config?hb=true | <br> <br>h1. Configuration Reference <br>{note} <br>This reference may not always be up to date with the current set of configuration properties. The _true_ reference is the code. Please add a comment if you notice inconsistencies or update it yourself if you have write access! <br>{note} <br></td></tr>
            <tr><td class="diff-unchanged" >Below, all {{ConfigurationGroups}} and {{ConfigurationItems}} defined by each component are listed, along with their corresponding configurator syntax. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="ComponentConfiguration-Configuration"></a>Configuration</h1>
<p>This page contains information regarding dynamic configuration of Asterisk SCF components. This is not to be confused with load-time Ice configuration.</p>

<p>Each component that supports or requires configuration contains a configuration utility in the form of a Python script. The configurator uses Python's ConfigParser class to read <a href="http://en.wikipedia.org/wiki/INI_file" class="external-link" rel="nofollow">.ini-style</a> text files. Those experienced with Asterisk's text configuration files will find the format familiar. The file is composed of sections, denoted with a name in square brackets, and items, denoted with a <tt>name=value</tt> syntax. In the majority of cases, <tt>ConfigurationGroups</tt> correspond to a section of the file, and <tt>ConfigurationItems</tt> correspond to one or more of the items in the file.</p>

<h1><a name="ComponentConfiguration-RunningtheConfigurator"></a>Running the Configurator </h1>

<p>Configurators rely on some environment variables to be set. First, you'll need to add a couple of items to your <tt>PYTHONPATH</tt>. You will need to add the path to Ice's python definitions (on Linux, this is /opt/Ice-3.4.2/python/ by default) and the path to the Asterisk SCF <tt>configurator</tt> repo. You will also need to set the <tt>ASTSCF_HOME</tt> environment variable. This is the path to the <tt>slice</tt> subdirectory of the Asterisk SCF <tt>slice</tt> repo. On Unix-like systems, this is done using the following command: </p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre> 
$ export PYTHONPATH=/opt/Ice-3.4.2/python:/home/asteriskscf/gitall/configurator 
$ export ASTSCF_HOME=/home/asteriskscf/gitall/slice/slice 
</pre>
</div></div> 

<p>Now that you have the appropriate environment variables set up, you can actually run the configurator script. Below is an example for how you would run the SIP configurator script. </p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre> 
$ cd /home/asteriskscf/gitall/sip/config 
$ ./SipConfigurator.py --wipe --config=Sip.config --locator="LocatorService:tcp -p 4411" 
</pre>
</div></div> 

<h2><a name="ComponentConfiguration-SampleConfigurationFiles"></a>Sample Configuration Files</h2>

<p>For your convenience, here are links to the sample configuration files for all components that support dynamic configuration over Ice. The same content can be found in each of the component repositories in the <tt>config/</tt> directory. </p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Component </th>
<th class='confluenceTh'> Link to Configuration File </th>
</tr>
<tr>
<td class='confluenceTd'> SIP Session Gateway </td>
<td class='confluenceTd'> <a href="https://code.asterisk.org/code/browse/astscf-sip-release/config/Sip.config?hb=true" class="external-link" rel="nofollow">https://code.asterisk.org/code/browse/astscf-sip-release/config/Sip.config?hb=true</a> </td>
</tr>
<tr>
<td class='confluenceTd'> RTP Media Gateway </td>
<td class='confluenceTd'> <a href="https://code.asterisk.org/code/browse/astscf-media_rtp_pjmedia-release/config/Rtp.config?hb=true" class="external-link" rel="nofollow">https://code.asterisk.org/code/browse/astscf-media_rtp_pjmedia-release/config/Rtp.config?hb=true</a> </td>
</tr>
<tr>
<td class='confluenceTd'> Generic Media Format </td>
<td class='confluenceTd'> <a href="https://code.asterisk.org/code/browse/astscf-mediaformatgeneric-release/config/MediaFormatGeneric.config?hb=true" class="external-link" rel="nofollow">https://code.asterisk.org/code/browse/astscf-mediaformatgeneric-release/config/MediaFormatGeneric.config?hb=true</a> </td>
</tr>
<tr>
<td class='confluenceTd'> Logging Service </td>
<td class='confluenceTd'> <a href="https://code.asterisk.org/code/browse/astscf-logger-release/server/config/Logger.config?hb=true" class="external-link" rel="nofollow">https://code.asterisk.org/code/browse/astscf-logger-release/server/config/Logger.config?hb=true</a> </td>
</tr>
<tr>
<td class='confluenceTd'> UDPTL Media Gateway </td>
<td class='confluenceTd'> <a href="https://code.asterisk.org/code/browse/astscf-media_transport_udptl-release/config/Udptl.config?hb=true" class="external-link" rel="nofollow">https://code.asterisk.org/code/browse/astscf-media_transport_udptl-release/config/Udptl.config?hb=true</a> </td>
</tr>
</tbody></table>
</div>


<h1><a name="ComponentConfiguration-ConfigurationReference"></a>Configuration Reference</h1>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This reference may not always be up to date with the current set of configuration properties. The <em>true</em> reference is the code. Please add a comment if you notice inconsistencies or update it yourself if you have write access!</td></tr></table></div>
<p>Below, all <tt>ConfigurationGroups</tt> and <tt>ConfigurationItems</tt> defined by each component are listed, along with their corresponding configurator syntax.</p>

<style type='text/css'>/*<![CDATA[*/
div.rbtoc1337265302124 {margin-left: 1.5em;padding: 0px;}
div.rbtoc1337265302124 ul {list-style: disc;margin-left: 0px;}
div.rbtoc1337265302124 li {margin-left: 0px;padding-left: 0px;}

/*]]>*/</style><div class='rbtoc1337265302124'>
<ul>
    <li><a href='#ComponentConfiguration-SampleConfigurationFiles'>Sample Configuration Files</a></li>
    <li><a href='#ComponentConfiguration-SIP'>SIP</a></li>
    <li><a href='#ComponentConfiguration-MediaRTPPJMedia'>MediaRTPPJMedia</a></li>
    <li><a href='#ComponentConfiguration-MediaFormatGeneric'>MediaFormatGeneric</a></li>
    <li><a href='#ComponentConfiguration-Logger'>Logger</a></li>
    <li><a href='#ComponentConfiguration-MediaTransportUDPTL'>MediaTransportUDPTL</a></li>
</ul></div>
<h2><a name="ComponentConfiguration-SIP"></a>SIP</h2>

<style type="text/css">
@media all {
    .expand-content { margin-left: 20px; }
    .expand-control-icon { display: inline-block; width: 20px; }
    .expand-control-text { vertical-align: top; text-decoration:none; }
    .expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
    .expand-hidden { display: none; }
    .expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
    /* show expander text in print */
    .expand-content { display: block !important; }
}
</style>

                 <div id="expander-688264065" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
    <div class="expand-content"><p>All SIP configuration groups derive from the <tt>SipConfigurationGroup</tt> class, and all SIP configuration items derive from the <tt>SipConfigurationItem</tt> class. SIP provides the <tt>SipConfigurationGroupVisitor</tt> as a means of visiting SIP configuration groups and the <tt>SipConfigurationItemVisitor</tt> as a means of visiting SIP configuration items.</p>
<div>
<ul>
    <li><a href='#ComponentConfiguration-SipGeneralGroup'>SipGeneralGroup</a></li>
    <li><a href='#ComponentConfiguration-SipEndpointGroup'>SipEndpointGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-SipRoutingItem'>SipRoutingItem</a></li>
    <li><a href='#ComponentConfiguration-IdentityItem'>IdentityItem</a></li>
    <li><a href='#ComponentConfiguration-IdentityGroupRef'>IdentityGroupRef</a></li>
    <li><a href='#ComponentConfiguration-SipHostItem'>SipHostItem</a></li>
    <li><a href='#ComponentConfiguration-SipSourceTransportAddressItem'>SipSourceTransportAddressItem</a></li>
    <li><a href='#ComponentConfiguration-SipTargetDestinationAddressItem'>SipTargetDestinationAddressItem</a></li>
    <li><a href='#ComponentConfiguration-SipSignalingNATItem'>SipSignalingNATItem</a></li>
    <li><a href='#ComponentConfiguration-SipMediaNATItem'>SipMediaNATItem</a></li>
    <li><a href='#ComponentConfiguration-SRTPCryptoItem'>SRTPCryptoItem</a></li>
    <li><a href='#ComponentConfiguration-SipAllowableCallDirectionItem'>SipAllowableCallDirectionItem</a></li>
    <li><a href='#ComponentConfiguration-SipEndpointTransportItem'>SipEndpointTransportItem</a></li>
    <li><a href='#ComponentConfiguration-SipRTPMediaServiceItem'>SipRTPMediaServiceItem</a></li>
    <li><a href='#ComponentConfiguration-DirectMediaItem'>DirectMediaItem</a></li>
    <li><a href='#ComponentConfiguration-SipUDPTLMediaServiceItem'>SipUDPTLMediaServiceItem</a></li>
    <li><a href='#ComponentConfiguration-SipCryptoCertificateItem'>SipCryptoCertificateItem</a></li>
    <li><a href='#ComponentConfiguration-SipCrytpoRequirementsItem'>SipCrytpoRequirementsItem</a></li>
    <li><a href='#ComponentConfiguration-SipCryptoItem'>SipCryptoItem</a></li>
    <li><a href='#ComponentConfiguration-SipDTMFItem'>SipDTMFItem</a></li>
    <li><a href='#ComponentConfiguration-SipMediaFormatItem'>SipMediaFormatItem</a></li>
    <li><a href='#ComponentConfiguration-SipRegistrationGroupRef'>SipRegistrationGroupRef</a></li>
</ul>
    <li><a href='#ComponentConfiguration-SipRegistrationGroup'>SipRegistrationGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-SipClientRegistrationItem'>SipClientRegistrationItem</a></li>
</ul>
    <li><a href='#ComponentConfiguration-SipDomainGroup'>SipDomainGroup</a></li>
    <li><a href='#ComponentConfiguration-IdentityGroup'>IdentityGroup</a></li>
    <li><a href='#ComponentConfiguration-SipTransportGroup'>SipTransportGroup</a></li>
    <li><a href='#ComponentConfiguration-SipUDPTransportGroup'>SipUDPTransportGroup</a></li>
    <li><a href='#ComponentConfiguration-SipTCPTransportGroup'>SipTCPTransportGroup</a></li>
    <li><a href='#ComponentConfiguration-SipTLSTransportGroup'>SipTLSTransportGroup</a></li>
    <li><a href='#ComponentConfiguration-SipSTUNTransportGroup'>SipSTUNTransportGroup</a></li>
</ul></div>
<h5><a name="ComponentConfiguration-SipGeneralGroup"></a>SipGeneralGroup</h5>
<p>This group contains general configuration items that either affect many aspects of SIP or that do not fit well into other groups. Currently there are no configuration items that belong to this group.</p>

<h5><a name="ComponentConfiguration-SipEndpointGroup"></a>SipEndpointGroup</h5>
<p>This group contains configuration that defines endpoints. The slice class is defined as</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * SIP Endpoint group, used to configure an endpoint
 */
class SipEndpointGroup extends SipConfigurationGroup
{
    /**
     * Name of the endpoint being configured
     */
    string name;
};</pre>
</div></div>
<p>In order to define an endpoint group using the built-in text-based configurator, the notation <tt>type=endpoint</tt> is required within the group. As an example<br/>
<tt>[~mmichelson:Bob]</tt><br/>
<tt>type=endpoint</tt><br/>
would create a <tt>SipEndpointGroup</tt> with the <tt>name</tt> member set to "Bob."</p>

<h6><a name="ComponentConfiguration-SipRoutingItem"></a>SipRoutingItem</h6>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This item may be pushed to the SIP component, but the SIP component ignores the item.</td></tr></table></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**             
 * Routing service configuration item
 */             
class SipRoutingItem extends SipConfigurationItem                                                      
{       
    /** 
     * Name of the routing service to use                                                              
     */ 
    string routingServiceName;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>routing=name_of_routing_service_to_use</tt>  </p>

<h6><a name="ComponentConfiguration-IdentityItem"></a>IdentityItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">class IdentityItem extends SipConfigurationItem
{
    string name;
    string number;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>name=Bob</tt><br/>
<tt>number=+1-000-555-6451</tt></p>

<h6><a name="ComponentConfiguration-IdentityGroupRef"></a>IdentityGroupRef</h6>
<p>This is an alternate method of specifying an ID for an endpoint. This allows you to refer to configured <tt>IdentityGroups</tt>. This is most useful if an endpoint should have multiple identities.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">class IdentityGroupRef extends SipConfigurationItem
{
    /**
     * Name of an identity group. 
     */
     string identityGroupName;
};</pre>
</div></div>
<p>Configurator Syntax:<br/>
The configurator allows for the setting of multiple <tt>IdentityGroupRefs</tt> with a single configuration line. The following will associate the endpoint with both the <tt>bob</tt> and <tt>alice</tt> <tt>IdentityGroups</tt>.<br/>
<tt>ids=bob,alice</tt></p>

<h6><a name="ComponentConfiguration-SipHostItem"></a>SipHostItem</h6>
<p>This is a general item for defining a host and port combination. There are several subclasses of this item. Hostnames, IPv4, and IPv6 addresses may be specified in the <tt>host</tt> member.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Host information configuration item
 */
class SipHostItem extends SipConfigurationItem
{
    /**
     * String containing the IP address or string address
     */
    string host;

    /**
     * Port number
     */
    int port;
};</pre>
</div></div>

<h6><a name="ComponentConfiguration-SipSourceTransportAddressItem"></a>SipSourceTransportAddressItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">The source address is used to determine the address from which to source outbound requests. It is also used as the source for outbound media.
/**
 * Source transport address configuration item
 */
class SipSourceTransportAddressItem extends SipHostItem
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>sourcehost=127.0.0.1</tt><br/>
<tt>sourceport=5060</tt></p>

<h6><a name="ComponentConfiguration-SipTargetDestinationAddressItem"></a>SipTargetDestinationAddressItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Target destination address configuration item
 */
class SipTargetDestinationAddressItem extends SipHostItem
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>targethost=192.168.0.1</tt><br/>
<tt>targetport=5060</tt></p>

<h6><a name="ComponentConfiguration-SipSignalingNATItem"></a>SipSignalingNATItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Signaling NAT configuration item
 */
class SipSignalingNATItem extends SipConfigurationItem
{
    /**
     * Boolean for whether STUN is enabled
     */
    bool stun;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>enablestun=false</tt></p>

<h6><a name="ComponentConfiguration-SipMediaNATItem"></a>SipMediaNATItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Media NAT configuration item
 */
class SipMediaNATItem extends SipConfigurationItem
{
    /**
     * Boolean for whether ICE is enabled
     */
    bool enableICE;

    /**
     * Boolean for whether TURN is enabled
     */
    bool enableTURN;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>enablertpoverice=false</tt><br/>
<tt>enableturn=false</tt></p>

<h6><a name="ComponentConfiguration-SRTPCryptoItem"></a>SRTPCryptoItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * SRTP Crypto Key information.
 */
class SRTPCryptoKey
{
    /**
     * The cipher suite name.
     */
    string suite;

    /**
     * The key information for the suite.
     */
    string cryptoKey;
};

/**
 * SRTP crypto configuration.
 */
class SRTPCryptoItem extends SipConfigurationItem
{

    /**
     * Most of the time the following values will be false. They can be overriden to be true however.
     */
    bool enableAuthentication;
    bool enableEncryption;

    /**
     * The suites and keys supported by this endpoint.
     */
    SRTPCryptoKeySeq cryptoKeys;
};</pre>
</div></div>
<p>Configurator syntax:</p>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The SIP code in Asterisk SCF supports multiple <tt>CryptoKeys</tt> in an <tt>SRTPCryptoItem</tt> but the configurator only supports the setting of one at the moment.</td></tr></table></div>
<p><tt>enableauth=false</tt><br/>
<tt>enableencryption=false</tt><br/>
<tt>ciphersuite=AES_CM_128_HMAC_SHA1_80</tt><br/>
<tt>cryptokey=<span class="error">&#91;~mmichelson:some key&#93;</span></tt></p>

<h6><a name="ComponentConfiguration-SipAllowableCallDirectionItem"></a>SipAllowableCallDirectionItem</h6>
<p>This controls the direction that calls can be made to and from the endpoint. The direction specified is from the viewpoint of Asterisk SCF, not the endpoint.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Allowable call directions
 */
enum SipAllowableCallDirection
{
    Disabled,
    Inbound,
    Outbound,
    Both,
};

/**
 * Allowable call direction item
 */
class SipAllowableCallDirectionItem extends SipConfigurationItem
{
    /**
     * What direction is permitted for this endpoint
     */
    SipAllowableCallDirection callDirection = Both;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>direction=outbound</tt></p>

<h6><a name="ComponentConfiguration-SipEndpointTransportItem"></a>SipEndpointTransportItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Transport information configuration item
 */
class SipEndpointTransportItem extends SipConfigurationItem
{
    /**
     * What directions to require secure transport in
     */
    SipAllowableCallDirection secureTransport = Disabled;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>securetransport=inbound</tt></p>

<h6><a name="ComponentConfiguration-SipRTPMediaServiceItem"></a>SipRTPMediaServiceItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * RTP Media service configuration item
 */
class SipRTPMediaServiceItem extends SipConfigurationItem
{
    /**
     * Name of the RTP media service to use
     */
    string mediaServiceName;

    /**
     * Whether to choose an IPv6 RTP media service or not
     */
    bool requireIPv6 = false;
};</pre>
</div></div>
<p>Configurator syntax</p>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The configurator currently does not have the capacity to set the <tt>mediaServiceName</tt></td></tr></table></div>
<p><tt>rtpoveripv6=false</tt></p>

<h6><a name="ComponentConfiguration-DirectMediaItem"></a>DirectMediaItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Direct media configuration item
 */
class DirectMediaItem extends SipConfigurationItem
{
    /**
     * Whether direct media support is enabled or not
     */
    bool enabled = false;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>directmedia=true</tt></p>

<h6><a name="ComponentConfiguration-SipUDPTLMediaServiceItem"></a>SipUDPTLMediaServiceItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * UDPTL Media service configuration item
 */
class SipUDPTLMediaServiceItem extends SipConfigurationItem
{
    /**
     * Name of the UDPTL media service to use
     */
    string mediaServiceName;

    /**
     * Whether to choose an IPv6 UDPTL media service or not
     */
    bool requireIPv6 = false;

    /**
     * Boolean for whether ICE is enabled
     */
    bool enableICE = false;

    /**
     * Boolean for whether TURN is enabled
     */
    bool enableTURN = false;
};</pre>
</div></div>
<p>Configurator syntax:</p>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>The configurator currently does not provide a way to set the <tt>mediaServiceName</tt></td></tr></table></div>
<p><tt>udptloveripv6=false</tt><br/>
<tt>udptloverice=false</tt><br/>
<tt>udptlwithturn=false</tt></p>

<h6><a name="ComponentConfiguration-SipCryptoCertificateItem"></a>SipCryptoCertificateItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Crypto certificate configuration item
 */
class SipCryptoCertificateItem extends SipConfigurationItem
{
    /**
     * Full location of certificate authority file
     */
    string certificateAuthority;

    /**
     * Full location of certificate file
     */
    string certificate;

    /**
     * Full location of private key file
     */
    string privateKey;

    /**
     * Password to open private key file
     */
    string privateKeyPassword;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>certificateauthorityfile=/home/bob/certs/mycert.ca</tt><br/>
<tt>certificatefile=/home/bob/certs/mycert.p12</tt><br/>
<tt>privateKey=/home/bob/certs/privatekey</tt><br/>
<tt>privateKeyPassword=litagano_motscoud</tt></p>

<h6><a name="ComponentConfiguration-SipCrytpoRequirementsItem"></a>SipCrytpoRequirementsItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Crypto requirement configuration item
 */
class SipCryptoRequirementsItem extends SipConfigurationItem
{
    /**
     * Require verification of server certificate
     */
    bool requireVerifiedServer = false;

    /**
     * Require verification of client certificate
     */
    bool requireVerifiedClient = false;

    /**
     * Require client certificate be present
     */
    bool requireClientCertificate = false;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>requireverifiedserver=false</tt><br/>
<tt>requireverifiedclient=false</tt><br/>
<tt>requireclientcertificate=false</tt></p>

<h6><a name="ComponentConfiguration-SipCryptoItem"></a>SipCryptoItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * TLS protocol methods
 */
enum TLSProtocolMethod
{
    PROTOCOLMETHODUNSPECIFIED,
    PROTOCOLMETHODTLSV1,
    PROTOCOLMETHODSSLV2,
    PROTOCOLMETHODSSLV3,
    PROTOCOLMETHODSSLV23,
};

/**
 * General crypto configuration item
 */
class SipCryptoItem extends SipConfigurationItem
{
    /**
     * TLS protocol method to use
     */
    TLSProtocolMethod protocolMethod = PROTOCOLMETHODUNSPECIFIED;

    /**
     * Supported ciphers (OpenSSL format)
     */
    string supportedCiphers;

    /**
     * Server name
     */
    string serverName;

    /**
     * TLS negotiation timeout in seconds
     */
    int timeout = 0;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>tlsprotocolmethod=sslv3</tt><br/>
<tt>supportedciphers=TLS_RSA_WITH_AES_128_CBC_SHA</tt><br/>
<tt>tlsservername=example.org</tt><br/>
<tt>tlstimeout=60</tt></p>

<h6><a name="ComponentConfiguration-SipDTMFItem"></a>SipDTMFItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Methods of transporting DTMF via SIP
 */
enum SipDTMFOption
{
    Inband,
    RFC4733,
    INFO,
};

/**
 * Denotes the method by which we will send DTMF to an endpoint
 */
class SipDTMFItem extends SipConfigurationItem
{
    SipDTMFOption dtmf = RFC4733;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>dtmfmethod=rfc4733</tt></p>

<h6><a name="ComponentConfiguration-SipMediaFormatItem"></a>SipMediaFormatItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
* Allowable media format item
*/
class SipMediaFormatItem extends SipConfigurationItem
{
   /**
    * Name of the media format
    */
   string name;

   /**
    * Sample rate for frames
    *
    * This is specified in Hz and has a default value of 8000. 
    */
   int sampleRate = 8000;

   /**
    * Amount of audio in frames
    *
    * This is specified in 
    */
   int frameSize;

   /**
    * Format specific attributes.
    */
   Ice::StringSeq formatSpecific;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
formats=ulaw/8000@20,alaw/8000</p>

<h6><a name="ComponentConfiguration-SipRegistrationGroupRef"></a>SipRegistrationGroupRef</h6>
<p>This allows for a SIP endpoint to refer to <tt>SipRegistrationGroup</tt> to associate client registration options with this particular endpoint.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">class SipRegistrationGroupRef extends SipConfigurationItem
{
    string registrationGroupName;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
The configurator supports the setting of multiple <tt>SipRegistrationGroupRefs</tt> with a single option. The following line will associate the endpoint with both the <tt>bob</tt> and <tt>alice</tt> <tt>SipRegistrationGroups</tt><br/>
<tt>registrations=bob,alice</tt></p>

<h5><a name="ComponentConfiguration-SipRegistrationGroup"></a>SipRegistrationGroup</h5>
<p>This group contains configuration that defines outbound registrations. The slice class is defined as</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * SIP Client Registration group. Used to configure
 * parameters relating to client registration
 */
class SipRegistrationGroup extends SipConfigurationGroup
{
    /**
     * Name for this registration group
     */
    string name;
};</pre>
</div></div>
<p>In order to define a registration group using the built-in text-based configurator, the notation <tt>type=registration</tt> is required within the group. As an example<br/>
<tt>[~mmichelson:Bob-Registration]</tt><br/>
<tt>type=registration</tt><br/>
would create a <tt>SipRegistrationGroup</tt> with the <tt>name</tt> member set to "Bob-Registration."</p>

<h6><a name="ComponentConfiguration-SipClientRegistrationItem"></a>SipClientRegistrationItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Information pertaining to a 
 * contact bound to a specific AOR
 */
struct ContactInfo
{
    /**
     * The URI for the contact. This
     * will be fed in directly to the
     * client registration code. This
     * must be formatted as a SIP or SIPs
     * URI. It may contain a display name.
     *
     * Examples:
     * "Bob" &lt;sip:bob@example.org&gt;
     * &lt;sip:alice@example.org&gt;
     */
    string contactURI;
    /**
     * Expiration for this contact in seconds
     */
    int expiration;
};

sequence&lt;ContactInfo&gt; ContactInfoSeq;

class SipClientRegistrationItem extends SipConfigurationItem
{
    /**
     * The AOR to which the contacts will
     * be bound.
     */
    string aor;
    /**
     * The contacts to bind to the AOR
     */
    ContactInfoSeq contacts;
    /**
     * The expiration to use for any contacts
     * with no explicit expiration set (i.e. a 0 expiration).
     * Units for expiration are seconds.
     */
    int defaultExpiration;
};</pre>
</div></div>
<p>Configurator Syntax:<br/>
<tt>aor=sip:bob@example.org</tt><br/>
<tt>contacts=sip:eng.bob@example.org/3600</tt><br/>
<tt>expiration=3600</tt></p>

<h5><a name="ComponentConfiguration-SipDomainGroup"></a>SipDomainGroup</h5>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This group is defined in slice, but there is no code that handles it, nor are there any configuration items that go with it</td></tr></table></div>

<h5><a name="ComponentConfiguration-IdentityGroup"></a>IdentityGroup</h5>
<p>This group contains configuration that defines an identity. The slice class is defined as</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">class IdentityGroup extends SipConfigurationGroup
{
    /** 
     * Identifier for this IdentityGroup. IdentityGroup
     * allows identities to be defined outside the body of 
     * an endpoint, and refrenced by name from the endpoint. 
     */
    string name;
};</pre>
</div></div>

<p><tt>IdentityGroup</tt> contains just an <a href="#ComponentConfiguration-IdentityItem">IdentityItem</a>.</p>

<p>In order to define an identity using the built-in text-based configurator, the notation <tt>type=identity</tt> is required within the group. As an example<br/>
<tt>[~mmichelson:Bob-Id]</tt><br/>
<tt>type=identity</tt><br/>
would create an <tt>IdentityGroup</tt> with the <tt>name</tt> member set to "Bob-Id."</p>
<h5><a name="ComponentConfiguration-SipTransportGroup"></a>SipTransportGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Generic SIP transport group that others derive from, primarily created since each one has
 * the requirement of a name
 */
class SipTransportGroup extends SipConfigurationGroup
{
    /**
     * Name of the specific transport. Since each one may have multiple transports this differentiates
     * them.
     */
    string name;
};</pre>
</div></div>

<p>All <tt>SipTransportGroups</tt> contain a <a href="#ComponentConfiguration-SipHostItem">SipHostItem</a>. It is configured as follows:<br/>
<tt>host=127.0.0.1</tt><br/>
<tt>port=5060</tt></p>

<p>Configurator syntax:<br/>
<tt>SipTransportGroups</tt> are not declared directly in the configurator. Rather, one of the subclasses of <tt>SipTransportGroup</tt> is used to identify the configuration group.</p>
<h5><a name="ComponentConfiguration-SipUDPTransportGroup"></a>SipUDPTransportGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Group of configuration items related to a UDP transport
 */
class SipUDPTransportGroup extends SipTransportGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
In order to create a UDP transport group, <tt>type=transport-udp</tt> needs to appear in the group.<br/>
<tt>[~mmichelson:Bob-UDP]</tt><br/>
<tt>type=transport-udp</tt><br/>
Would create a UDP transport group called "Bob-UDP."</p>

<h5><a name="ComponentConfiguration-SipTCPTransportGroup"></a>SipTCPTransportGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Group of configuration items related to a TCP transport
 */
class SipTCPTransportGroup extends SipTransportGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
In order to create a TCP transport group, <tt>type=transport-tcp</tt> needs to appear in the group.<br/>
<tt>[~mmichelson:Bob-TCP]</tt><br/>
<tt>type=transport-tcp</tt><br/>
Would create a TCP transport group called "Bob-TCP."</p>

<h5><a name="ComponentConfiguration-SipTLSTransportGroup"></a>SipTLSTransportGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Group of configuration items related to a TLS transport
 */
class SipTLSTransportGroup extends SipTransportGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
In order to create a TLS transport group, <tt>type=transport-tls</tt> needs to appear in the group.<br/>
<tt>[~mmichelson:Bob-TLS]</tt><br/>
<tt>type=transport-tls</tt><br/>
Would create a TLS transport group called "Bob-TLS."</p>

<h5><a name="ComponentConfiguration-SipSTUNTransportGroup"></a>SipSTUNTransportGroup</h5>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>There is currently a bug in the configurator such that it will not process STUN transport groups</td></tr></table></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Group of configuration items related to a STUN transport
 */
class SipSTUNTransportGroup extends SipTransportGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
In order to create a STUN transport group, <tt>type=transport-stun</tt> needs to appear in the group.<br/>
<tt>[~mmichelson:Bob-STUN]</tt><br/>
<tt>type=transport-stun</tt><br/>
Would create a STUN transport group called "Bob-STUN."</p>
</div>

<h2><a name="ComponentConfiguration-MediaRTPPJMedia"></a>MediaRTPPJMedia</h2>

<style type="text/css">
@media all {
    .expand-content { margin-left: 20px; }
    .expand-control-icon { display: inline-block; width: 20px; }
    .expand-control-text { vertical-align: top; text-decoration:none; }
    .expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
    .expand-hidden { display: none; }
    .expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
    /* show expander text in print */
    .expand-content { display: block !important; }
}
</style>

                 <div id="expander-570196035" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
    <div class="expand-content"><p>All RTP configuration groups derive from the <tt>RtpConfigurationGroup</tt> class, and all RTP configuration items derive from the <tt>RtpConfigurationItem</tt> class. <tt>MediaRTPPJMedia</tt> provides the <tt>RtpConfigurationGroupVisitor</tt> as a means of visiting configuration groups and the <tt>RtpConfigurationItemVisitor</tt> as a means of visiting configuration items.</p>
<div>
<ul>
    <li><a href='#ComponentConfiguration-RtpGeneralGroup'>RtpGeneralGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-PortRangesItem'>PortRangesItem</a></li>
    <li><a href='#ComponentConfiguration-WorkerThreadCountItem'>WorkerThreadCountItem</a></li>
    <li><a href='#ComponentConfiguration-BindingIPv4Item'>BindingIPv4Item</a></li>
    <li><a href='#ComponentConfiguration-BindingIPv6Item'>BindingIPv6Item</a></li>
    <li><a href='#ComponentConfiguration-EnableSRTPItem'>EnableSRTPItem</a></li>
</ul>
    <li><a href='#ComponentConfiguration-RTPICEConfigurationGroup'>RTPICEConfigurationGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-STUNServerItem'>STUNServerItem</a></li>
    <li><a href='#ComponentConfiguration-TURNServerItem'>TURNServerItem</a></li>
    <li><a href='#ComponentConfiguration-RTPICETransportFlagsItem'>RTPICETransportFlagsItem</a></li>
    <li><a href='#ComponentConfiguration-RTPICETransportLimitsItem'>RTPICETransportLimitsItem</a></li>
</ul>
</ul></div>
<h5><a name="ComponentConfiguration-RtpGeneralGroup"></a>RtpGeneralGroup</h5>
<p>This group contains generic information with regards to the operation of RTP and RTCP in Asterisk SCF.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
* General RTP configuration group that contains general items related to the RTP component as a whole
*/
class RtpGeneralGroup extends RtpConfigurationGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
An <tt>RtpGeneralGroup</tt> is declared by naming the section "general".<br/>
<tt>[~mmichelson:general]</tt><br/>
<tt>foo=bar</tt></p>

<h6><a name="ComponentConfiguration-PortRangesItem"></a>PortRangesItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Port ranges configuration item
 */
class PortRangesItem extends RtpConfigurationItem
{
    /**
     * Start port for RTP and RTCP sockets.
     *
     * Default value is 10000.
     *
     */
    int startPort = 10000;

    /**
     * End port for RTP and RTCP sockets.
     *
     * Default value is 20000.
     *
     */
    int endPort = 20000;
};</pre>
</div></div>
<p>ConfiguratorSyntax:<br/>
<tt>startport=10000</tt><br/>
<tt>endport=10000</tt></p>

<h6><a name="ComponentConfiguration-WorkerThreadCountItem"></a>WorkerThreadCountItem</h6>
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This setting currently has no effect</td></tr></table></div>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Worker thread count for incoming media configuration item
 */
class WorkerThreadCountItem extends RtpConfigurationItem
{
    /**
     * Number of threads that should handle incoming media.
     *
     * Default value is 4.
     */
    int count = 4;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>workerthreadcount=4</tt></p>

<h6><a name="ComponentConfiguration-BindingIPv4Item"></a>BindingIPv4Item</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Binding address for IPv4 traffic
 */
class BindingIPv4Item extends RtpConfigurationItem
{
    /**
     * Address that IPv4 sessions should be binded to.
     *
     * Default value is all.
     */
    string address;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>ipv4bind=0.0.0.0</tt></p>

<h6><a name="ComponentConfiguration-BindingIPv6Item"></a>BindingIPv6Item</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Binding address for IPv6 traffic
 */
class BindingIPv6Item extends RtpConfigurationItem
{
    /**
     * Address that IPv6 sessions should be binded to.
     *
     * Default value is all.
     */
    string address;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>ipv6bind=::</tt></p>

<h6><a name="ComponentConfiguration-EnableSRTPItem"></a>EnableSRTPItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 *
 * Enable SRTP on the current transport.
 *
 **/
class EnableSRTPItem extends RtpConfigurationItem
{
    /**
     * Flag to enable SRTP.
     **/
    bool enabled;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>enablesrtp=true</tt></p>

<h5><a name="ComponentConfiguration-RTPICEConfigurationGroup"></a>RTPICEConfigurationGroup</h5>
<p>This group contains items that relate to the use of Interactive Connectivity Establishment (ICE)</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/*
 * Configuration group for ICE enabled RTP.
 */
class RTPICEConfigurationGroup extends RtpConfigurationGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
An <tt>RtpICEConfigurationGroup</tt> is declared by naming the section "rtpoverice".<br/>
<tt>[~mmichelson:rtpoverice]</tt><br/>
<tt>foo=bar</tt></p>

<h6><a name="ComponentConfiguration-STUNServerItem"></a>STUNServerItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Hostname for the STUN server.
 */
class STUNServerItem extends RtpConfigurationItem
{
    string address;
    int port;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>stunserverhost=192.168.0.1</tt><br/>
<tt>stunserverport=3478</tt></p>

<h6><a name="ComponentConfiguration-TURNServerItem"></a>TURNServerItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Hostname for the STUN server.
 */
class STUNServerItem extends RtpConfigurationItem
{
    string address;
    int port;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>turnserverhost=192.168.0.1</tt><br/>
<tt>turnserverport=3478</tt></p>

<h6><a name="ComponentConfiguration-RTPICETransportFlagsItem"></a>RTPICETransportFlagsItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Configuration item with option flags for the ICE transport.
 */
class RTPICETransportFlagsItem extends RtpConfigurationItem
{
    /**
     * If the configuration option is present, it's most likely
     * because we want to enable STUN and ICE
     */
    bool enableICE = true;

    /**
     * Using a TURN server as a candidate should be a selectable option
     * since a TURN server isn't always available. Setting this to true
     * while enableICE is false has no effect.
     */
    bool enableTURN = true;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>rtpovericeenable=true</tt><br/>
<tt>rtpovericewithturn=true</tt></p>

<h6><a name="ComponentConfiguration-RTPICETransportLimitsItem"></a>RTPICETransportLimitsItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Configuration item for configurable limits for the ICE transport.
 */
class RTPICETransportLimitsItem extends RtpConfigurationItem
{
    /**
     * The maximum number of candidates to gather and publish.
     */
    int maxCandidates;

    /**
     * The maximum number of ICE negotiated flows to allow.
     */
    int maxCalls;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>rtpicemaxcandidates=10</tt><br/>
<tt>rtpicemaxcalls=50</tt></p>
</div>

<h2><a name="ComponentConfiguration-MediaFormatGeneric"></a>MediaFormatGeneric</h2>

<style type="text/css">
@media all {
    .expand-content { margin-left: 20px; }
    .expand-control-icon { display: inline-block; width: 20px; }
    .expand-control-text { vertical-align: top; text-decoration:none; }
    .expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
    .expand-hidden { display: none; }
    .expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
    /* show expander text in print */
    .expand-content { display: block !important; }
}
</style>

                 <div id="expander-1075344780" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
    <div class="expand-content"><p>All MediaFormatGeneric configuration groups derive from the <tt>FormatsGroup</tt> class, and all MediaFormatGeneric configuration items derive from the <tt>FormatConfigurationItem</tt>. At the time, there are no subclasses of <tt>FormatsGroup</tt> or of <tt>FormatConfigurationItem</tt>. MediaFormatGeneric provides the <tt>FormatsConfigurationGroupVisitor</tt> as a means of visiting configuration groups and the <tt>FormatConfigurationItemVisitor</tt> as a means of visiting configuration items.</p>

<p>Unlike with most other components, the configurator for MediaFormatGeneric treats each section of the configuration file as a <tt>ConfigurationItem</tt> rather than as a <tt>ConfigurationGroup</tt>. There is currently only a single <tt>ConfigurationItem</tt> defined.</p>

<div>
<ul>
    <li><a href='#ComponentConfiguration-FormatConfigurationItem'>FormatConfigurationItem</a></li>
</ul></div>

<h6><a name="ComponentConfiguration-FormatConfigurationItem"></a>FormatConfigurationItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Individual format configuration item
 *
 * This should be inserted into the group using the unique format name.
 */
["visitor:FormatsConfigurationItemVisitor"] class FormatConfigurationItem extends AsteriskSCF::System::Configuration::V1::ConfigurationItem
{
    /**
     * Name of the format.
     */
    string name;

    /**
     * Media format concrete class.
     */
    AsteriskSCF::Media::V1::Format format;

    /**
     * SDP Descriptor containing SDP parameters for the format.
     */
    AsteriskSCF::Media::SDP::V1::SDPDescriptor descriptor;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
The name of the format is based on the name of the configuration category. The rest are set as configuration items in the text.<br/>
<tt>[~mmichelson:MyFormat]</tt><br/>
<tt>sdp_payload=105</tt><br/>
<tt>type=audio</tt><br/>
<tt>sdp_subtype=MyFormat</tt><br/>
<tt>samplerate=16000</tt><br/>
<tt>sdp_parameters=blahblah</tt></p>
</div>


<h2><a name="ComponentConfiguration-Logger"></a>Logger</h2>

<style type="text/css">
@media all {
    .expand-content { margin-left: 20px; }
    .expand-control-icon { display: inline-block; width: 20px; }
    .expand-control-text { vertical-align: top; text-decoration:none; }
    .expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
    .expand-hidden { display: none; }
    .expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
    /* show expander text in print */
    .expand-content { display: block !important; }
}
</style>

                 <div id="expander-1278701554" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
    <div class="expand-content"><p>All logger configuration groups derive from the <tt>LoggerConfigurationGroup</tt> class, and all logger configuration items derive from the <tt>LoggerConfigurationItem</tt> class. The logger provides the <tt>LoggerConfigurationGroupVisitor</tt> as a means of visiting logger configuration groups and the <tt>LoggerConfigurationItemVisitor</tt> as a means of visiting logging configuration items.</p>
<div>
<ul>
    <li><a href='#ComponentConfiguration-LoggerGeneralGroup'>LoggerGeneralGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-FileItem'>FileItem</a></li>
    <li><a href='#ComponentConfiguration-LevelItem'>LevelItem</a></li>
    <li><a href='#ComponentConfiguration-FormatItem'>FormatItem</a></li>
</ul>
</ul></div>

<h5><a name="ComponentConfiguration-LoggerGeneralGroup"></a>LoggerGeneralGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * General Logger configuration group that contains general items related to the Logger component as a whole
 */
class LoggerGeneralGroup extends LoggerConfigurationGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
A <tt>LoggerGeneralGroup</tt> is declared by naming the section "general".<br/>
<tt>[~mmichelson:general]</tt><br/>
<tt>foo=bar</tt></p>

<h6><a name="ComponentConfiguration-FileItem"></a>FileItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * ConfigurationItem that describes an output file to which logger output should be sent
 */
class FileItem extends LoggerConfigurationItem
{
    /**
     * The name of the file to send output to
     */
    string fileName;
};</pre>
</div></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Double-quote the name of the log file so that spaces in the file name are processed correctly</td></tr></table></div>
<p>Configurator syntax:<br/>
<tt>filename="/var/log/AsteriskSCF.log"</tt></p>

<h6><a name="ComponentConfiguration-LevelItem"></a>LevelItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * ConfigurationItem that describes the logger's output level.
 */
class LevelItem extends LoggerConfigurationItem
{
    /** 
     * Name of the logger to set the level for. 
     * Note: May be empty string. 
     */
    string loggerName;

    /**
     * The level of logging to be used for subsequent
     * log operations.
     */
    AsteriskSCF::System::Logging::Level loggingLevel=AsteriskSCF::System::Logging::Debug;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
Levels are specified by giving a log level and the name of the logger. Multiple loggers can be specfied by separating entries with a semi-colon (<img class="emoticon" src="/wiki/images/icons/emoticons/wink.gif" height="20" width="20" align="absmiddle" alt="" border="0"/>.<br/>
<tt>levels=Debug,SipSessionManager;Trace,BasicRoutingService</tt><br/>
The above example sets the SipSessionManager logger to log up to the <tt>Debug</tt> level, and the BasicRoutingService logger to log up to the <tt>Trace</tt> level.</p>

<h6><a name="ComponentConfiguration-FormatItem"></a>FormatItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * ConfigurationItem that describes a format string the logger will use in preparing messages
 */
class FormatItem extends LoggerConfigurationItem
{
     /**
      * String describing the logger format. 
      * The format string is composed of format parameters and other text, much like
      * the printf statement. Valid format parameters are:
      * 
      * $m - the message to log. You always want this one in your format string.
      * $n - the name of the logger
      * $l - the level of the message being logged
      * $h - the client host name
      * $t - current time, can be further formatted with additional specifiers following the 
      *      boost::posix_time::time_facet format, which is similar to the strftime() format. 
      *      The additional specifiers should be in a set of curly braces, 
      *      like: $t{%x %X} would format the time into a date/time string. If no additional
      *      format specifiers are given (ie, just $t), the system uses the default
      *      time format.
      * $p - current process id
      * $C - component category. This is part of the Service Locator params for the Component 
      *      Service for the component performing the logging. 
      * $S - service name. This is part of the Service Locator params for the Component 
      *      Service for the component performing the logging. 
      * $I - component instance id. This is part of the Service Locator params for the Component 
      *      Service for the component performing the logging. 
      */
    string formatSpec;
};</pre>
</div></div>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Double-quote the format string so that spaces are handled correctly by the configurator</td></tr></table></div>
<p>Configurator syntax:<br/>
<tt>formatSpec=$t: $n [~mmichelson:$l] $m</tt></p>
</div>

<h2><a name="ComponentConfiguration-MediaTransportUDPTL"></a>MediaTransportUDPTL</h2>

<style type="text/css">
@media all {
    .expand-content { margin-left: 20px; }
    .expand-control-icon { display: inline-block; width: 20px; }
    .expand-control-text { vertical-align: top; text-decoration:none; }
    .expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
    .expand-hidden { display: none; }
    .expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
    /* show expander text in print */
    .expand-content { display: block !important; }
}
</style>

                 <div id="expander-1822186531" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
    <div class="expand-content"><p>All UDPTL configuration groups derive from the <tt>UdptlConfigurationGroup</tt> class, and all UDPTL configuration items derive from the <tt>UdptlConfigurationItem</tt> class. UDPTL provides the <tt>UdptlConfigurationGroupVisitor</tt> as a means of visiting UDPTL configuration groups and the <tt>UdptlConfigurationItemVisitor</tt> as a means of visiting UDPTL configuration items.</p>
<div>
<ul>
    <li><a href='#ComponentConfiguration-UdptlGeneralGroup'>UdptlGeneralGroup</a></li>
<ul>
    <li><a href='#ComponentConfiguration-PortRangesItem'>PortRangesItem</a></li>
    <li><a href='#ComponentConfiguration-BindingIPv4Item'>BindingIPv4Item</a></li>
    <li><a href='#ComponentConfiguration-BindingIPv6Item'>BindingIPv6Item</a></li>
    <li><a href='#ComponentConfiguration-FecDefaultsItem'>FecDefaultsItem</a></li>
</ul>
</ul></div>

<h5><a name="ComponentConfiguration-UdptlGeneralGroup"></a>UdptlGeneralGroup</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * General UDPTL configuration group that contains general items related to the UDPTL component as a whole
 */
class UdptlGeneralGroup extends UdptlConfigurationGroup
{
};</pre>
</div></div>
<p>Configurator syntax:<br/>
A <tt>UdptlGeneralGroup</tt> is created by naming the configuration section "general" .<br/>
<tt>[~mmichelson:general]</tt><br/>
<tt>foo=bar</tt></p>

<h6><a name="ComponentConfiguration-PortRangesItem"></a>PortRangesItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Port ranges configuration item
 */
class PortRangesItem extends UdptlConfigurationItem
{
    /**
     * Start port for UDPTL sockets.
     *
     * Default value is 10000.
     *
     */
    int startPort = 10000;

    /**
     * End port for UDPTL sockets.
     *
     * Default value is 20000.
     *
     */
    int endPort = 20000;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>startport=10000</tt><br/>
<tt>endport=20000</tt></p>

<h6><a name="ComponentConfiguration-BindingIPv4Item"></a>BindingIPv4Item</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Binding address for IPv4 traffic
 */
class BindingIPv4Item extends UdptlConfigurationItem
{
    /**
     * Address that IPv4 sessions should be binded to.
     *
     * Default value is all.
     */
    string address;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>ipv4bind=0.0.0.0</tt></p>

<h6><a name="ComponentConfiguration-BindingIPv6Item"></a>BindingIPv6Item</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Binding address for IPv6 traffic
 */
class BindingIPv6Item extends UdptlConfigurationItem
{
    /**
     * Address that IPv6 sessions should be binded to.
     *
     * Default value is all.
     */
    string address;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>ipv6bind=::</tt></p>

<h6><a name="ComponentConfiguration-FecDefaultsItem"></a>FecDefaultsItem</h6>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">/**
 * Default settings for forward error correction
 */
class FecDefaultsItem extends UdptlConfigurationItem
{
    /**
     * Default FEC span to use when a UDPTL session is created.
     */
    int fecSpan;

    /**
     * Default number of FEC entries to use when a UDPTL session is created.
     */
    int fecEntries;
};</pre>
</div></div>
<p>Configurator syntax:<br/>
<tt>defaultfecspan=3</tt><br/>
<tt>defaultfecentries=3</tt></p>
</div>

    </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/Component+Configuration">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=19006753&revisedVersion=23&originalVersion=22">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/TOP/Component+Configuration?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>