Files
TS_WIFILED/docs/client_html/ar01s22s02.html
2020-04-04 17:21:07 +02:00

76 lines
26 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Channel information</title><link rel="stylesheet" href="ts3doc.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="up" href="ar01s22.html" title="Retrieve and store information"><link rel="prev" href="ar01s22.html" title="Retrieve and store information"><link rel="next" href="ar01s22s02s02.html" title="Channel sorting"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><img id="logo" src="images/logo.png"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Channel information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s22.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Retrieve and store information</th><td width="20%" align="right"> <a accesskey="n" href="ar01s22s02s02.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="channelinfo"></a>Channel information</h3></div></div></div><p>Querying and modifying information related to channels is similar to dealing with clients. The functions to query channel information are:</p><p>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getChannelVariableAsInt</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">result</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>int* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433782736"></a>
</p><p>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getChannelVariableAsUInt64</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">result</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433777184"></a>
</p><p>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getChannelVariableAsString</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">result</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>char* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433771632"></a>
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the information for the specified channel is requested.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel whose property is queried.</p></li><li><p><em class="parameter"><code>flag</code></em></p><p>Channel propery to query, see below.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable which receives the result value of type int, uint64 or string, depending on which function is used. In case of a string, memory must be released using <a class="link" href="ar01s28.html#freememory"><code class="function">ts3client_freeMemory</code></a>, unless an error occured.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>. For the string version: If an error has occured, the result string is uninitialized and must not be released.</p><p>The parameter <em class="parameter"><code>flag</code></em> specifies the type of queried information. It is defined by the enum <span class="structname">ChannelProperties</span><a class="indexterm" name="idm44835433759584"></a>:</p><pre class="programlisting">enum ChannelProperties {
CHANNEL_NAME = 0, //Available for all channels that are "in view", always up-to-date
CHANNEL_TOPIC, //Available for all channels that are "in view", always up-to-date
CHANNEL_DESCRIPTION, //Must be requested (=&gt; requestChannelDescription)
CHANNEL_PASSWORD, //not available client side
CHANNEL_CODEC, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_QUALITY, //Available for all channels that are "in view", always up-to-date
CHANNEL_MAXCLIENTS, //Available for all channels that are "in view", always up-to-date
CHANNEL_MAXFAMILYCLIENTS, //Available for all channels that are "in view", always up-to-date
CHANNEL_ORDER, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_PERMANENT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_SEMI_PERMANENT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_DEFAULT, //Available for all channels that are "in view", always up-to-date
CHANNEL_FLAG_PASSWORD, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_LATENCY_FACTOR, //Available for all channels that are "in view", always up-to-date
CHANNEL_CODEC_IS_UNENCRYPTED, //Available for all channels that are "in view", always up-to-date
CHANNEL_SECURITY_SALT, //Sets the options+salt for security hash (SDK only)
CHANNEL_DELETE_DELAY, //How many seconds to wait before deleting this channel
CHANNEL_ENDMARKER,
};</pre><div class="itemizedlist"><ul type="disc"><li><p><em class="structfield"><code>CHANNEL_NAME</code></em></p><p>String: Name of the channel.</p></li><li><p><em class="structfield"><code>CHANNEL_TOPIC</code></em></p><p>String: Single-line channel topic.</p></li><li><p><em class="structfield"><code>CHANNEL_DESCRIPTION</code></em></p><p>String: Optional channel description. Can have multiple lines. Clients need to request updating this variable for a specified channel using:
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_requestChannelDescription</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433747120"></a>
</p></li><li><p><em class="structfield"><code>CHANNEL_PASSWORD</code></em></p><p>String: Optional password for password-protected channels.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>Clients can only <span class="emphasis"><em>set</em></span> this value, but not query it.</p></td></tr></table></div><p>If a password is set or removed by modifying this field, <em class="structfield"><code>CHANNEL_FLAG_PASSWORD</code></em> will be automatically adjusted.</p></li><li><p><em class="structfield"><code>CHANNEL_CODEC</code></em></p><p>Int: Codec used for this channel:</p><div class="itemizedlist"><ul type="circle"><li><p>0 - Speex Narrowband (8 kHz)</p></li><li><p>1 - Speex Wideband (16 kHz)</p></li><li><p>2 - Speex Ultra-Wideband (32 kHz)</p></li><li><p>3 - Celt (Mono, 48kHz)</p></li><li><p>4 - Opus Voice (Mono, 48khz)</p></li><li><p>5 - Opus Music (Stereo, 48khz)</p></li></ul></div><p>See <a class="link" href="ar01s14.html" title="Sound codecs">Sound codecs</a>.</p></li><li><p><em class="structfield"><code>CHANNEL_CODEC_QUALITY</code></em></p><p>Int (0-10): Quality of channel codec of this channel. Valid values range from 0 to 10, default is 7. Higher values result in better speech quality but more bandwidth usage.</p><p>See <a class="link" href="ar01s15.html" title="Encoder options">Encoder options</a>.</p></li><li><p><em class="structfield"><code>CHANNEL_MAXCLIENTS</code></em></p><p>Int: Number of maximum clients who can join this channel.</p></li><li><p><em class="structfield"><code>CHANNEL_MAXFAMILYCLIENTS</code></em></p><p>Int: Number of maximum clients who can join this channel and all subchannels.</p></li><li><p><em class="structfield"><code>CHANNEL_ORDER</code></em></p><p>Int: Defines how channels are sorted in the GUI. Channel order is the ID of the predecessor channel after which this channel is to be sorted. If 0, the channel is sorted at the top of its hirarchy.</p><p>For more information please see the chapter <a class="link" href="ar01s22s02s02.html" title="Channel sorting">Channel sorting</a>.</p></li><li><p><em class="structfield"><code>CHANNEL_FLAG_PERMANENT</code></em> / <em class="structfield"><code>CHANNEL_FLAG_SEMI_PERMANENT</code></em></p><p>Concerning channel durability, there are three types of channels:</p><div class="itemizedlist"><ul type="circle"><li><p>Temporary</p><p>Temporary channels have neither the <em class="structfield"><code>CHANNEL_FLAG_PERMANENT</code></em> nor <em class="structfield"><code>CHANNEL_FLAG_SEMI_PERMANENT</code></em> flag set. Temporary channels are automatically deleted by the server after the last user has left and the channel is empty. They will not be restored when the server restarts.</p></li><li><p>Semi-permanent / Permanent</p><p>Semi-permanent and permanent channels are not automatically deleted when the last user left. As SDK servers are not persistant over restart, there is no effective difference between these two in the SDK.</p></li></ul></div></li><li><p><em class="structfield"><code>CHANNEL_FLAG_DEFAULT</code></em></p><p>Int (0/1): Channel is the default channel. There can only be one default channel per server. New users who did not configure a channel to join on login in <a class="link" href="ar01s09.html" title="Connecting to a server"><code class="function">ts3client_startConnection</code></a> will automatically join the default channel.</p></li><li><p><em class="structfield"><code>CHANNEL_FLAG_PASSWORD</code></em></p><p>Int (0/1): If set, channel is password protected. The password itself is stored in <em class="structfield"><code>CHANNEL_PASSWORD</code></em>.</p></li><li><p><em class="structfield"><code>CHANNEL_CODEC_LATENCY_FACTOR</code></em></p><p>(Int: 1-10): Latency of this channel. This allows to increase the packet size resulting in less bandwidth usage at the cost of higher latency. A value of 1 (default) is the best setting for lowest latency and best quality. If bandwidth or network quality are restricted, increasing the latency factor can help stabilize the connection. Higher latency values are only possible for low-quality codec and codec quality settings.</p><p>For best voice quality a low latency factor is recommended.</p></li><li><p><em class="structfield"><code>CHANNEL_CODEC_IS_UNENCRYPTED</code></em></p><p>Int (0/1): If 1, this channel is not using encrypted voice data. If 0, voice data is encrypted for this channel. Note that channel voice data encryption can be globally disabled or enabled for the virtual server. Changing this flag makes only sense if global voice data encryption is set to be configured per channel as <em class="structfield"><code>CODEC_ENCRYPTION_PER_CHANNEL</code></em> (the default behaviour).</p></li><li><p><em class="structfield"><code>CHANNEL_SECURITY_SALT</code></em></p><p>Contains the channels security salt (optional feature). When a client connects, the clients hash value in <em class="structfield"><code>CLIENT_SECURITY_HASH</code></em> is check against the channel salt to allow or deny the client to join this channel. Motivation is to enforce clients joining a server with the specific identity, nickname and metadata.</p><p>Please see the chapter &#8220;<span class="quote">Security salts and hashes</span>&#8221; in the Server SDK documentation for details.</p></li><li><p><em class="structfield"><code>CHANNEL_DELETE_DELAY</code></em></p><p>This parameter defines how many seconds the server waits until a temporary channel is deleted when empty.</p><p>When a temporary channel is created, a timer is started. If a user joins the channel before the countdown is finished, the channel is not deleted. After the last person has left the channel, the countdown starts again. <em class="structfield"><code>CHANNEL_DELETE_DELAY</code></em> defines the length of this countdown in seconds.</p><p>The time since the last client has left the temporary channel can be queried with <a class="link" href="ar01s28.html#emptysecs"><code class="function">ts3client_getChannelEmptySecs</code></a>.</p></li></ul></div><a class="indexterm" name="idm44835433706960"></a><a class="indexterm" name="idm44835433706416"></a><div class="literallayout"><p><br>
</p></div><p>To modify channel data use</p><p>
<a name="setchannelvarasint"></a>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_setChannelVariableAsInt</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">value</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>int <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433699952"></a>
</p><p>
<a name="setchannelvarasuint64"></a>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_setChannelVariableAsUInt64</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">value</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>uint64 <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433693872"></a>
</p><p>
<a name="setchannelvarasstring"></a>
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_setChannelVariableAsString</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">flag</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">value</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>ChannelProperties <var class="pdparam">flag</var></code>;<br><code>const char* <var class="pdparam">value</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433687792"></a>
</p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the information for the specified channel should be changed.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of the channel whoses property should be changed.</p></li><li><p><em class="parameter"><code>flag</code></em></p><p>Channel propery to change, see above.</p></li><li><p><em class="parameter"><code>value</code></em></p><p>Value the channel property should be changed to. Depending on which function is used, the value can be of type int, uint64 or string.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>After modifying one or more channel variables, you have to flush the changes to the server.
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_flushChannelUpdates</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433674576"></a></p></td></tr></table></div><p>As example, to change the channel name and topic:</p><pre class="programlisting">/* Modify data 1 */
if(ts3client_setChannelVariableAsString(scHandlerID, channelID, CHANNEL_NAME,
"Other channel name") != ERROR_ok) {
printf("Error setting channel name\n");
return;
}
/* Modify data 2 */
if(ts3client_setChannelVariableAsString(scHandlerID, channelID, CHANNEL_TOPIC,
"Other channel topic") != ERROR_ok) {
printf("Error setting channel topic\n");
return;
}
/* Flush changes */
if(ts3client_flushChannelUpdates(scHandlerID, channelID) != ERROR_ok) {
printf("Error flushing channel updates\n");
return;
}</pre><div class="literallayout"><p><br>
</p></div><p>After a channel was edited using <code class="function">ts3client_setChannelVariableAsInt</code> or <code class="function">ts3client_setChannelVariableAsString</code> and the changes were flushed to the server, the edit is announced with the event:</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">onUpdateChannelEditedEvent</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">invokerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">invokerName</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">invokerUniqueIdentifier</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>uint64 <var class="pdparam">channelID</var></code>;<br><code>anyID <var class="pdparam">invokerID</var></code>;<br><code>const char* <var class="pdparam">invokerName</var></code>;<br><code>const char* <var class="pdparam">invokerUniqueIdentifier</var></code>;</div><div class="funcprototype-spacer"> </div></div><a class="indexterm" name="idm44835433665296"></a><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel has been edited.</p></li><li><p><em class="parameter"><code>channelID</code></em></p><p>ID of edited channel.</p></li><li><p><em class="parameter"><code>invokerID</code></em></p><p>ID of the client who edited the channel.</p></li><li><p><em class="parameter"><code>invokerName</code></em></p><p>String with the name of the client who edited the channel.</p></li><li><p><em class="parameter"><code>invokerUniqueIdentifier</code></em></p><p>String with the unique ID of the client who edited the channel.</p></li></ul></div><div class="literallayout"><p><br>
</p></div><p>To find the channel ID from a channels path:
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_getChannelIDFromChannelNames</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">channelNameArray</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">result</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>char** <var class="pdparam">channelNameArray</var></code>;<br><code>uint64* <var class="pdparam">result</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
<a class="indexterm" name="idm44835433651456"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handler on which the channel ID is queried.</p></li><li><p><em class="parameter"><code>channelNameArray</code></em></p><p>Array defining the position of the channel: "grandparent", "parent", "channel", "". The array is terminated by an empty string.</p></li><li><p><em class="parameter"><code>result</code></em></p><p>Address of a variable which receives the queried channel ID.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="channelencryption"></a>Channel voice data encryption</h4></div></div></div><a class="indexterm" name="idm44835433642736"></a><p>Voice data can be encrypted or unencrypted. Encryption will increase CPU load, so should be used only when required. Encryption can be configured per channel (the default) or globally enabled or disabled for the whole virtual server. By default channels are sending voice data unencrypted, newly created channels would need to be set to encrypted if required.</p><p>To configure the global virtual server encryption settings, modify the virtual server property <em class="structfield"><code>VIRTUALSERVER_CODEC_ENCRYPTION_MODE</code></em> to one of the following values:
</p><pre class="programlisting">enum CodecEncryptionMode {
CODEC_ENCRYPTION_PER_CHANNEL = 0, // Default
CODEC_ENCRYPTION_FORCED_OFF,
CODEC_ENCRYPTION_FORCED_ON,
};</pre><p>
</p><p>Voice data encryption per channel can be configured by setting the channel property <em class="structfield"><code>CHANNEL_CODEC_IS_UNENCRYPTED</code></em> to 0 (encrypted) or 1 (unencrypted) if global encryption mode is <em class="structfield"><code>CODEC_ENCRYPTION_PER_CHANNEL</code></em>. If encryption is forced on or off globally, the channel property will be automatically set by the server.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s22.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="ar01s22.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s22s02s02.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Retrieve and store information </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Channel sorting</td></tr></table></div></body></html>