Hi

Im using an Asterisk cluster behind Kamailio and some services are running on Asterisk. Traffic always must go to Asterisk so RTPPROXY and RTPNGINE do the work and send traffic to Asterisk and traffic from Asterisk go to RTP Proxy

I have been able to get rtpproxy working and later tried RTPengie to be able to manage SRTP

I have been able to make SRTP To RTP to Asterisk

Im able to call between RTP using rtpproxy as recording is a must and rtpengine does not record yet.

But im not able to call between SRTP extensions, i understand also SRTP to RTP would work as im doing with Asterisk (Only the speak SRTP as rtpengine trasncode)

I have this code on NATMANAGE but i do not know what could be wrong to handle SRTP

Any idea? Thanks in advance

if(src_ip==ASTERISK1_LAN || src_ip==ASTERISK2_LAN ){


                if (sdp_get_line_startswith("$avp(mline)", "m="))

                        {

                        if ($avp(mline) =~ "AVP")

                                {

                                add_rr_param(";rtp=AVP-kamtoast");

                                set_rtp_proxy_set("1");

                                rtpproxy_manage("rwei");

                                }

                        if ($avp(mline) =~ "SAVP")

                                {

                                add_rr_param(";rtp=SAVP-kamtoast");

                                rtpengine_manage("trust-address direction=external replace-origin replace-session-connection ICE=remove RTP AVP");

                                }


                        }


}

else{


                if (sdp_get_line_startswith("$avp(mline)", "m="))

                        {

                        if ($avp(mline) =~ "AVP")

                                {

                                add_rr_param(";rtp=AVP-asttokam");

                                set_rtp_proxy_set("1");

                                rtpproxy_manage("rwie");

                                }

                        if ($avp(mline) =~ "SAVP")

                                {

                                add_rr_param(";rtp=SAVP-asttokam");

                                rtpengine_manage("trust-address direction=external replace-origin replace-session-connection ICE=remove ");

                                }


                        }


}


If you need any more info let me know.