Hi Andrew
There is a condition in the NATMANAGE route which tests whether or not to apply rtpproxy_manage() :
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
		return;
One way to force this is to make sure that FLT_NATS is always set.  That can be done in the NATDETECT route by moving setflag(FLT_NATS) outside of the if(nat_uac_test) condition and putting it just before the return statement, so the flag is always set.

Another way would be to remove or comment out the if "!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;" line from NATMANAGE so that the the rtp_manage() is always called.

It might be worth your while upgrading to the 4.2 branch which has renamed the rtpproxy-ng module to rtpengine and made the options in the call to rtpengine_manage() more readable.

Depending on why you always want to run the rtp proxy ... you might also want to set :
    rtpengine_manage(replace-session-sonnection replace-origin ICE=force-relay) 
to ensure that media always goes through your media proxy and no other connections are negotiated between the endpoints.


On 13/10/14 08:36, andrew wrote:
hi,

kamailio 4.1.5 is used with rtpengine, whose older counterpart is rtpproxy-ng. I made some changes based on the default configuration files(i.e. kamailio.cfg), so that rtpproxy-ng module is enabled. Kamailio.cfg has been uploaded. In kamailio.cfg, there is one route block related to rtpproxy, i.e. route[NATMANAGE], where rtpproxy_manage("co") is called. Sometimes, rtpproxy-ng can insert new ip:port candidates in SDP. But in some case, rtpproxy-ng doesn't rewrite SDP, so rtpengine doesn't relay rtp packets at all.

How to setup kamailio.cfg, so that rtpproxy-ng moudle can always rewritten new ip:port candidates, and rtpengine always relays rtp packets?

Looking foreward to your reply. Thanks!

B.R.

Andrew




_______________________________________________
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