Kamailio module rtpengine
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 }