<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I am trying to set up rtpproxy with kamailio and are having these 2 issues:<br><br>1- the BYEs are not relayed to the other party, I have to hang up the call at both ends<br>2- kamailio receives the INVITE from the calling party [behind a nat] and relays it to the called party but the connection information in the SDP has to IPs [the source IP and the RTPproxy IP together<br><br>c=IN IP4 204.9.239.6765.111.185.187<br><br><br>user 100 is behind a NAT and user 101 is not but I want to force the RTPs to go thru the rtpproxy server [ in the same IP as kamailio]<br>the good and weird thing is that there is audio both ways.<br><br>this is my config file:<br><br><br><br>if (loose_route()) {<br> # mark routing logic in request<br> xlog("L_INFO","mylog: Loose Route section. Method: [$rm].\n");<br> append_hf("P-hint: rr-enforced\r\n");<br> route(1);<br> };<br><br><br> if (uri==myself) {<br> if (method=="REGISTER") {<br> xlog("L_INFO","mylog: starting to process REGISTER.Info: [$au].\n");<br> if (!www_authorize("", "subscriber")) {<br> xlog("L_INFO","mylog: REGISTER came without auth, sending challenge.\n");<br> www_challenge("", "0");<br> exit;<br> };<br> if (nat_uac_test("1")){<br> xlog("L_INFO","mylog: REGISTER-Device behind NAT.\n");<br> fix_nated_register();<br> }<br> force_rport();<br> save("location");<br> xlog("L_INFO","mylog: save-location successful.\n");<br> exit;<br> } else if (method=="INVITE") {<br> xlog("L_INFO","mylog: Processing INVITE.\n");<br> if (!proxy_authorize("","subscriber")) {<br> xlog("L_INFO","mylog: INVITE came without auth, sending challenge.\n");<br> proxy_challenge("","0");<br> exit;<br> };<br> consume_credentials();<br> if (nat_uac_test("1")){<br> xlog("L_INFO","mylog: INVITE-Device behind NAT.\n");<br> #fix_nated_contact();<br> fix_nated_sdp("10");<br> }<br> force_rtp_proxy();<br> if (!lookup("location")) {<br> sl_send_reply("404", "Not Found");<br> xlog("L_INFO","mylog: lookup-location failed, sending 404 Not Found. Method: [$rm].\n");<br> exit;<br> };<br> append_hf("P-hint: usrloc applied\r\n");<br> };<br> };<br> route(1);<br>}<br><br>route[1] {<br> # send it out now; use stateful forwarding as it works reliably<br> # even for UDP2TCP<br> t_on_reply("1");<br> if (t_relay()) {<br> xlog("L_INFO","mylog: Route 1 section. Method [$rm].");<br> } else {<br> sl_reply_error();<br> xlog("L_INFO","mylog: Route 1 section. T_Relay failed. Method [$rm].");<br> };<br> exit;<br>}<br>onreply_route[1] {<br> force_rtp_proxy("","65.111.185.187");<br>}<br><br><br><br><div>
<div>thank you in advance<br><br>Fabian<br> <br></div></div><br><br><br /><hr />Stay up to date on your PC, the Web, and your mobile phone with Windows Live <a href='http://clk.atdmt.com/MRT/go/119462413/direct/01/' target='_new'>Click here</a></body>
</html>