Browse code

modules: readme files regenerated - rtp_media_server ... [skip ci]

Kamailio Dev authored on 22/02/2019 17:31:45
Showing 1 changed files
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 rtp_media_server Module
3 2
 
4 3
 Julien Chavanton
... ...
@@ -38,8 +37,9 @@ Julien Chavanton
38 37
 
39 38
               4.1. rms_answer ()
40 39
               4.2. rms_hangup ()
41
-              4.3. rms_media_stop ()
42
-              4.4. rms_play ()
40
+              4.3. rms_session_check ()
41
+              4.4. rms_sip_request ()
42
+              4.5. rms_play ()
43 43
 
44 44
    List of Examples
45 45
 
... ...
@@ -48,6 +48,7 @@ Julien Chavanton
48 48
    1.3. usage example
49 49
    1.4. usage example
50 50
    1.5. usage example
51
+   1.6. usage example
51 52
 
52 53
 Chapter 1. Admin Guide
53 54
 
... ...
@@ -67,8 +68,9 @@ Chapter 1. Admin Guide
67 68
 
68 69
         4.1. rms_answer ()
69 70
         4.2. rms_hangup ()
70
-        4.3. rms_media_stop ()
71
-        4.4. rms_play ()
71
+        4.3. rms_session_check ()
72
+        4.4. rms_sip_request ()
73
+        4.5. rms_play ()
72 74
 
73 75
 1. Overview
74 76
 
... ...
@@ -111,6 +113,10 @@ Chapter 1. Admin Guide
111 113
      * mediastreamer2 git clone git://git.linphone.org/mediastreamer2.git
112 114
        Mediastreamer2 is a powerful and lightweight streaming engine
113 115
        specialized for voice/video telephony applications.
116
+     * bcunit git clone
117
+       https://github.com/BelledonneCommunications/bcunit.git
118
+       fork of the defunct project CUnit, with several fixes and patches
119
+       applied. CUnit is a Unit testing framework for C.
114 120
 
115 121
 3. Parameters
116 122
 
... ...
@@ -132,8 +138,9 @@ modparam("rtp_media_server", "log_file_name", "/var/log/rms/rms_ortp.log")
132 138
 
133 139
    4.1. rms_answer ()
134 140
    4.2. rms_hangup ()
135
-   4.3. rms_media_stop ()
136
-   4.4. rms_play ()
141
+   4.3. rms_session_check ()
142
+   4.4. rms_sip_request ()
143
+   4.5. rms_play ()
137 144
 
138 145
 4.1. rms_answer ()
139 146
 
... ...
@@ -166,11 +173,7 @@ route {
166 173
                         t_reply("503", "server error");
167 174
                 }
168 175
         }
169
-
170
-        if (is_method("BYE")){
171
-                xnotice("BYE RECEIVED [$ci]\n");
172
-                rms_media_stop();
173
-        }
176
+        rms_sip_request();
174 177
 ...
175 178
 
176 179
 4.2. rms_hangup ()
... ...
@@ -184,10 +187,27 @@ route {
184 187
         rms_hangup();
185 188
 ...
186 189
 
187
-4.3. rms_media_stop ()
190
+4.3. rms_session_check ()
191
+
192
+   Returns true if the current SIP message it handled/known by the RMS
193
+   module, else it may be handle in any other way by Kamailio.
194
+
195
+   This function can be used from REQUEST_ROUTE, REPLY_ROUTE and
196
+   FAILURE_ROUTE.
197
+
198
+   Example 1.4. usage example
199
+...
200
+        if (rms_session_check()) {
201
+                xnotice("This session is handled by the RMS module\n");
202
+                rms_sip_request();
203
+        }
204
+...
205
+
206
+4.4. rms_sip_request ()
188 207
 
189
-   This should be called on reception of a BYE, this will delete the RTP
190
-   session and the media ressources. and reply "200 OK".
208
+   This should be called for every in-dialog SIP request, it will be
209
+   forwarded behaving as a B2BUA, the transaction will be suspended until
210
+   the second leg replies.
191 211
 
192 212
    If the SIP session is not found "481 Call/Transaction Does Not Exist"
193 213
    is returned.
... ...
@@ -195,14 +215,14 @@ route {
195 215
    This function can be used from REQUEST_ROUTE, REPLY_ROUTE and
196 216
    FAILURE_ROUTE.
197 217
 
198
-   Example 1.4. usage example
218
+   Example 1.5. usage example
199 219
 ...
200
-        if (is_method("BYE")){
201
-                rms_media_stop();
220
+        if (rms_session_check()) {
221
+                rms_sip_request();
202 222
         }
203 223
 ...
204 224
 
205
-4.4. rms_play ()
225
+4.5. rms_play ()
206 226
 
207 227
    Play a wav file, a resampler is automaticaly configured to resample and
208 228
    convert stereo to mono if needed.
... ...
@@ -212,7 +232,7 @@ route {
212 232
 
213 233
    This function can be used from EVENT_ROUTE.
214 234
 
215
-   Example 1.5. usage example
235
+   Example 1.6. usage example
216 236
 ...
217 237
         rms_play("file.wav", "event_route_name");
218 238
 ...