|
@@ -7,15 +7,99 @@ Tomas Mandys
|
|
Copyright © 2007 Tomas Mandys
|
|
Copyright © 2007 Tomas Mandys
|
|
__________________________________________________________________
|
|
__________________________________________________________________
|
|
|
|
|
|
|
|
+ Table of Contents
|
|
|
|
+
|
|
|
|
+ 1.
|
|
|
|
+
|
|
|
|
+ 1. Overview
|
|
|
|
+ 2. Dependencies
|
|
|
|
+ 3. Parameters
|
|
|
|
+
|
|
|
|
+ 3.1. config (string)
|
|
|
|
+ 3.2. switchboard (string)
|
|
|
|
+ 3.3. rpc_heartbeat_timeout (int)
|
|
|
|
+ 3.4. hostname (string)
|
|
|
|
+ 3.5. declare_codec (string)
|
|
|
|
+ 3.6. codec_set (string)
|
|
|
|
+
|
|
|
|
+ 4. Functions
|
|
|
|
+
|
|
|
|
+ 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids])
|
|
|
|
+ 4.2. iptrtpproxy_update(gate_a_to_b, session_ids)
|
|
|
|
+ 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids)
|
|
|
|
+ 4.4. iptrtpproxy_delete(session_ids)
|
|
|
|
+ 4.5. iptrtpproxy_authorize_media()
|
|
|
|
+ 4.6. iptrtpproxy_set_param(param, value)
|
|
|
|
+ 4.7.
|
|
|
|
+ iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_
|
|
|
|
+ ip_(a/b)", sip_ip)
|
|
|
|
+
|
|
|
|
+ 4.8. iptrtpproxy_set_param("protected_session_ids",
|
|
|
|
+ sess_ids)
|
|
|
|
+
|
|
|
|
+ 4.9. iptrtpproxy_set_param("o_name", value)
|
|
|
|
+ 4.10. iptrtpproxy_set_param("o_addr", value)
|
|
|
|
+ 4.11. iptrtpproxy_set_param("codec_set", value)
|
|
|
|
+ 4.12. iptrtpproxy_set_param("remove_codec_mask", value)
|
|
|
|
+
|
|
|
|
+ 5. Selects
|
|
|
|
+
|
|
|
|
+ 5.1. @iptrtpproxy.session_ids
|
|
|
|
+ 5.2. @iptrtpproxy.sdp_ip
|
|
|
|
+ 5.3. @iptrtpproxy.o_name
|
|
|
|
+ 5.4. @iptrtpproxy.o_addr
|
|
|
|
+ 5.5. @iptrtpproxy.auth_rights
|
|
|
|
+ 5.6. @iptrtpproxy.active_media_num
|
|
|
|
+
|
|
List of Examples
|
|
List of Examples
|
|
|
|
|
|
- 1. Declare switchboard
|
|
|
|
- 2. Declare codec_set
|
|
|
|
- 3. iptrtpproxy_alloc usage
|
|
|
|
- 4. iptrtpproxy_update usage
|
|
|
|
- 5. iptrtpproxy_adjust_timeout usage
|
|
|
|
- 6. iptrtpproxy_delete usage
|
|
|
|
- 7. iptrtpproxy_authorize_media usage
|
|
|
|
|
|
+ 1.1. Declare switchboard
|
|
|
|
+ 1.2. Declare codec_set
|
|
|
|
+ 1.3. iptrtpproxy_alloc usage
|
|
|
|
+ 1.4. iptrtpproxy_update usage
|
|
|
|
+ 1.5. iptrtpproxy_adjust_timeout usage
|
|
|
|
+ 1.6. iptrtpproxy_delete usage
|
|
|
|
+ 1.7. iptrtpproxy_authorize_media usage
|
|
|
|
+
|
|
|
|
+ Table of Contents
|
|
|
|
+
|
|
|
|
+ 1. Overview
|
|
|
|
+ 2. Dependencies
|
|
|
|
+ 3. Parameters
|
|
|
|
+
|
|
|
|
+ 3.1. config (string)
|
|
|
|
+ 3.2. switchboard (string)
|
|
|
|
+ 3.3. rpc_heartbeat_timeout (int)
|
|
|
|
+ 3.4. hostname (string)
|
|
|
|
+ 3.5. declare_codec (string)
|
|
|
|
+ 3.6. codec_set (string)
|
|
|
|
+
|
|
|
|
+ 4. Functions
|
|
|
|
+
|
|
|
|
+ 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids])
|
|
|
|
+ 4.2. iptrtpproxy_update(gate_a_to_b, session_ids)
|
|
|
|
+ 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids)
|
|
|
|
+ 4.4. iptrtpproxy_delete(session_ids)
|
|
|
|
+ 4.5. iptrtpproxy_authorize_media()
|
|
|
|
+ 4.6. iptrtpproxy_set_param(param, value)
|
|
|
|
+ 4.7.
|
|
|
|
+ iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/
|
|
|
|
+ b)", sip_ip)
|
|
|
|
+
|
|
|
|
+ 4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids)
|
|
|
|
+ 4.9. iptrtpproxy_set_param("o_name", value)
|
|
|
|
+ 4.10. iptrtpproxy_set_param("o_addr", value)
|
|
|
|
+ 4.11. iptrtpproxy_set_param("codec_set", value)
|
|
|
|
+ 4.12. iptrtpproxy_set_param("remove_codec_mask", value)
|
|
|
|
+
|
|
|
|
+ 5. Selects
|
|
|
|
+
|
|
|
|
+ 5.1. @iptrtpproxy.session_ids
|
|
|
|
+ 5.2. @iptrtpproxy.sdp_ip
|
|
|
|
+ 5.3. @iptrtpproxy.o_name
|
|
|
|
+ 5.4. @iptrtpproxy.o_addr
|
|
|
|
+ 5.5. @iptrtpproxy.auth_rights
|
|
|
|
+ 5.6. @iptrtpproxy.active_media_num
|
|
|
|
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
@@ -98,7 +182,7 @@ Note
|
|
to widden bandwidth. Aggregation will take sip-addr from the first
|
|
to widden bandwidth. Aggregation will take sip-addr from the first
|
|
switchboard of its.
|
|
switchboard of its.
|
|
|
|
|
|
- Example 1. Declare switchboard
|
|
|
|
|
|
+ Example 1.1. Declare switchboard
|
|
...
|
|
...
|
|
modparam("iptrtpproxy", "config", "/etc/iptrtpproxy.cfg");
|
|
modparam("iptrtpproxy", "config", "/etc/iptrtpproxy.cfg");
|
|
modparam("iptrtpproxy", "switchboard", "name=my1;sip-addr-a=1.2.3.4;sip-
|
|
modparam("iptrtpproxy", "switchboard", "name=my1;sip-addr-a=1.2.3.4;sip-
|
|
@@ -161,7 +245,7 @@ addr-b=3.4.5.6;aggregation=my23");
|
|
unlimited). It will override bandwidth limited by
|
|
unlimited). It will override bandwidth limited by
|
|
iptrtpproxy_set_param("throttle_*").
|
|
iptrtpproxy_set_param("throttle_*").
|
|
|
|
|
|
- Example 2. Declare codec_set
|
|
|
|
|
|
+ Example 1.2. Declare codec_set
|
|
...
|
|
...
|
|
# enable all codecs, default state when codec is declared
|
|
# enable all codecs, default state when codec is declared
|
|
modparam("iptrtpproxy", "codec_set", "name=cs1;media_type=*;max_streams=
|
|
modparam("iptrtpproxy", "codec_set", "name=cs1;media_type=*;max_streams=
|
|
@@ -228,7 +312,7 @@ s=10000;rtcp_bytes=1000");
|
|
* function returns true is a session was created, identifier is
|
|
* function returns true is a session was created, identifier is
|
|
available via select @iptrtpproxy.session_ids.
|
|
available via select @iptrtpproxy.session_ids.
|
|
|
|
|
|
- Example 3. iptrtpproxy_alloc usage
|
|
|
|
|
|
+ Example 1.3. iptrtpproxy_alloc usage
|
|
...
|
|
...
|
|
if (!iptrtpproxy_set_param("aggregation_by_sip_ip_a", "@received.ip")) {
|
|
if (!iptrtpproxy_set_param("aggregation_by_sip_ip_a", "@received.ip")) {
|
|
if (!iptrtpproxy_set_param("switchboard_by_sip_ip_a", "@received
|
|
if (!iptrtpproxy_set_param("switchboard_by_sip_ip_a", "@received
|
|
@@ -285,7 +369,7 @@ eval.get[-1]")) {
|
|
in onreply route, retransmission replies are not eaten be tm
|
|
in onreply route, retransmission replies are not eaten be tm
|
|
module!
|
|
module!
|
|
|
|
|
|
- Example 4. iptrtpproxy_update usage
|
|
|
|
|
|
+ Example 1.4. iptrtpproxy_update usage
|
|
...
|
|
...
|
|
# load $sess_ids from dialog
|
|
# load $sess_ids from dialog
|
|
if (iptrtpproxy_update("0", $sess_ids)) {
|
|
if (iptrtpproxy_update("0", $sess_ids)) {
|
|
@@ -301,7 +385,7 @@ eval.get[-1]")) {
|
|
* if gate_a_to_b bit 0 is set then it regards to gate-a to gate-b
|
|
* if gate_a_to_b bit 0 is set then it regards to gate-a to gate-b
|
|
direction.
|
|
direction.
|
|
|
|
|
|
- Example 5. iptrtpproxy_adjust_timeout usage
|
|
|
|
|
|
+ Example 1.5. iptrtpproxy_adjust_timeout usage
|
|
...
|
|
...
|
|
# load $sess_ids from dialog
|
|
# load $sess_ids from dialog
|
|
if (status=~"18[0-9]") {
|
|
if (status=~"18[0-9]") {
|
|
@@ -321,7 +405,7 @@ eval.get[-1]")) {
|
|
protected_session_ids list is provided then this set is excluded from
|
|
protected_session_ids list is provided then this set is excluded from
|
|
sessions to be deleted.
|
|
sessions to be deleted.
|
|
|
|
|
|
- Example 6. iptrtpproxy_delete usage
|
|
|
|
|
|
+ Example 1.6. iptrtpproxy_delete usage
|
|
...
|
|
...
|
|
# load $sess_ids from dialog
|
|
# load $sess_ids from dialog
|
|
iptrtpproxy_delete($sess_ids);
|
|
iptrtpproxy_delete($sess_ids);
|
|
@@ -339,7 +423,7 @@ eval.get[-1]")) {
|
|
function may be called several times to authorize using more codec
|
|
function may be called several times to authorize using more codec
|
|
sets.
|
|
sets.
|
|
|
|
|
|
- Example 7. iptrtpproxy_authorize_media usage
|
|
|
|
|
|
+ Example 1.7. iptrtpproxy_authorize_media usage
|
|
...
|
|
...
|
|
if (@iptrtpproxy.active_media_num == "0") break;
|
|
if (@iptrtpproxy.active_media_num == "0") break;
|
|
iptrtpproxy_set_param("codec_set", "cs2");
|
|
iptrtpproxy_set_param("codec_set", "cs2");
|