Hello,
I migrated from Rtp_proxy module to Rtp_Engine. Everythings works fine apart the rewriting of the SDP description in Kamailio
subst_body('/(^s=.*)/s=Test of a Sip call.\r/')
Any ideas if this is supposed to be supported?
Are you going through a PBX like Asterisk? I am using rtpengine but I cannot get media packets to go from Asterisk->Kamailio(rtpengine)->softphone. I get no errors and I see rtpengine traffic, but the calls go Asterisk->softphone.
Thanks ALL
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Nicolas Breuer Sent: Monday, August 13, 2018 11:32 AM To: 'Kamailio (SER) - Users Mailing List' sr-users@lists.sip-router.org Subject: [SR-Users] Migrate from RtpProxy to Rtpengine
Hello,
I migrated from Rtp_proxy module to Rtp_Engine. Everythings works fine apart the rewriting of the SDP description in Kamailio
subst_body('/(^s=.*)/s=Test of a Sip call.\r/')
Any ideas if this is supposed to be supported?
No. Using RTPengine on Kamailio. No asterisk behind. I think subst_body is not supported.
Someone can confirm ?
Le 13 août 2018 à 23:58, Wilkins, Steve <swwilkins@mitre.orgmailto:swwilkins@mitre.org> a écrit :
Are you going through a PBX like Asterisk? I am using rtpengine but I cannot get media packets to go from Asterisk->Kamailio(rtpengine)->softphone. I get no errors and I see rtpengine traffic, but the calls go Asterisk->softphone.
Thanks ALL
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of Nicolas Breuer Sent: Monday, August 13, 2018 11:32 AM To: 'Kamailio (SER) - Users Mailing List' <sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org> Subject: [SR-Users] Migrate from RtpProxy to Rtpengine
Hello,
I migrated from Rtp_proxy module to Rtp_Engine. Everythings works fine apart the rewriting of the SDP description in Kamailio
subst_body('/(^s=.*)/s=Test of a Sip call.\r/')
Any ideas if this is supposed to be supported?
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Tue, Aug 14, 2018 at 06:41:32AM +0000, Nicolas Breuer wrote:
No. Using RTPengine on Kamailio. No asterisk behind. I think subst_body is not supported.
Someone can confirm ?
Sounds like you are making changes to the body before the rtpengine mangling is commit. See https://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.ms...
Try: substr msg_apply_changes() rtpengine_manage()
of
rtpengine_manage() msg_apply_changes() substr
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
That was working without apply_changes with rtpproxy. Is it expected ?
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Daniel Tryba Envoyé : mardi 14 août 2018 10:19 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On Tue, Aug 14, 2018 at 06:41:32AM +0000, Nicolas Breuer wrote:
No. Using RTPengine on Kamailio. No asterisk behind. I think subst_body is not supported.
Someone can confirm ?
Sounds like you are making changes to the body before the rtpengine mangling is commit. See https://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.ms...
Try: substr msg_apply_changes() rtpengine_manage()
of
rtpengine_manage() msg_apply_changes() substr
On Tue, Aug 14, 2018 at 08:23:28AM +0000, Nicolas Breuer wrote:
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
From documentation: "This function can be used from REQUEST_ROUTE or core REPLY_ROUTE."
It can't be used in any other "named" reply.
See: https://www.kamailio.org/wiki/cookbooks/5.1.x/core#reply_route reply_route{} is executed before any route armed with t_on_reply(), sou you can possibly rewrite your reply logic a little.
I don't like the msg_apply_changes but can you explain the different behavior between rtpproxy & rtpengine?
Thanks
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Daniel Tryba Envoyé : mardi 14 août 2018 10:39 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On Tue, Aug 14, 2018 at 08:23:28AM +0000, Nicolas Breuer wrote:
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
From documentation:
"This function can be used from REQUEST_ROUTE or core REPLY_ROUTE."
It can't be used in any other "named" reply.
See: https://www.kamailio.org/wiki/cookbooks/5.1.x/core#reply_route reply_route{} is executed before any route armed with t_on_reply(), sou you can possibly rewrite your reply logic a little.
With subst_body, the part of the expression is not replaced but added. Please see
. v=0. o=root 549881893 549881894 IN IP4 1.2.3.4 s=Original Description c=IN IP4 1.2.3.4 t=0 0. m=audio 10704 RTP/AVP 8 101. a=maxptime:150. a=rtpmap:8 PCMA/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=sendrecv. a=rtcp:10705. s=New Description.
-----Message d'origine----- De : Nicolas Breuer Envoyé : mardi 14 août 2018 10:45 À : 'sr-users@lists.kamailio.org' sr-users@lists.kamailio.org Objet : RE: [SR-Users] Migrate from RtpProxy to Rtpengine
I don't like the msg_apply_changes but can you explain the different behavior between rtpproxy & rtpengine?
Thanks
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Daniel Tryba Envoyé : mardi 14 août 2018 10:39 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On Tue, Aug 14, 2018 at 08:23:28AM +0000, Nicolas Breuer wrote:
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
From documentation:
"This function can be used from REQUEST_ROUTE or core REPLY_ROUTE."
It can't be used in any other "named" reply.
See: https://www.kamailio.org/wiki/cookbooks/5.1.x/core#reply_route reply_route{} is executed before any route armed with t_on_reply(), sou you can possibly rewrite your reply logic a little.
On 2018-08-14 04:45, Nicolas Breuer wrote:
I don't like the msg_apply_changes but can you explain the different behavior between rtpproxy & rtpengine?
The difference is due to the fact that rtpengine rewrites and replaces the entire SDP body, while rtpproxy only manipulates bits and pieces of it (like ports and IP addresses). Since Kamailio doesn't perform SDP changes immediately but rather collects them in a lump list and applies them only when requested (or when the message is sent out), trying to apply two rewrite operations on the same SDP portion doesn't work.
Cheers
And what about the "sdpops" (remove by codec ?)
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Richard Fuchs Envoyé : mardi 14 août 2018 14:14 À : sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On 2018-08-14 04:45, Nicolas Breuer wrote:
I don't like the msg_apply_changes but can you explain the different behavior between rtpproxy & rtpengine?
The difference is due to the fact that rtpengine rewrites and replaces the entire SDP body, while rtpproxy only manipulates bits and pieces of it (like ports and IP addresses). Since Kamailio doesn't perform SDP changes immediately but rather collects them in a lump list and applies them only when requested (or when the message is sent out), trying to apply two rewrite operations on the same SDP portion doesn't work.
Cheers
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
I'm using branches routes and msg_apply can't be set in branches
I tried, just for the fun.
if ( subst_body('/(^s=.*)/s=$sel(cfg_get.proxygw.detail)\r/') ) { $var(s)=""; }; msg_apply_changes(); rtpengine_manage("replace-origin replace-session-connection");
and this is not working , it's added and not replaced.
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Daniel Tryba Envoyé : mardi 14 août 2018 10:39 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On Tue, Aug 14, 2018 at 08:23:28AM +0000, Nicolas Breuer wrote:
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
From documentation:
"This function can be used from REQUEST_ROUTE or core REPLY_ROUTE."
It can't be used in any other "named" reply.
See: https://www.kamailio.org/wiki/cookbooks/5.1.x/core#reply_route reply_route{} is executed before any route armed with t_on_reply(), sou you can possibly rewrite your reply logic a little.
Solved by :
In Kamailio.conf
modparam("rtpengine", "read_sdp_pv", "$avp(sdp)")
-------------
sdp_get("$avp(sdp)"); avp_subst("$avp(sdp)","/(^s=.*)/s=$sel(cfg_get.proxygw.detail)\r/"); rtpengine_manage("replace-origin replace-session-connection");
-----Message d'origine----- De : Nicolas Breuer Envoyé : mardi 14 août 2018 15:44 À : 'sr-users@lists.kamailio.org' sr-users@lists.kamailio.org Objet : RE: [SR-Users] Migrate from RtpProxy to Rtpengine
I'm using branches routes and msg_apply can't be set in branches
I tried, just for the fun.
if ( subst_body('/(^s=.*)/s=$sel(cfg_get.proxygw.detail)\r/') ) { $var(s)=""; }; msg_apply_changes(); rtpengine_manage("replace-origin replace-session-connection");
and this is not working , it's added and not replaced.
-----Message d'origine----- De : sr-users sr-users-bounces@lists.kamailio.org De la part de Daniel Tryba Envoyé : mardi 14 août 2018 10:39 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] Migrate from RtpProxy to Rtpengine
On Tue, Aug 14, 2018 at 08:23:28AM +0000, Nicolas Breuer wrote:
substr msg_apply_changes() rtpengine_manage()
This will not work because msg_apply_changes is working only in request route. I do substr in reply routes also.
From documentation:
"This function can be used from REQUEST_ROUTE or core REPLY_ROUTE."
It can't be used in any other "named" reply.
See: https://www.kamailio.org/wiki/cookbooks/5.1.x/core#reply_route reply_route{} is executed before any route armed with t_on_reply(), sou you can possibly rewrite your reply logic a little.