I am trying to set up rtpproxy with kamailio and are having these 2 issues:
1- the BYEs are not relayed to the other party, I have to hang up the call at both ends 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
c=IN IP4 204.9.239.6765.111.185.187
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] the good and weird thing is that there is audio both ways.
this is my config file:
if (loose_route()) { # mark routing logic in request xlog("L_INFO","mylog: Loose Route section. Method: [$rm].\n"); append_hf("P-hint: rr-enforced\r\n"); route(1); };
if (uri==myself) { if (method=="REGISTER") { xlog("L_INFO","mylog: starting to process REGISTER.Info: [$au].\n"); if (!www_authorize("", "subscriber")) { xlog("L_INFO","mylog: REGISTER came without auth, sending challenge.\n"); www_challenge("", "0"); exit; }; if (nat_uac_test("1")){ xlog("L_INFO","mylog: REGISTER-Device behind NAT.\n"); fix_nated_register(); } force_rport(); save("location"); xlog("L_INFO","mylog: save-location successful.\n"); exit; } else if (method=="INVITE") { xlog("L_INFO","mylog: Processing INVITE.\n"); if (!proxy_authorize("","subscriber")) { xlog("L_INFO","mylog: INVITE came without auth, sending challenge.\n"); proxy_challenge("","0"); exit; }; consume_credentials(); if (nat_uac_test("1")){ xlog("L_INFO","mylog: INVITE-Device behind NAT.\n"); #fix_nated_contact(); fix_nated_sdp("10"); } force_rtp_proxy(); if (!lookup("location")) { sl_send_reply("404", "Not Found"); xlog("L_INFO","mylog: lookup-location failed, sending 404 Not Found. Method: [$rm].\n"); exit; }; append_hf("P-hint: usrloc applied\r\n"); }; }; route(1); }
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP t_on_reply("1"); if (t_relay()) { xlog("L_INFO","mylog: Route 1 section. Method [$rm]."); } else { sl_reply_error(); xlog("L_INFO","mylog: Route 1 section. T_Relay failed. Method [$rm]."); }; exit; } onreply_route[1] { force_rtp_proxy("","65.111.185.187"); }
thank you in advance
Fabian
_________________________________________________________________ Stay up to date on your PC, the Web, and your mobile phone with Windows Live http://clk.atdmt.com/MRT/go/119462413/direct/01/
Fabian Borot wrote:
I am trying to set up rtpproxy with kamailio and are having these 2 issues:
1- the BYEs are not relayed to the other party, I have to hang up the call at both ends 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
c=IN IP4 204.9.239.6765.111.185.187
I ran into this issue before and solved it by explicitly specifying what IP the SDP should be rewritten with in the config. But I think it is a bug.
yes, that did the trick
force_rtp_proxy("","rtpproxy_ip");
I guess that the other issue [BYE and ACKs not being relayed] have nothing to do with rtpproxy, it should be a config issue in my kamailio.cfg file.
thank you
Fabian
Date: Wed, 12 Nov 2008 10:52:30 -0500 From: abalashov@evaristesys.com To: fborot@hotmail.com CC: users@lists.kamailio.org Subject: Re: [Kamailio-Users] issues with rtpproxy and kamailio
Fabian Borot wrote:
I am trying to set up rtpproxy with kamailio and are having these 2 issues:
1- the BYEs are not relayed to the other party, I have to hang up the call at both ends 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
c=IN IP4 204.9.239.6765.111.185.187
I ran into this issue before and solved it by explicitly specifying what IP the SDP should be rewritten with in the config. But I think it is a bug.
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
_________________________________________________________________ Stay up to date on your PC, the Web, and your mobile phone with Windows Live http://clk.atdmt.com/MRT/go/119462413/direct/01/
Correct. rtpproxy has nothing to do with SIP.
On Wed, November 12, 2008 2:37 pm, Fabian Borot wrote:
yes, that did the trick
force_rtp_proxy("","rtpproxy_ip");
I guess that the other issue [BYE and ACKs not being relayed] have nothing to do with rtpproxy, it should be a config issue in my kamailio.cfg file.
thank you
Fabian
Date: Wed, 12 Nov 2008 10:52:30 -0500 From: abalashov@evaristesys.com To: fborot@hotmail.com CC: users@lists.kamailio.org Subject: Re: [Kamailio-Users] issues with rtpproxy and kamailio
Fabian Borot wrote:
I am trying to set up rtpproxy with kamailio and are having these 2
issues:
1- the BYEs are not relayed to the other party, I have to hang up the call at both ends 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
c=IN IP4 204.9.239.6765.111.185.187
I ran into this issue before and solved it by explicitly specifying what IP the SDP should be rewritten with in the config. But I think it is a bug.
-- Alex Balashov Evariste Systems Web : http://www.evaristesys.com/ Tel : (+1) (678) 954-0670 Direct : (+1) (678) 954-0671 Mobile : (+1) (706) 338-8599
Stay up to date on your PC, the Web, and your mobile phone with Windows Live http://clk.atdmt.com/MRT/go/119462413/direct/01/
of course it can not work - you have to fix the contact of the INVITE with fix nated contact - you also have to fix it ofor the 200 ok in a reply route.
further, fix_nated sdp is usually not needed. force_rtp_proxy() is usually sufficient. Make sure to call it only once. If this still does corrupt the SDP then its is a bug.
Please create a config file with the wizard from sipwise.com and study how NAT traversal is done - this is the correct way.
regards klaus
Fabian Borot schrieb:
I am trying to set up rtpproxy with kamailio and are having these 2 issues:
1- the BYEs are not relayed to the other party, I have to hang up the call at both ends 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
c=IN IP4 204.9.239.6765.111.185.187
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] the good and weird thing is that there is audio both ways.
this is my config file:
if (loose_route()) { # mark routing logic in request xlog("L_INFO","mylog: Loose Route section. Method: [$rm].\n"); append_hf("P-hint: rr-enforced\r\n"); route(1); };
if (uri==myself) { if (method=="REGISTER") { xlog("L_INFO","mylog: starting to process
REGISTER.Info: [$au].\n"); if (!www_authorize("", "subscriber")) { xlog("L_INFO","mylog: REGISTER came without auth, sending challenge.\n"); www_challenge("", "0"); exit; }; if (nat_uac_test("1")){ xlog("L_INFO","mylog: REGISTER-Device behind NAT.\n"); fix_nated_register(); } force_rport(); save("location"); xlog("L_INFO","mylog: save-location successful.\n"); exit; } else if (method=="INVITE") { xlog("L_INFO","mylog: Processing INVITE.\n"); if (!proxy_authorize("","subscriber")) { xlog("L_INFO","mylog: INVITE came without auth, sending challenge.\n"); proxy_challenge("","0"); exit; }; consume_credentials(); if (nat_uac_test("1")){ xlog("L_INFO","mylog: INVITE-Device behind NAT.\n"); #fix_nated_contact(); fix_nated_sdp("10"); } force_rtp_proxy(); if (!lookup("location")) { sl_send_reply("404", "Not Found"); xlog("L_INFO","mylog: lookup-location failed, sending 404 Not Found. Method: [$rm].\n"); exit; }; append_hf("P-hint: usrloc applied\r\n"); }; }; route(1); }
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP t_on_reply("1"); if (t_relay()) { xlog("L_INFO","mylog: Route 1 section. Method [$rm]."); } else { sl_reply_error(); xlog("L_INFO","mylog: Route 1 section. T_Relay failed. Method [$rm]."); }; exit; } onreply_route[1] { force_rtp_proxy("","65.111.185.187"); }
thank you in advance
Fabian
Stay up to date on your PC, the Web, and your mobile phone with Windows Live Click here http://clk.atdmt.com/MRT/go/119462413/direct/01/
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users