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.