Browse code

modules/mohqueue: force RTP to follow SDP

- version 1.8
- use rtpproxy r flag to force RTP to follow SDP
- fixed compiler warnings

(cherry picked from commit 0e51ce1075f206a4441333f72c69fcc56f8d6855)

Robert Boisvert authored on 19/05/2021 20:19:24 • Daniel-Constantin Mierla committed on 15/06/2021 07:29:22
Showing 1 changed files
... ...
@@ -32,7 +32,7 @@
32 32
 #define ALLOWHDR "Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, PRACK"
33 33
 #define CLENHDR "Content-Length"
34 34
 #define SIPEOL  "\r\n"
35
-#define USRAGNT "Kamailio MOH Queue v1.7"
35
+#define USRAGNT "Kamailio MOH Queue v1.8"
36 36
 
37 37
 /**********
38 38
 * local constants
... ...
@@ -1075,10 +1075,11 @@ if (pmsg->allow)
1075 1075
 * send RTP offer
1076 1076
 **********/
1077 1077
 
1078
+fparam_t rflag = {.orig="", .type=FPARAM_STRING, {.asciiz="r"}, .fixed=0};
1078 1079
 mohq_debug (pcall->pmohq,
1079 1080
   "%sMaking offer for RTP link for call (%s) from queue (%s)",
1080 1081
   pfncname, pcall->call_from, pcall->pmohq->mohq_name);
1081
-if (pmod_data->fn_rtp_offer (pmsg, 0, 0) != 1)
1082
+if (pmod_data->fn_rtp_offer (pmsg, (char *) &rflag, 0) != 1)
1082 1083
   {
1083 1084
   if (pmod_data->psl->freply (pmsg, 486, presp_busy) < 0)
1084 1085
     {
... ...
@@ -2160,9 +2161,8 @@ int nsession;
2160 2161
 sdp_session_cell_t *psession;
2161 2162
 char pflagbuf [5];
2162 2163
 strcpy (pflagbuf, "z20");
2163
-fparam_t pzflag [1] = {
2164
-    {"", FPARAM_STRING, {pflagbuf}, 0}
2165
-};
2164
+fparam_t zflag = {.orig="", .type=FPARAM_STRING, {.asciiz=pflagbuf}, .fixed=0};
2165
+fparam_t *pzflag = &zflag;
2166 2166
 for (nsession = 0; (psession = get_sdp_session (pmsg, nsession)); nsession++)
2167 2167
   {
2168 2168
   int nstream;