[OpenSIPS-Users] rtpengine_manage() fails when called from failure_route[] with additional flags.

Vitalii Aleksandrov vitalik.voip at gmail.com
Mon Feb 18 13:25:32 EST 2019

Agree that flags for OP_DELETE are important.
This patch fixes flags for me and OP_DELETE removes proper branch 
instead of the whole call:

diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index 2d1a1d3..6eba189 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -1760,6 +1760,8 @@ static bencode_item_t 
*rtpe_function_call(bencode_buffer_t *bencbuf, struct sip_
                         goto error;
                 bencode_dictionary_add_str(ng_flags.dict, "sdp", &body);
+       } else if (op == OP_DELETE) {
+               ng_flags.flags = bencode_list(bencbuf);

> Hi, Vitalii!
> It looks you are running out of memory. Make sure you have properly 
> adjusted opensips with enough private memory.
> I don't think your patch is correct, since it does not parse flags for 
> delete commands, although someone might need them.
> Best regards,
> Razvan
> On 2/13/19 3:09 PM, Vitalii Aleksandrov wrote:
>> Hi,
>> I use only rtpengine_manage() function of 
>> rtpengine_{offer,answer,delete} and it is called from different 
>> locations like request_route, onreply_route, failure_route.
>> To have everything in one place I call a route[RTPENGINE_MANAGE] 
>> which in its turn prepares rtpengine parameters string (ICE, 
>> profiles, flags) and calls rtpengine_manage(). When this route is 
>> called from failure_route rtpengine_manage() is supposed to behave 
>> like rtpengine_delete() and it does. The only problem is that when it 
>> receives flags in its parameters string (no-rtcp-attribute in my 
>> case) it fails with "rtpengine:parse_flags: error processing flag 
>> `no-rtcp-attribute': no more memory" message instead of just ignoring 
>> useless for delete operation parameters.
>> Attaching the patch that fixed this problem for me. Not sure if this 
>> is a bug or lack of module documentation.
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

More information about the Users mailing list