[OpenSIPS-Users] Push SDP into Request

Mark Farmer farmorg at gmail.com
Wed Aug 11 13:24:29 EST 2021


Thanks for the replies :)

I am not sure I really understand them, however I have solved the problem
like this:

rtpengine_offer($var(PSTN_TPTY),,$var(SDPbody));
$var(reg) = "/a=silenceSupp.*\n//ig";
$var(SDPbody) = $(var(SDPbody){re.subst,$var(reg)});
remove_body_part();
add_body_part("$var(SDPbody)", "application/sdp")

Perhaps there is a better way but this seems to work for now :)



On Wed, 11 Aug 2021 at 13:47, Carlos Eduardo <kaduww at gmail.com> wrote:

> I noticed that when you manipulate before passing to rtpengine, the module
> sends the "old" sdp to rtpengine. Does it make sense?
>
> Em qua., 11 de ago. de 2021 às 09:07, Johan De Clercq <Johan at democon.be>
> escreveu:
>
>> wouldn't it be better to do first your manip and then pass it to
>> rtpengine ?
>>
>> Op wo 11 aug. 2021 om 12:39 schreef Mark Farmer <farmorg at gmail.com>:
>>
>>> Hi everyone
>>>
>>> I am using rtpengine_offer() and storing the SDP in a variable which I
>>> then modify using the reg_exp transformation to delete a line.
>>>
>>> rtpengine_offer($var(PSTN_TPTY),,$var(SDPbody));
>>> $var(SDPbody) = $(var(SDPbody){re.subst,/a=silenceSupp:off\ -\ -\ -\
>>> -\r\n//g});
>>>
>>> How do I then push the resulting variable into the body of the INVITE?
>>>
>>> Many thanks
>>> Mark.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> *Carlos E. Wagner*
> *Tecnólogo em Telecomunicações, Opensips Certified Professional*
>
> *Fone: +55 48 99981-0894*
> *E-mail:* kaduww at gmail.com
> *LinkedIn:* https://www.linkedin.com/in/carlos-eduardo-wagner-96bbb433/
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210811/986bf367/attachment-0001.html>


More information about the Users mailing list