diff --git a/pcscf/route/rtp.cfg b/pcscf/route/rtp.cfg index c4e8a59..1f2755d 100644 --- a/pcscf/route/rtp.cfg +++ b/pcscf/route/rtp.cfg @@ -1,50 +1,50 @@ # RTPProxy control route[ENC_SRTP] { add_rr_param(";rm=1"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=force SRTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=force SRTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; } route[DEC_SRTP] { add_rr_param(";rm=2"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=force SRTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=force SRTP AVP"; } route[ENC_WS_RTP] { add_rr_param(";rm=3"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=force RTP AVPF"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=force RTP AVPF"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; } route[DEC_WS_RTP] { add_rr_param(";rm=4"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=force RTP AVPF"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=force RTP AVPF"; } route[ENC_WSS_RTP] { add_rr_param(";rm=5"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=force SRTP AVPF DTLS=passive"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=force SRTP AVPF DTLS=passive"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; } route[DEC_WSS_RTP] { add_rr_param(";rm=6"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=force SRTP AVPF DTLS=passive"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=force SRTP AVPF DTLS=passive"; } route[ENC_RTP] { add_rr_param(";rm=7"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=force RTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=force RTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; } route[DEC_RTP] { add_rr_param(";rm=8"); - $avp(rtpproxy_offer_flags) = "replace-origin replace-session-connection ICE=remove RTP AVP"; - $avp(rtpproxy_answer_flags) = "replace-origin replace-session-connection ICE=force RTP AVP"; + $avp(rtpproxy_offer_flags) = "loop protect replace-origin replace-session-connection ICE=remove RTP AVP"; + $avp(rtpproxy_answer_flags) = "loop protect replace-origin replace-session-connection ICE=force RTP AVP"; } # RTPProxy control @@ -133,7 +133,11 @@ route[NATMANAGE] { if ((is_reply() && ($T_req($tt) != $null)) || (is_request() && has_totag())) { # In-Dialog requests # Requests originating from MO or MT - rtpengine_manage(); + if (is_request() && isflagset(FLT_MOBILE_ORIG)) { + rtpengine_manage(); + } else if (is_reply() && !isflagset(FLT_MOBILE_ORIG)) { + rtpengine_manage(); + } } else { # Initial Requests if ($avp(rtpproxy_offer_flags) == $null)