[SR-Users] Issue handling SRTP and RTP with rtpproxy and rtpengine
Alberto Sagredo
alberto.sagredo at avanzada7.com
Wed Jul 15 08:44:13 CEST 2015
Hi Daniel
Kamailio is for hard people and fun :)
Thanks Visily i finnaly got it working with your tip. You were right about
internal external options instead direction=...
Here its some code to someone could need it
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) {
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "We got SRTP ");
rtpengine_manage("trust-address internal
external replace-origin replace-session-connection ICE=remove ");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "We got RTP ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwei");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
rtpengine_manage("trust-address internal
external replace-origin replace-session-connection ICE=remove ");
#!endif
}
}
}
}
else if(!ds_is_from_list()){
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "We got SRTP ");
rtpengine_manage("external internal
replace-origin replace-session-connection ICE=remove RTP AVP");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "We got RTP ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwie");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
rtpengine_manage("external internal
replace-origin replace-session-connection ICE=remove RTP AVP");
#!endif
}
}
}
}
}
2015-07-14 18:46 GMT+02:00 Daniel Tryba <d.tryba at pocos.nl>:
> On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote:
> > In my tests rtpproxy recording waste less resources than asterisk
> >
> > That was one of the reasons
>
> How much time have you spend so far on a problem that asterisk can handle
> out
> of the box? ;)
>
> I'd love to do this with kamailio/rtpengine (I don't record), but sofar the
> blunt quickfix is to use asterisk. I needed a transcoder anyway and
> handling
> RTP/SRTP conversions when either endpoint needs it is simple.
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150715/cd643862/attachment.html>
More information about the sr-users
mailing list