📄 customize.sgml
字号:
<section id="customize-audio-device"><title>Audio Devices</title><para>If you have more than one sound card, you may wish to specify the audiodevice Intercom uses. There are two variables which control this,snd_capture_device and snd_play_device. By default, they are both set to/dev/dsp but can be modified by the user. The changes will not takeaffect immediately if a call is in progress.</para><para>You are free to set snd_capture_device and snd_play_device todifferent physical devices. This might be useful if your Mic and speakershappen to be on different cards></para></section><section id="customize-audio-silence"><title>Handling Silence</title><para>Another set of options which you will probably want to configure ishow Intercom handles audio silence. That is, when you are not speaking,there is really no reason audio data needs to be sent to your remote party. Configuring silence squelching is a bit technical but shouldn't be too hard. The option you want to adjust is the silence_thresh variable. This is aninteger between 0 and 32767 which denotes the minimum sample value belowwhich is considered silence. When set to 0, there will be no silencesuppression and all audio data is sent as-is. Likewise, when set to 32767,all audio data is squelched and you are essentially muted. You want to setthis option to a value depending on your mic and surroundings. Commonvalues are between 1000 and 7000 but your mileage may vary. Play with ituntil you find the correct value for your setup</para><para>The other variable related to silence squelching is silence_time. This is a decimal variable which controls how many seconds of silence toallow before squelching. By default, this is set to 1.0 (1 second) but somepeople like to adjust it. For example, if you wanted to squelch only ifthere is an extended period of silence, you could set it to 30 or so.</para></section></section><section id="network"><title>Networking Parameters</title><para>Intercom provides some options which configure how it communicatesover a network. Most people probably won't need to adjust these but theyare here in the event that you do.</para><section id="customize-network-port"><title>TCP Port</title><para>Intercom uses two sockets in a standard call, a TCP socket for datacommunication such as parameter negotiation and a UDP socket for the actualaudio data. The UDP port used is random and is currently not configurable;however, the TCP port on which Intercom listens is set through the portvariable. By default, port is set to 4266 but can be changed through theset command. You will need to restart Intercom in order for the setting totake effect so it will be necessary to save it first.</para></section><section id="customize-network-lowdelay"><title>IPTOS_LOWDELAY</title><para>Setting IPTOS_LOWDELAY on a socket generally causes packets on thatsocket to be sent out before others. Intercom uses this option as it is a<emphasis>real-time</emphasis> application where audio delays are notdesired. This is unlike an application such as a web server where a minordelay really doesn't matter too much. By default, Intercom sets this optionon its audio socket. However, this behavior can be controled, through theiptos_lowdelay variable. This is a boolean variable (0 or 1) which when setto 0, the IPTOS_LOWDELAY option is not applied to the socket.</para></section><section id="customize-network-udpsize"><title>UDP packet size</title><para>The UDP protocol is packet based. As such, Intercom sends andreceives audio data in chunks of a certain size. The packet size Intercomuses is defendant on the sample rate and compression format used. It canvary slightly if encryption is used and can also fluctuate during a call. In general, it is desirable to keep packets relatively small to ensure aminimum audio latency. We try to be smart about this and it shouldrarely be necessary to adjust the sizes.</para><para>The UDP packet sizes are controled through two variable. they areudp_minsize and udp_maxsize which control the minimum and maximum packetsizes respectively. By default, udp_minsize is set to 64 and udp_maxsize is512.</para><para>The udp_minsize variable is most important when audio compression isused. If it is too high, audio data will buffer and higher latencies willresult. However, if it is too low, many packets can be sent which cancause problems of its own. The value of 64 is reasonable in most cases. Itwas chosen so as not to buffer up too much data and when using a CODEC suchas GSM at 8k, it will limit packets to a single frame.</para><para>The udp_maxsize variable in contrast, is more important whencompression is disabled. It can also come into play when compression isused and a high sample rate is employed. If Intercom is sending packetswhich you think are too large, you can decrease this value. However, don'tbring it too close to udp_minsize. Intercom needs some flexibility in howit sizes packets.</para></section></section><section id="customize-misc"><title>Miscellaneous variables</title><para>The following describes some miscellaneous variables which controlIntercom's behavior. They are straight-forward and don't need a section oftheir own.</para><note><para>Typing set with no arguments will display a list of validvariables with a brief description of their function. It may be moreup-to-date than this document and consulting it isrecommended.</para></note><itemizedlist><listitem><para>cmd_maxdepth - Controls the depth of command-recursionpermitted before Intercom flags a command-loop and aborts the operation. Acommand-loop can be as simple as setting up an alias a to b and b back to aor can be much more complicated. The cmd_maxdepth variable exists toprotect against such occurrences. The default value is 10 and should beenough for most anyone.</para></listitem><listitem><para>history_limit - This variable controls how many lines tokeep in Intercom's command-history if the readline library is used. Thedefault is 100 lines and is usually enough for mostpeople.</para></listitem><listitem><para>reverse_lookup - If set to 1, a reverse DNS lookup isperformed on connected hosts whos results are displayed when a call isconnected and terminated. If set to 0, this lookup is not done and the IPaddress is displayed. REverse lookups can take time so if connection timesare important, you can disable this; however, the default is enabled ad theresults can be informative.</para></listitem><listitem><para>verbose - When set to 1, Intercom becomes a little moreverbose in its output to the console.</para></listitem><listitem><para>snd_loopback - When set to 1, audio data which is receivedis bounced immediately back to the sender. It is quite useful fortroubleshooting audio problems. Local audio is not sent to the remote partywhen this option is used.</para></listitem></itemizedlist></section><section id="customize-alias"><title>Command Aliases</title><para>Intercom has a <emphasis>very basic</emphasis> alias system, whereby,one can define a command which executes another. This can be most helpfulespecially when executing lengthy or repetitive commands. Allcommand-aliases are administered by none other than the<command>alias</command> command. With <command>alias</command>, you canlist, add, and remove command-aliases.</para><para>Do add an alias, the syntax is:</para><para><command>alias<replaceable><alias></replaceable><replaceable><action></replaceable></command></para><para>Where <replaceable><alias></replaceable> should be substituted for thealias you would like and <replaceable><action></replaceable>for the action. For example, to have the <command>c</command> command reference<command>call</command>, you would enter:</para><para><prompt>intercom: </prompt><command>alias c call</command></para><para>To remove an alias, the syntax is similar. Enter in <command>alias -u<replaceable><alias></replaceable><command></command>. So, toremove our c alias above, we would execute:</para><para><prompt>intercom: </prompt><command>alias -u c</command></para><section id="customize-alias-examples"><title>Useful Alias Examples</title><para>The following examples demonstrate some useful command-aliases. Remember to use proper quoting when entering an alias.</para><para>Here is a very simple alias to map the ? command to help.</para><para><prompt>intercom: </prompt><command>alias '?' help</command></para><para>Set up an alias (coffice) to call the office using some specialsettings.</para><para><prompt>intercom: </prompt><command>alias coffice 'call -r 22050 -c g.723-40office.mycompany.com'</command></para><para>Set up an alias whereby the unalias command will remove analias.</para><para><prompt>intercom: </prompt><command>alias unalias 'alias -u'</command></para></section></section></chapter>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -