[OpenSIPS-Users] Issue with rtpengine
Răzvan Crainea
razvan at opensips.org
Wed Jan 19 11:27:07 UTC 2022
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
More information about the Users
mailing list