📄 linphone.html
字号:
<p>Another possibility would be to use the graphical <code>linphone</code> program under linux and copy the config file. If you have linux installed on a PC and have the <code>linphone</code> package installed you can execute <code>linphone</code> and set it up properly and test it. After everything works you can find the configuration file (for versions ⇐ 1.2) under <code>~/.gnome2/linphone</code>. You can copy that file to your STAMP board (as <code>.linphonec</code> of course) or use it as template.</p><p>After you should test the new configuration and if it works, you can copy the <code>.linphonec</code> file into the <code>romfs</code> directory of your <code>uClinux-dist</code>. It will then be in all your new images you create. Due to a bu^H^Hfeature it won’t even be deleted after a <code>make clean</code>.</p></div><!-- SECTION [8052-10370] --><h3><a name="the_.linphonec_config_file" id="the_.linphonec_config_file">The .linphonec config file</a></h3><div class="level3"><p> This is how the default <code>.linphonec</code> config file looks:</p><pre class="code">[net]con_type=3use_nat=0[sip]sip_port=5060guess_hostname=1contact=sip:toto@unknown-hostuse_info=0use_ipv6=0default_proxy=-1[rtp]audio_rtp_port=7078video_rtp_port=9078audio_jitt_comp=60video_jitt_comp=60[sound]playback_dev_id=0ringer_dev_id=0capture_dev_id=0rec_lev=80play_lev=80ring_lev=80source=mlocal_ring=/usr/share/sounds/linphone/rings/oldphone.wavremote_ring=/usr/share/sounds/linphone/ringback.wav[video]enabled=0show_local=0[audio_codec_0]mime=PCMUrate=8000enabled=1[audio_codec_1]mime=GSMrate=8000enabled=1[audio_codec_2]mime=PCMArate=8000enabled=1[audio_codec_3]mime=speexrate=8000enabled=1[audio_codec_4]mime=speexrate=16000enabled=1[audio_codec_5]mime=1015rate=8000enabled=1</pre><p>You can see six different sections (<code>[net]</code>,<code>[sip]</code>,<code>[rtp]</code>,<code>[sound]</code>,<code>[video]</code>,<code>[audio_codec_x]</code>). There are also some additional sections, which are not in the default <code>.linphonec</code> config file (<code>[proxy_x]</code> and <code>[auth_info_x]</code>). They will be added if you define one or more proxies.</p></div><h4><a name="the_.linphonec_sections" id="the_.linphonec_sections">The .linphonec sections</a></h4><div class="level4"></div><h5><a name="the_net_section" id="the_net_section">The [net] section</a></h5><div class="level5"><p> In the <code>[net]</code> section the general network parameters are defined. </p><ul><li class="level1"><div class="li"> The <code>con_type</code> parameter defines the upstream speed of your network connection, where </div><ul><li class="level2"><div class="li"> <code>con_type=0</code> defines a 28kBit internet connection, which means a maximum upstream speed of 28,8kBit.</div></li><li class="level2"><div class="li"> <code>con_type=1</code> defines a 56kBit (v9x) Internet connection, which also means a maximum upstream speed of 28,8kBit.</div></li><li class="level2"><div class="li"> <code>con_type=2</code> defines a 64kBit (ISDN) Internet connection, which has a maximum upstream speed of 64kBit.</div></li><li class="level2"><div class="li"> <code>con_type=3</code> defines an ADSL or Cable Internet connection, which has a minimum upstream speed of 128kBit.</div></li><li class="level2"><div class="li"> <code>con_type=4</code> defines an Ethernet connection which as an upstream capability of about 10^3kBit.</div></li></ul></li><li class="level1"><div class="li"> The <code>use_nat</code> parameter is only interesting if you want to make direct connections to an outside SIP client without a proxy or you are using a registrar which does not proxy the connection itself, but redirects the call to your phone. In this case you have to set <code>use_nat=1</code> and provide the <strong>external</strong> address of your NAT router with <code>nat_address=xxx.xxx.xxx.xxx</code>. If you are lucky it works <img src="images/smileys/icon_wink.gif" align="middle" alt=";-)" /></div></li></ul></div><h5><a name="the_sip_section" id="the_sip_section">The [sip] section</a></h5><div class="level5"><ul><li class="level1"><div class="li"> The <code>sip_port=</code> parameter sets obviously the SIP port, which defaults to 5060. (<a href="http://www.faqs.org/rfcs/rfc2543.html" class="urlextern" title="http://www.faqs.org/rfcs/rfc2543.html" rel="nofollow">RFC2543</a>)</div></li><li class="level1"><div class="li"> The <code>guess_hostname=</code> parameter tells linphonec if it should guess the hostname or if it should just send the unmodified contact address in <code>contact=</code>. This parameter is only for direct connections and not for connections over an registrar. Also it might not necessarily work on uClinux.</div></li><li class="level1"><div class="li"> <code>contact=</code> defines the contact address of your <code>linphonec</code> SIP-Phone. Set it to <code>sip:username@hostname</code>.</div></li><li class="level1"><div class="li"> The <code>use_info=</code> parameter tells <code>linphonec</code> to use SIP info messages instead of RFC2833 (<a href="http://www.faqs.org/rfcs/rfc2833.html" class="urlextern" title="http://www.faqs.org/rfcs/rfc2833.html" rel="nofollow">RFC2833</a>) for DTMF tones.</div></li><li class="level1"><div class="li"> <code>use_ipv6=</code> is pretty self-explanatory.</div></li><li class="level1"><div class="li"> <code>default_prox=x</code> selects the proxy defined in <code>proxy_x</code> as default.</div></li></ul></div><h5><a name="the_rtp_section" id="the_rtp_section">The [rtp] section</a></h5><div class="level5"><p> In this section you can select different RTP ports (for example if you want to use port redirection on your NAT-router, to make different linphone soft phones accessible from the Internet) </p><ul><li class="level1"><div class="li"> <code>audio_rtp_port=7078</code> defines the UDP port linphonec should use for the audio connection.</div></li><li class="level1"><div class="li"> <code>video_rtp_port=9078</code> defines the UDP port linphonec should use for the video connection.</div></li><li class="level1"><div class="li"> <code>audio_jitt_comp=60</code> defines the default audio jitter buffer size in ms.</div></li><li class="level1"><div class="li"> <code>video_jitt_comp=60</code> the same for the video jitter buffer.</div></li></ul><p> You should not change the RTP ports, unless you don’t know what you are doing. If you have a private network with multiple computers behind a NAT router you can configure every <code>linphone</code> with different RTP ports and forward them from the NAT router to your “<code>linphone</code> machines”. If you combine that with a dynamic <acronym title="Domain Name Server">DNS</acronym> service and set the <code>contact=</code> field accordingly your <code>linphonec</code> could be accessible without a registrar or proxy even in a private network behind a NAT device with a dialup connection. But you should really know what you are doing, because there are several security and network stability implication you have to consider. (Not to mention, that you need to reconfigure the router and the router has to support it).</p></div><h5><a name="the_sound_section" id="the_sound_section">The [sound] section</a></h5><div class="level5"><p> In the <code>[sound]</code> section you can configure some of the <code>linphonec</code> audio parameters, like the recording or output volume, the soundcard and the ringtones. </p><ul><li class="level1"><div class="li"> With <code>playback_dev_id=</code>, <code>ringer_dev_id=</code> and <code>capture_dev_id=</code> you can select different soundcards and channels for playback, ringing and capture.</div></li><li class="level1"><div class="li"> <code>rec_lev=</code> sets the recording level.</div></li><li class="level1"><div class="li"> <code>play_lev=</code> sets the playback level.</div></li><li class="level1"><div class="li"> <code>ring_lev=</code> sets the ringtone level.</div></li><li class="level1"><div class="li"> <code>source=</code> selects the input source, where <code>m</code> is the microphone jack and <code>l</code> the line-in jack.</div></li><li class="level1"><div class="li"> <code>local_ring=</code> sets the audio file for the local ring. (The tone you hear, when your phone rings)</div></li><li class="level1"><div class="li"> <code>remote_ring=</code> sets the audio file for the remote ring (The callback tone)</div></li></ul></div><h5><a name="the_video_section" id="the_video_section">The [video] section</a></h5><div class="level5"><p> There is currently not much to say about the video section. There are two parameters <code>enabled=</code> and <code>show_local=</code> which are used to enable video support and to show the local video input. But since video is currently not supported on Blackfin uClinux, there is no need to change anything here.</p></div><h5><a name="the_audio_codec_x_section" id="the_audio_codec_x_section">The [audio_codec_x] section</a></h5><div class="level5"><p> There are multiple <code>[audio_codec_x]</code> section, which define the available audio codecs and their properties. You can give a preference to a CODEC if you put it higher in the the CODEC list, but the CODEC which will be selected depends on the connection type (you can’t use a G.771a/u CODEC which uses 64kBit/s not on a <code>con_type=1</code> for example. Also the opposite side has to support the CODEC.</p><p>The format of the CODEC section looks like:</p><pre class="code">[audio_codec_0]mime=PCMUrate=8000enabled=1</pre><ul><li class="level1"><div class="li"> Where <code>[audio_codec_0]</code> means, it is the first defined and therefor most preferred CODEC. The name of the mime type is <code>PCMU</code> which refers to G.711u. (<code>PCMA</code> to G.711a, <code>speex</code> to speex, <code>GSM</code> to GSM and <code>1015</code> to lpc10 which is theoretically available but not supported).</div></li><li class="level1"><div class="li"> The <code>rate=8000</code> parameter sets narrow band. For wide band (with speex for example) you have to select <code>rate=16000</code>.</div></li><li class="level1"><div class="li"> <code>enabled=1</code> tells <code>linphonec</code> that the CODEC is enabled. You can disable the CODEC with <code>enabled=0</code>. You should do this with the lpc10 CODEC.</div></li></ul></div><h5><a name="the_proxy_x_and_auth_info_x_sections" id="the_proxy_x_and_auth_info_x_sections">The [proxy_x] and [auth_info_x] sections</a></h5><div class="level5"><p> For the description of the <code>[proxy_x]</code> and <code>[auth_info_x]</code> please refer to the next section <strong>Adding a proxy to linphonec</strong>.</p></div><!-- SECTION [10371-17254] --><h3><a name="adding_a_proxy_to_linponec" id="adding_a_proxy_to_linponec">Adding a proxy to linponec</a></h3><div class="level3"><p> You can add a proxy to your <code>linphonec</code> setup either with the <code>proxy add</code> command or with the <code>linphone</code> program on your host PC (and copy the <code>[proxy_x]</code> and <code>[auth_info_x]</code> sections later into your <code>.linphonec</code> file or you can edit the <code>.linphonec</code> file directly.</p></div><!-- SECTION [17255-17573] --><h2><a name="what_is_the_current_status_of_linphone_on_uclinux_bf533_7_stamp" id="what_is_the_current_status_of_linphone_on_uclinux_bf533_7_stamp">What is the current status of Linphone on uClinux BF533/7 STAMP?</a></h2><div class="level2"><p>Currently the console client is working with the G.711a/u, GSM and Speex CODEC. It is able to make an receive calls either through a proxy/registrar or directly. It has been validated to work properly with the AD1836A cards and the AD73311 cards.</p></div><!-- SECTION [17574-] --><div class="footnotes"><div class="fn"><a href="#fnt__1" id="fn__1" name="fn__1" class="fn_bot">1)</a> Many codecs are not free to use by public, and you will have to pay a fee to use them. Normally this is included in the installation of commercial products, but not in Open Source solutions. Be aware of this, and remember that you only pay for the coding / decoding of the codec, not the routing of it. You can buy a telephone that supports a commercial codec (and paid for the phone means normally paid for the codec as well), and route it through an Open Source based PBX without paying any extra. The end caller also needs to pay for the codec, and also if you terminate it in the PBX.</div><div class="fn"><a href="#fnt__2" id="fn__2" name="fn__2" class="fn_bot">2)</a> Skype is not open source, and is not SIP compatible, and can not run on uClinux or the Blackfin. It is only mentioned as something that solves the problems that people were having - it provides good sound quality is secure with end-to-end encryption, and doesn’t require configuration with firewalls or routers.</div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -