[sr-dev] git:master:0e51ce10: modules/mohqueue: force RTP to follow SDP

Robert Boisvert rdboisvert at gmail.com
Wed May 19 22:19:40 CEST 2021


Module: kamailio
Branch: master
Commit: 0e51ce1075f206a4441333f72c69fcc56f8d6855
URL: https://github.com/kamailio/kamailio/commit/0e51ce1075f206a4441333f72c69fcc56f8d6855

Author: Robert Boisvert <rdboisvert at gmail.com>
Committer: Robert Boisvert <rdboisvert at gmail.com>
Date: 2021-05-19T16:19:24-04:00

modules/mohqueue: force RTP to follow SDP

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

---

Modified: src/modules/mohqueue/mohq_funcs.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0e51ce1075f206a4441333f72c69fcc56f8d6855.diff
Patch: https://github.com/kamailio/kamailio/commit/0e51ce1075f206a4441333f72c69fcc56f8d6855.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