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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Sun Mar 13 23:18:02 2011 +0100

sdpops: documented sdp_print(...) and sdp_with_media(...)

---

 modules/sdpops/README               |   40 +++++++++++++++++++++++++++
 modules/sdpops/doc/sdpops_admin.xml |   52 ++++++++++++++++++++++++++++++++++-
 2 files changed, 91 insertions(+), 1 deletions(-)

diff --git a/modules/sdpops/README b/modules/sdpops/README
index 50630f7..10d72ce 100644
--- a/modules/sdpops/README
+++ b/modules/sdpops/README
@@ -27,10 +27,14 @@ Daniel-Constantin Mierla
         4. Exported Functions
 
               4.1. sdp_remove_codecs_by_id(list)
+              4.2. sdp_with_media(type)
+              4.3. sdp_print(level)
 
    List of Examples
 
    1.1. sdp_remove_codecs_by_id usage
+   1.2. sdp_with_media usage
+   1.3. sdp_print usage
 
 Chapter 1. Admin Guide
 
@@ -46,6 +50,8 @@ Chapter 1. Admin Guide
    4. Exported Functions
 
         4.1. sdp_remove_codecs_by_id(list)
+        4.2. sdp_with_media(type)
+        4.3. sdp_print(level)
 
 1. Overview
 
@@ -80,6 +86,8 @@ Chapter 1. Admin Guide
 4. Exported Functions
 
    4.1. sdp_remove_codecs_by_id(list)
+   4.2. sdp_with_media(type)
+   4.3. sdp_print(level)
 
 4.1.  sdp_remove_codecs_by_id(list)
 
@@ -88,6 +96,8 @@ Chapter 1. Admin Guide
    comma separated list of numeric codec IDs. The parameter can be a
    static string or a variable holding the list of numeric codec IDs.
 
+   This function can be used from ANY_ROUTE.
+
    Example 1.1. sdp_remove_codecs_by_id usage
 ...
 # remove PCMU
@@ -95,3 +105,33 @@ sdp_remove_codecs_by_id("0");
 # remove PCMU, PCMA and GSM
 sdp_remove_codecs_by_id("0,8,3");
 ...
+
+4.2.  sdp_with_media(type)
+
+   Return true of the SDP has 'media=type ...' line. Useful to check the
+   content of the RTP sessions, such as 'audio' or 'video'. The parameter
+   can be static string or variable holding the media type.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.2. sdp_with_media usage
+...
+# check for video stream
+if(sdp_with_media("video"))
+{
+    # the session has a video stream
+}
+...
+
+4.3.  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.3. sdp_print usage
+...
+# print the SDP
+sdp_print("1");
+...
diff --git a/modules/sdpops/doc/sdpops_admin.xml 
b/modules/sdpops/doc/sdpops_admin.xml
index 4981c07..bbb4738 100644
--- a/modules/sdpops/doc/sdpops_admin.xml
+++ b/modules/sdpops/doc/sdpops_admin.xml
@@ -67,7 +67,7 @@
 
        <section>
        <title>Exported Functions</title>
-       <section>
+       <section>
            <title>
                <function 
moreinfo="none">sdp_remove_codecs_by_id(list)</function>
            </title>
@@ -78,6 +78,9 @@
                        parameter can be a static string or a variable holding 
the
                        list of numeric codec IDs.
            </para>
+               <para>
+                       This function can be used from ANY_ROUTE.
+           </para>
                <example>
                <title><function>sdp_remove_codecs_by_id</function> 
usage</title>
                <programlisting format="linespecific">
@@ -90,6 +93,53 @@ sdp_remove_codecs_by_id("0,8,3");
 </programlisting>
            </example>
        </section>
+       <section>
+           <title>
+               <function moreinfo="none">sdp_with_media(type)</function>
+           </title>
+           <para>
+               Return true of the SDP has 'media=type ...' line. Useful to 
check
+               the content of the RTP sessions, such as 'audio' or 'video'. The
+               parameter can be static string or variable holding the media 
type.
+           </para>
+               <para>
+                       This function can be used from ANY_ROUTE.
+           </para>
+               <example>
+               <title><function>sdp_with_media</function> usage</title>
+               <programlisting format="linespecific">
+...
+# check for video stream
+if(sdp_with_media("video"))
+{
+    # the session has a video stream
+}
+...
+</programlisting>
+           </example>
+       </section>
+       <section>
+           <title>
+               <function moreinfo="none">sdp_print(level)</function>
+           </title>
+           <para>
+               Print the SDP internal structure to log 'level'. The
+               parameter can be static integer or variable holding the integer
+               value of the log level.
+           </para>
+               <para>
+                       This function can be used from ANY_ROUTE.
+           </para>
+               <example>
+               <title><function>sdp_print</function> usage</title>
+               <programlisting format="linespecific">
+...
+# print the SDP
+sdp_print("1");
+...
+</programlisting>
+           </example>
+       </section>
        </section>
 </chapter>
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to