[sr-dev] git:5.5:62320e6e: modules/mohqueue: force RTP to follow SDP

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 15 09:29:58 CEST 2021


Module: kamailio
Branch: 5.5
Commit: 62320e6eaafb9870bb5911f5c3c9b7854baa739d
URL: https://github.com/kamailio/kamailio/commit/62320e6eaafb9870bb5911f5c3c9b7854baa739d

Author: Robert Boisvert <rdboisvert at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-15T09:29:22+02:00

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)

---

Modified: src/modules/mohqueue/mohq_funcs.c

---

Diff:  https://github.com/kamailio/kamailio/commit/62320e6eaafb9870bb5911f5c3c9b7854baa739d.diff
Patch: https://github.com/kamailio/kamailio/commit/62320e6eaafb9870bb5911f5c3c9b7854baa739d.patch

---

diff --git a/src/modules/mohqueue/mohq_funcs.c b/src/modules/mohqueue/mohq_funcs.c
index 1f72c58c5a..c46cb51a75 100644
--- a/src/modules/mohqueue/mohq_funcs.c
+++ b/src/modules/mohqueue/mohq_funcs.c
@@ -32,7 +32,7 @@
 #define ALLOWHDR "Allow: INVITE, ACK, BYE, CANCEL, NOTIFY, PRACK"
 #define CLENHDR "Content-Length"
 #define SIPEOL  "\r\n"
-#define USRAGNT "Kamailio MOH Queue v1.7"
+#define USRAGNT "Kamailio MOH Queue v1.8"
 
 /**********
 * local constants
@@ -1075,10 +1075,11 @@ if (pmsg->allow)
 * send RTP offer
 **********/
 
+fparam_t rflag = {.orig="", .type=FPARAM_STRING, {.asciiz="r"}, .fixed=0};
 mohq_debug (pcall->pmohq,
   "%sMaking offer for RTP link for call (%s) from queue (%s)",
   pfncname, pcall->call_from, pcall->pmohq->mohq_name);
-if (pmod_data->fn_rtp_offer (pmsg, 0, 0) != 1)
+if (pmod_data->fn_rtp_offer (pmsg, (char *) &rflag, 0) != 1)
   {
   if (pmod_data->psl->freply (pmsg, 486, presp_busy) < 0)
     {
@@ -2160,9 +2161,8 @@ int nsession;
 sdp_session_cell_t *psession;
 char pflagbuf [5];
 strcpy (pflagbuf, "z20");
-fparam_t pzflag [1] = {
-    {"", FPARAM_STRING, {pflagbuf}, 0}
-};
+fparam_t zflag = {.orig="", .type=FPARAM_STRING, {.asciiz=pflagbuf}, .fixed=0};
+fparam_t *pzflag = &zflag;
 for (nsession = 0; (psession = get_sdp_session (pmsg, nsession)); nsession++)
   {
   int nstream;




More information about the sr-dev mailing list