<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=TOP&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/Asterisk+SCF+Component+Configuration">Asterisk SCF 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 (1)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >h1. Configuration <br></td></tr>
<tr><td class="diff-changed-lines" >This page contains information regarding dynamic configuration of Asterisk SCF components. This is not to be confused with <span class="diff-changed-words"><span class="diff-added-chars"style="background-color: #dfd;">[</span>load-time</span> Ice <span class="diff-changed-words">configuration<span class="diff-added-chars"style="background-color: #dfd;">|IceBox Configuration for Components]</span>.</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br>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 [.ini-style|http://en.wikipedia.org/wiki/INI_file] 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 {{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-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h1><a name="AsteriskSCFComponentConfiguration-Configuration"></a>Configuration</h1>
<p>This page contains information regarding dynamic configuration of Asterisk SCF components. This is not to be confused with <a href="/wiki/display/TOP/IceBox+Configuration+for+Components" title="IceBox Configuration for Components">load-time Ice configuration</a>.</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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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.rbtoc1337265402913 {margin-left: 1.5em;padding: 0px;}
div.rbtoc1337265402913 ul {list-style: disc;margin-left: 0px;}
div.rbtoc1337265402913 li {margin-left: 0px;padding-left: 0px;}
/*]]>*/</style><div class='rbtoc1337265402913'>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-SampleConfigurationFiles'>Sample Configuration Files</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SIP'>SIP</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-MediaRTPPJMedia'>MediaRTPPJMedia</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-MediaFormatGeneric'>MediaFormatGeneric</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-Logger'>Logger</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-MediaTransportUDPTL'>MediaTransportUDPTL</a></li>
</ul></div>
<h2><a name="AsteriskSCFComponentConfiguration-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-490062226" 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='#AsteriskSCFComponentConfiguration-SipGeneralGroup'>SipGeneralGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipEndpointGroup'>SipEndpointGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-SipRoutingItem'>SipRoutingItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-IdentityItem'>IdentityItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-IdentityGroupRef'>IdentityGroupRef</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipHostItem'>SipHostItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipSourceTransportAddressItem'>SipSourceTransportAddressItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipTargetDestinationAddressItem'>SipTargetDestinationAddressItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipSignalingNATItem'>SipSignalingNATItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipMediaNATItem'>SipMediaNATItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SRTPCryptoItem'>SRTPCryptoItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipAllowableCallDirectionItem'>SipAllowableCallDirectionItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipEndpointTransportItem'>SipEndpointTransportItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipRTPMediaServiceItem'>SipRTPMediaServiceItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-DirectMediaItem'>DirectMediaItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipUDPTLMediaServiceItem'>SipUDPTLMediaServiceItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipCryptoCertificateItem'>SipCryptoCertificateItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipCrytpoRequirementsItem'>SipCrytpoRequirementsItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipCryptoItem'>SipCryptoItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipDTMFItem'>SipDTMFItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipMediaFormatItem'>SipMediaFormatItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipRegistrationGroupRef'>SipRegistrationGroupRef</a></li>
</ul>
<li><a href='#AsteriskSCFComponentConfiguration-SipRegistrationGroup'>SipRegistrationGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-SipClientRegistrationItem'>SipClientRegistrationItem</a></li>
</ul>
<li><a href='#AsteriskSCFComponentConfiguration-SipDomainGroup'>SipDomainGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-IdentityGroup'>IdentityGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipTransportGroup'>SipTransportGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipUDPTransportGroup'>SipUDPTransportGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipTCPTransportGroup'>SipTCPTransportGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipTLSTransportGroup'>SipTLSTransportGroup</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-SipSTUNTransportGroup'>SipSTUNTransportGroup</a></li>
</ul></div>
<h5><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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">[~mmichelson:some key]</span></tt></p>
<h6><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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" <sip:bob@example.org>
* <sip:alice@example.org>
*/
string contactURI;
/**
* Expiration for this contact in seconds
*/
int expiration;
};
sequence<ContactInfo> 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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="#AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="#AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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-1646063811" 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='#AsteriskSCFComponentConfiguration-RtpGeneralGroup'>RtpGeneralGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-PortRangesItem'>PortRangesItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-WorkerThreadCountItem'>WorkerThreadCountItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-BindingIPv4Item'>BindingIPv4Item</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-BindingIPv6Item'>BindingIPv6Item</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-EnableSRTPItem'>EnableSRTPItem</a></li>
</ul>
<li><a href='#AsteriskSCFComponentConfiguration-RTPICEConfigurationGroup'>RTPICEConfigurationGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-STUNServerItem'>STUNServerItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-TURNServerItem'>TURNServerItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-RTPICETransportFlagsItem'>RTPICETransportFlagsItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-RTPICETransportLimitsItem'>RTPICETransportLimitsItem</a></li>
</ul>
</ul></div>
<h5><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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-549948009" 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='#AsteriskSCFComponentConfiguration-FormatConfigurationItem'>FormatConfigurationItem</a></li>
</ul></div>
<h6><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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-1808404160" 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='#AsteriskSCFComponentConfiguration-LoggerGeneralGroup'>LoggerGeneralGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-FileItem'>FileItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-LevelItem'>LevelItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-FormatItem'>FormatItem</a></li>
</ul>
</ul></div>
<h5><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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-1633561128" 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='#AsteriskSCFComponentConfiguration-UdptlGeneralGroup'>UdptlGeneralGroup</a></li>
<ul>
<li><a href='#AsteriskSCFComponentConfiguration-PortRangesItem'>PortRangesItem</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-BindingIPv4Item'>BindingIPv4Item</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-BindingIPv6Item'>BindingIPv6Item</a></li>
<li><a href='#AsteriskSCFComponentConfiguration-FecDefaultsItem'>FecDefaultsItem</a></li>
</ul>
</ul></div>
<h5><a name="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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="AsteriskSCFComponentConfiguration-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/Asterisk+SCF+Component+Configuration">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=19006753&revisedVersion=25&originalVersion=24">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Asterisk+SCF+Component+Configuration?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>