Differences
This shows you the differences between two versions of the page.
old-content:how_to_set_up_nathelper_rtpproxy_when_both_sip_ua_s_are_behind_same_nat [2005/12/08 01:00] |
old-content:how_to_set_up_nathelper_rtpproxy_when_both_sip_ua_s_are_behind_same_nat [2005/12/08 01:00] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | The suggestion below is from Klaus Darilion | ||
+ | This should work as long as there is only one client registered. | ||
+ | If there are multiple branches, step 2 must be done in the branch route. | ||
+ | |||
+ | #incoming call | ||
+ | # step 1 | ||
+ | write src_ip $si to AVP | ||
+ | lookup(" | ||
+ | # step 2 | ||
+ | write destination IP $dd into AVP | ||
+ | compare AVPs | ||
+ | if AVP1!=AVP2 && natflag {use rtpproxy} | ||
+ | |||
+ | The following code snippet was presented by Tavis P. | ||
+ | |||
+ | else if ( isflagset(2) and isflagset(3) ) | ||
+ | { | ||
+ | log(1, "Both Clients are behind NAT"); | ||
+ | # Store the destination domain into an AVP | ||
+ | avp_printf(" | ||
+ | if ( avp_check(" | ||
+ | { | ||
+ | xlog(" | ||
+ | # Do not use mediaproxy as the clients seem to be behind the same NAT | ||
+ | resetflag(2); | ||
+ | resetflag(3); | ||
+ | } | ||
+ | } |