Kamailio module rtpengine: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 36: Line 36:


: If you specify an IPv6 RTP, the proxy URL must be prefixed with :: to escapce the :: from the IPv6 address.
: If you specify an IPv6 RTP, the proxy URL must be prefixed with :: to escapce the :: from the IPv6 address.
==== Example ====
<pre>
$ kamcmd rtpengine.enable udp:192.168.2.133:8081 0
$ kamcmd rtpengine.enable ::udp6:fe80::9a90:96ff:fea8:fd99:9999 1
$ kamcmd rtpengine.enable all 1
</pre>
<pre>
$ sudo kamcmd rtpengine.enable udp:10.132.0.32:2223 0
{
url: udp:10.132.0.32:2223
status: disable
}
</pre>
=== rtpengine.show proxy_url/all ===
Displys all the RTP proxies and their information: set and status (disabled or not, weight and recheck_ticks). If a RTP proxy has been disabled by nh_enable_rtpp mi command a "(permanent)" quote will appear when printing the disabled status. This is to differentiate from a temporary disable due to the proxy being not found responsive by kamailio. In addition, when disabled permanent, recheck_ticks have no meaning and "N/A" is printed instead of the value.
It takes either a specific RTP proxy URL (exactly as defined in the config file) or the keyword all as a parameter.
: When specify the IPv6 RTP proxy URL one must prefix it with :: to escape the :: from the IPv6 addresses.
==== Example ====
<pre>
$ kamcmd rtpengine.show udp:192.168.2.133:8081
$ kamcmd rtpengine.show ::udp6:fe80::9a90:96ff:fea8:fd99:9999
$ kamcmd rtpengine.show all
</pre>
<pre>
$ kamcmd rtpengine.show all
{
url: udp:10.132.0.32:2223
set: 0
index: 0
weight: 1
disabled: 1(permanent)
recheck_ticks: N/A
}
{
url: udp:10.132.0.33:2223
set: 0
index: 1
weight: 1
disabled: 0
recheck_ticks: 0
}
</pre>


== See also ==
== See also ==

Latest revision as of 11:17, 31 May 2020

Overview

Kamailio module RTPEngine 내용 정리

Basic

This is a module that enables media streams to be proxied via an RTP proxy. The only RTP proxy currently known to work with this moudle is Sipwise rtpengine https://github.com/sipwise/rtpengine. The rtpengine module is a modified version of the original rtpproxy module using a new control protocol. The module is designed to be a drop in it only works with RTP proxies which specifically support it.

Parameters

rtpengine_sock(string)

Definition of socket(s) used to connect to (a set) RTP proxy. It may specify a UNIX socket or an IPv4/IPv6 UDP socket.

Default value is "NONE" (disabled).

# single rtproxy
modparam("rtpengine", "rtpengine_sock", "udp:localhost:12221")

# multiple rtproxies for LB with weights (missing weight defaults to 1)
modparam("rtpengine", "rtpengine_sock", "udp:localhost:12221=2 udp:localhost:12222=1")

# multiple sets of multiple rtproxies
modparam("rtpengine", "rtpengine_sock", "1 == udp:localhost:12221 udp:localhost:12222")
modparam("rtpengine", "rtpengine_sock", "2 == udp:localhost:12225")

RPC commands

rtpengine.reload

Reloads the database node table content if configured.

rtpengine.enable proxy_url/all 0/1

Enables a RTP proxy if the second parameter value is greater than 0. Disables it if a zero value is given. The first parameter is either a specific RTP proxy URL (exactly as defined in the config file) or the keyword all. The second parameter value must be a number in decimal.

When try to enable the RTP proxy, an application ping command is sent to it. If it fails, the Proxy is not enabled. Displays success or fail when try to enable/disable.

If a RTP proxy is defined multiple times(in the same or different sets), all of its instances will be enabled/disabled.
If a RTP proxy is in the disabled permanent state and one tries to enable it, even if the ping fails, it is moved to a disabled temporary, and it is not taken into consideration for sending data. When the recheck_ticks are 0, the proxy is retested when trying to send data (not automatically retested), and data can be send to it on success.
If you specify an IPv6 RTP, the proxy URL must be prefixed with :: to escapce the :: from the IPv6 address.

Example

$ kamcmd rtpengine.enable udp:192.168.2.133:8081 0
$ kamcmd rtpengine.enable ::udp6:fe80::9a90:96ff:fea8:fd99:9999 1
$ kamcmd rtpengine.enable all 1
$ sudo kamcmd rtpengine.enable udp:10.132.0.32:2223 0
{
	url: udp:10.132.0.32:2223
	status: disable
}

rtpengine.show proxy_url/all

Displys all the RTP proxies and their information: set and status (disabled or not, weight and recheck_ticks). If a RTP proxy has been disabled by nh_enable_rtpp mi command a "(permanent)" quote will appear when printing the disabled status. This is to differentiate from a temporary disable due to the proxy being not found responsive by kamailio. In addition, when disabled permanent, recheck_ticks have no meaning and "N/A" is printed instead of the value.

It takes either a specific RTP proxy URL (exactly as defined in the config file) or the keyword all as a parameter.

When specify the IPv6 RTP proxy URL one must prefix it with :: to escape the :: from the IPv6 addresses.

Example

$ kamcmd rtpengine.show udp:192.168.2.133:8081
$ kamcmd rtpengine.show ::udp6:fe80::9a90:96ff:fea8:fd99:9999
$ kamcmd rtpengine.show all
$ kamcmd rtpengine.show all
{
	url: udp:10.132.0.32:2223
	set: 0
	index: 0
	weight: 1
	disabled: 1(permanent)
	recheck_ticks: N/A
}
{
	url: udp:10.132.0.33:2223
	set: 0
	index: 1
	weight: 1
	disabled: 0
	recheck_ticks: 0
}

See also