[sr-dev] git:master: modules/sdpops: refresh README

Victor Seva linuxmaniac at torreviejawireless.org
Sat Jul 6 20:10:24 CEST 2013


Module: sip-router
Branch: master
Commit: faf2f6b9897c3b9acf69a1bbe22b827f386a863e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=faf2f6b9897c3b9acf69a1bbe22b827f386a863e

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date:   Sat Jul  6 15:13:00 2013 +0200

modules/sdpops: refresh README

---

 modules/sdpops/README |  111 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 75 insertions(+), 36 deletions(-)

diff --git a/modules/sdpops/README b/modules/sdpops/README
index f070500..7c9f9f8 100644
--- a/modules/sdpops/README
+++ b/modules/sdpops/README
@@ -33,12 +33,14 @@ Daniel-Constantin Mierla
               4.5. sdp_keep_codecs_by_name(list [, mtype])
               4.6. sdp_with_media(type)
               4.7. sdp_remove_media(type)
-              4.8. sdp_with_codecs_by_id(list)
-              4.9. sdp_with_codecs_by_name(list)
-              4.10. sdp_print(level)
-              4.11. sdp_get(avpvar)
-              4.12. sdp_content()
-              4.13. sdp_get_line_startswith(avpvar, string)
+              4.8. sdp_with_transport(type)
+              4.9. sdp_remove_transport(type)
+              4.10. sdp_with_codecs_by_id(list)
+              4.11. sdp_with_codecs_by_name(list)
+              4.12. sdp_print(level)
+              4.13. sdp_get(avpvar)
+              4.14. sdp_content()
+              4.15. sdp_get_line_startswith(avpvar, string)
 
    List of Examples
 
@@ -49,12 +51,14 @@ Daniel-Constantin Mierla
    1.5. sdp_keep_codecs_by_name usage
    1.6. sdp_with_media usage
    1.7. sdp_remove_media usage
-   1.8. sdp_with_codecs_by_id usage
-   1.9. sdp_with_codecs_by_name usage
-   1.10. sdp_print usage
-   1.11. sdp_get usage
-   1.12. sdp_content usage
-   1.13. sdp_get_line_startswith usage
+   1.8. sdp_with_transport usage
+   1.9. sdp_remove_transport usage
+   1.10. sdp_with_codecs_by_id usage
+   1.11. sdp_with_codecs_by_name usage
+   1.12. sdp_print usage
+   1.13. sdp_get usage
+   1.14. sdp_content usage
+   1.15. sdp_get_line_startswith usage
 
 Chapter 1. Admin Guide
 
@@ -76,12 +80,14 @@ Chapter 1. Admin Guide
         4.5. sdp_keep_codecs_by_name(list [, mtype])
         4.6. sdp_with_media(type)
         4.7. sdp_remove_media(type)
-        4.8. sdp_with_codecs_by_id(list)
-        4.9. sdp_with_codecs_by_name(list)
-        4.10. sdp_print(level)
-        4.11. sdp_get(avpvar)
-        4.12. sdp_content()
-        4.13. sdp_get_line_startswith(avpvar, string)
+        4.8. sdp_with_transport(type)
+        4.9. sdp_remove_transport(type)
+        4.10. sdp_with_codecs_by_id(list)
+        4.11. sdp_with_codecs_by_name(list)
+        4.12. sdp_print(level)
+        4.13. sdp_get(avpvar)
+        4.14. sdp_content()
+        4.15. sdp_get_line_startswith(avpvar, string)
 
 1. Overview
 
@@ -122,12 +128,14 @@ Chapter 1. Admin Guide
    4.5. sdp_keep_codecs_by_name(list [, mtype])
    4.6. sdp_with_media(type)
    4.7. sdp_remove_media(type)
-   4.8. sdp_with_codecs_by_id(list)
-   4.9. sdp_with_codecs_by_name(list)
-   4.10. sdp_print(level)
-   4.11. sdp_get(avpvar)
-   4.12. sdp_content()
-   4.13. sdp_get_line_startswith(avpvar, string)
+   4.8. sdp_with_transport(type)
+   4.9. sdp_remove_transport(type)
+   4.10. sdp_with_codecs_by_id(list)
+   4.11. sdp_with_codecs_by_name(list)
+   4.12. sdp_print(level)
+   4.13. sdp_get(avpvar)
+   4.14. sdp_content()
+   4.15. sdp_get_line_startswith(avpvar, string)
 
 4.1.  sdp_remove_codecs_by_id(list)
 
@@ -252,7 +260,38 @@ if(sdp_with_media("video"))
 sdp_remove_media("video");
 ...
 
-4.8.  sdp_with_codecs_by_id(list)
+4.8.  sdp_with_transport(type)
+
+   Return true of the SDP has 'media=media port type ...' line. Useful to
+   check the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP'
+   or 'RTP/SAVPF'. The parameter can be static string or variable holding
+   the transport type.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.8. sdp_with_transport usage
+...
+# check for RTP/SAVP stream
+if(sdp_with_transport("RTP/SAVP"))
+{
+    # the session has a SRTP/SAVP stream
+}
+...
+
+4.9.  sdp_remove_transport(type)
+
+   Remove the streams that match on 'm=media port type ...' line. The
+   parameter can be static string or variable holding the transport type.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.9. sdp_remove_transport usage
+...
+# remove stream with transport RTP/AVP
+sdp_remove_transport("RTP/AVP");
+...
+
+4.10.  sdp_with_codecs_by_id(list)
 
    Returns true if any of the codecs provided in the parameter 'list' from
    all media streams is found in SDP payload. The parameter 'list' must be
@@ -261,7 +300,7 @@ sdp_remove_media("video");
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.8. sdp_with_codecs_by_id usage
+   Example 1.10. sdp_with_codecs_by_id usage
 ...
 # test for PCMU
 if(sdp_with_codecs_by_id("0")) { ... }
@@ -269,7 +308,7 @@ if(sdp_with_codecs_by_id("0")) { ... }
 if(sdp_with_codecs_by_id("0,8,3")) { ... }
 ...
 
-4.9.  sdp_with_codecs_by_name(list)
+4.11.  sdp_with_codecs_by_name(list)
 
    Returns true if any of the codecs provided in the parameter 'list' from
    all media streams is found in SDP payload. The parameter 'list' must be
@@ -278,7 +317,7 @@ if(sdp_with_codecs_by_id("0,8,3")) { ... }
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.9. sdp_with_codecs_by_name usage
+   Example 1.11. sdp_with_codecs_by_name usage
 ...
 # test for PCMU
 if(sdp_with_codecs_by_name("PCMU")) { ... }
@@ -286,45 +325,45 @@ if(sdp_with_codecs_by_name("PCMU")) { ... }
 if(sdp_with_codecs_by_name("PCMU,PCMA,GSM")) { ... }
 ...
 
-4.10.  sdp_print(level)
+4.12.  sdp_print(level)
 
    Print the SDP internal structure to log 'level'. The parameter can be
    static integer or variable holding the integer value of the log level.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.10. sdp_print usage
+   Example 1.12. sdp_print usage
 ...
 # print the SDP
 sdp_print("1");
 ...
 
-4.11.  sdp_get(avpvar)
+4.13.  sdp_get(avpvar)
 
    Store the SDP part of message body in an AVP. Return 1 if SDP is found,
    -1 on error and -2 if there is no SDP part in the message body.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.11. sdp_get usage
+   Example 1.13. sdp_get usage
 ...
 sdp_get("$avp(sdp)");
 ...
 
-4.12.  sdp_content()
+4.14.  sdp_content()
 
    Return true if the SIP message has SDP body or a SDP part in body.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.12. sdp_content usage
+   Example 1.14. sdp_content usage
 ...
 if(sdp_content()) {
     ...
 }
 ...
 
-4.13.  sdp_get_line_startswith(avpvar, string)
+4.15.  sdp_get_line_startswith(avpvar, string)
 
    Store the search part of SDP body message with line beginning with
    'string' in an AVP. Return 1 if 'string' is found in SDP, -1 on error
@@ -332,7 +371,7 @@ if(sdp_content()) {
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.13. sdp_get_line_startswith usage
+   Example 1.15. sdp_get_line_startswith usage
 ...
 if(sdp_get_line_startswith("$avp(mline)", "m=")) {
         xlog("m-line: $avp(mline)\n");




More information about the sr-dev mailing list