⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nathelper_user.sgml

📁 性能优秀的SIP Proxy
💻 SGML
📖 第 1 页 / 共 2 页
字号:
<!-- Module User's Guide --><chapter>	<chapterinfo>	<revhistory>		<revision>		<revnumber>$Revision: 1.10 $</revnumber>		<date>$Date: 2006/06/07 13:29:07 $</date>		</revision>	</revhistory>	</chapterinfo>	<title>User's Guide</title>		<section>	<title>Overview</title>	<para>		This is a module to help with &nat; traversal. In particular, 		it helps symmetric &ua;s that don't advertise they are symmetric 		and are not able to determine their public address. fix_nated_contact 		rewrites Contact header field with request's source address:port pair. 		fix_nated_sdp adds the active direction indication to &sdp; (flag		0x01) and updates source &ip; address too (flag 0x02).	</para>	<para>		Known devices that get along over &nat;s with nathelper are ATAs 		(as clients) and Cisco Gateways (since 12.2(T)) as servers.  See <ulink		url="http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080110bf9.html">		http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080110bf9.html"></ulink>	</para>	</section>	<section>	<title>NAT pinging types</title>	<para>		Currently, the nathelper module supports two types of NAT pings:	</para>	<itemizedlist>		<listitem>			<para>			<emphasis>UDP package</emphasis> - 4 bytes (zero filled) UDP 			packages are sent to the contact address.			</para>			<itemizedlist>				<listitem>				<para><emphasis>Advantages:</emphasis> low bandwitdh traffic,				easy to generate by &ser;;				</para>				</listitem>				<listitem>				<para><emphasis>Disadvantages:</emphasis> unidirectional 				traffic through NAT (inbound - from outside to inside); As 				many NATs do update the bind timeout only on outbound traffic,				the bind may expire and closed.				</para>				</listitem>			</itemizedlist>		</listitem>		<listitem>			<para>			<emphasis>SIP request</emphasis> - a stateless SIP request is 			sent to the contact address.			</para>			<itemizedlist>				<listitem>				<para><emphasis>Advantages:</emphasis> bidirectional traffic				through NAT, since each PING request from &ser; (inbound 				traffic) will force the SIP client to generate a SIP reply 				(outbound traffic) - the NAT bind will be surely kept open.				</para>				</listitem>				<listitem>				<para><emphasis>Disadvantages:</emphasis> higher bandwitdh 				traffic, more expensive (as time) to generate by &ser;;				</para>				</listitem>			</itemizedlist>		</listitem>	</itemizedlist>	</section>	<section>	<title>Dependencies</title>	<section>		<title>&ser; Modules</title>		<para>		The following modules must be loaded before this module:			<itemizedlist>			<listitem>			<para>				<emphasis>usrloc</emphasis> module - only if the NATed 				contacts are to be pinged.			</para>			</listitem>			</itemizedlist>		</para>	</section>	<section>		<title>External Libraries or Applications</title>		<para>		The following libraries or applications must be installed before 		running &ser; with this module loaded:			<itemizedlist>			<listitem>			<para>				<emphasis>None</emphasis>.			</para>			</listitem>			</itemizedlist>		</para>	</section>	</section>	<section>	<title>Exported Parameters</title>	<section>		<title><varname>natping_interval</varname> (integer)</title>		<para>		Period of time in seconds between sending the NAT pings to all 		currently registered &ua;s to keep their &nat; bindings alive. 		Value of 0 disables this functionality.		</para>		<note><para>		Enabling the NAT pinging functionality will force the module to		bind itself to USRLOC module.		</para></note>		<para>		<emphasis>			Default value is 0.		</emphasis>		</para>		<example>		<title>Set <varname>natping_interval</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "natping_interval", 10)...</programlisting>		</example>	</section>	<section>		<title><varname>ping_nated_only</varname> (integer)</title>		<para>		If this variable is set then only contacts that have 		<quote>behind_NAT</quote> flag in user location database set will 		get ping.		</para>		<para>		<emphasis>			Default value is 0.		</emphasis>		</para>		<example>		<title>Set <varname>ping_nated_only</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "ping_nated_only", 1)...</programlisting>		</example>	</section>	<section>		<title><varname>received_avp</varname> (integer)</title>		<para>		The number of the Attribute-Value-Pair (AVP) used to store the URI 		containing the received IP, port, and protocol. The URI is created 		by fix_nated_register function of nathelper module and the attribute 		is then used by the registrar to store the received parameters. Do 		not forget to change the value of corresponding parameter in		registrar module if you change the value of this parameter.		</para>		<para>		<emphasis>			Default value is 42.		</emphasis>		</para>		<example>		<title>Set <varname>received_avp</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "received_avp", 43)...</programlisting>		</example>	</section>	<section>		<title><varname>rtpproxy_sock</varname> (string)</title>		<para>		Socket used to connect to RTPProxy. It may specify a UNIX socket or an		IPv4/IPv6 UDP socket.		</para>		<para>		<emphasis>			Default value is <quote>unix:/var/run/rtpproxy.sock</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>rtpproxy_sock</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "rtpproxy_sock", "udp:localhost:12221")...</programlisting>		</example>	</section>	<section>		<title><varname>rtpproxy_disable</varname> (integer)</title>		<para>		If true (set to a non 0 value), the RTPProxy support will be		disabled - no connection to it will be established.		</para>		<para>		<emphasis>			Default value is <quote>0 (false)</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>rtpproxy_disable</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "rtpproxy_disable", 1)...</programlisting>		</example>	</section>	<section>		<title><varname>rtpproxy_disable_tout</varname> (integer)</title>		<para>		Once RTPProxy was found unreachable and marked as disable, nathelper		will not attempt to establish communication to RTPProxy for 		rtpproxy_disable_tout seconds.		</para>		<para>		<emphasis>			Default value is <quote>60</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>rtpproxy_disable_tout</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "rtpproxy_disable_tout", 20)...</programlisting>		</example>	</section>	<section>		<title><varname>rtpproxy_tout</varname> (integer)</title>		<para>		Timeout value in waiting for reply from RTPProxy.		</para>		<para>		<emphasis>			Default value is <quote>1</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>rtpproxy_tout</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "rtpproxy_tout", 2)...</programlisting>		</example>	</section>	<section>		<title><varname>rtpproxy_retr</varname> (integer)</title>		<para>		How many times nathelper should retry to send and receive after		timeout was generated.		</para>		<para>		<emphasis>			Default value is <quote>5</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>rtpproxy_retr</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "rtpproxy_retr", 2)...</programlisting>		</example>	</section>	<section>		<title><varname>force_socket</varname> (string)</title>		<para>		Socket to be forced in communicating to RTPProxy. It makes sense only		for UDP communication. If no one specified, the OS will choose.		</para>		<para>		<emphasis>			Default value is <quote>NULL</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>force_socket</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "force_socket", "localhost:33333")...</programlisting>		</example>	</section>	<section>		<title><varname>sipping_from</varname> (string)</title>		<para>		The parameter sets the SIP URI to be used in generating the SIP		requests for NAT ping purposes. To enable the SIP request pinging		feature, you have to set this parameter. The SIP request pinging 		will be used only for requests marked so (see registrar module,		the "sip_natping_flag" flag).		</para>		<para>		<emphasis>			Default value is <quote>NULL</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>sipping_from</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "sipping_from", "sip:pinger@siphub.net")...</programlisting>		</example>	</section>	<section>		<title><varname>sipping_method</varname> (string)</title>		<para>		The parameter sets the SIP method to be used in generating the SIP		requests for NAT ping purposes.		</para>		<para>		<emphasis>			Default value is <quote>OPTIONS</quote>.		</emphasis>		</para>		<example>		<title>Set <varname>sipping_method</varname> parameter</title>		<programlisting format="linespecific">...modparam("nathelper", "sipping_method", "INFO")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -