[OpenSIPS-Users] Issue with rtpengine
Sergey Pisanko
serp87 at yandex.ru
Fri Jan 21 09:34:01 UTC 2022
Hi, Răzvan.
Thanks for your reply. According to your advice, I try to do something like
this:
$var(aline) = $(rb{sdp.line,a,9});
subst_body("/(a=crypto:1)+(.*)$/$var(aline)/" );
But I don't know, how to add changed SDP as a result of "subst_body"
execution into certain pvar. I could get only execution code, not an SDP.
If I add the string "rtpengine_offer("RTP/SAVP ICE=remove",
,"$var(body)");" next to the script above, I get a crypto string what I
need,
but everything else SDP strings takes from UA's original SDP (IPs, media
ports etc). What do I do wrong?
Best Regards,
Sergey Pysanko.
[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
01/21/22,
11:32:02 AM
ср, 19 янв. 2022 г. в 13:29, Răzvan Crainea <razvan at opensips.org>:
> Hi, Sergey!
>
> Rtpengine uses by default the SDP received in the message, it does not
> take into account any "local" changes you make.
> What you can try is to replace the body and get the result in a pvar,
> and then pass that pvar to the rtpengine_offer function[1], 3rd parameter.
>
> [1]
> https://opensips.org/html/docs/modules/3.2.x/rtpengine#func_rtpengine_offer
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 1/18/22 19:37, Sergey Pisanko wrote:
> >
> > I tried to remove crypto strings that's not needed with "replace_body()"
> > function before rtpengine execution.. And I got the string what I need.
> > But despite this, when rtpengine is applied and proxy relays message to
> > UA2, rtpengine adds a string what I got rid from SDP on the previous
> > step. And I don't have any idea, from where rtpengine get crypto string
> > in a changed body. Here is what the script in this part looks like:
> >
> > branch_route[invite_to_pbx] {
> > xlog("outgoing to pbx");
> > if(has_body("application/sdp")) {
> > if (replace_body_all("a=crypto:([1-9])+( AES_CM_256)+(.*)$",
> > "")) {
> > xlog("Replaced");
> > }
> > rtpengine_offer("RTP/SAVP ICE=remove"));
> > }
> > }
> >
> > I also tried to execute this in a request route, but without changing.
> >
> > Can you help me to understand why rtpengine ignores changed SDP? Is my
> > script logic correct?
> >
> > Best regards,
> > Sergey Pysanko.
> > Mailtrack
> > <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
>
> > Sender notified by
> > Mailtrack
> > <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
>
> > 01/18/22, 07:13:23 PM
> >
> >
> > пт, 14 янв. 2022 г. в 17:30, Sergey Pisanko <serp87 at yandex.ru
> > <mailto:serp87 at yandex.ru>>:
> >
> > Hello.
> >
> > I've faced an issue when using rtpengine module with tls transport.
> > When UA originates a call it pointed set of crypto
> > parameters in SDP, like that:
> >
> > a=crypto:1 AES_CM_256_HMAC_SHA1_80
> >
> inline:PZASLY5HoxVo6Ljz2niwxqNJ+3A2mW71SgfL75cRFtShKQIvcKVF2Y39zGd1fQ==
> > a=crypto:2 AES_CM_256_HMAC_SHA1_32
> >
> inline:LRjGKIj8wvfxDP68+5XOEmlvO2ufqxDkhJ3hUQRWzjFulFr2kBztgSjrPSSACw==
> > a=crypto:3 AES_CM_128_HMAC_SHA1_80
> > inline:Nup7cVUaHGb+oQPf8gg1wDmjVJOZ5K+HZdhyovzz
> > a=crypto:4 AES_CM_128_HMAC_SHA1_32
> > inline:rjLdKaMyQ7+YQWCcIFKkVRLd+GZxkUogGK/4i1L0
> >
> > But when Opensips relays original message to UA2, rtpengine removes
> > all the crypto suite strings except the first one.
> > Unfortunately, there is no way to configure client's behaivior to
> > send certain crypto suite.
> > In other side, UA2, that is PBX, doesn't support all crypto suites
> > except AES_CM_128_HMAC_SHA1_80
> > Is there a way to configure Opensips/rtpengine to choose specific
> > crypto string or to leave crypto set without changing at all?
> >
> > Best Regards,
> > Sergey Pysanko.
> >
> >
> >
> > Mailtrack
> > <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&
> >
> > Sender notified by
> > Mailtrack
> > <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&
> >
> > 01/14/22, 05:28:49 PM
> >
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220121/e9232b24/attachment-0001.html>
More information about the Users
mailing list