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
}
}
}
}
}
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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users