hi all,
I haven't found so far any suitable solution for my problem.
I want to have more outbound proxies and only one register.
Outbound proxies should be also RTP proxy for clients
/for all, or only behind NAT, it doesn't matter/
My idea is, that the REGISTER server see the IP of the outbound proxy, not the UA
it self. Insipired by siporxd and milkfish project I wrote a patch for nathelper to
rewrite
the contacnat addres to IP of the proxy.
If the proxy receives REGISTER, it save the contact and send new to to register with it
IP.
The signalinig is working good. But I have problem with RTP streams and the SDP part of
the
INVITE request.
If you try to call between two proxies, the RTP goes
PROXY1<->REGISTER<->PROXY2, instead of
only between PROXY1<->PROXY2. Also if you made a call between 2 phone on the same
proxy, the call
passes through REGISTER ;(
The example openser/nathelper configuration is working good, if the proxy is also register
;)
I have atteached my own.
Can anyone just a bit help me with configuration or give me a link
to the another sip proxy project, which can satisfy my needs ?
best regards
Peter Hudec
--
Things are easier than they appear; all you need is the right focus
Leonardo Balliache
#
# $Id: nathelper.cfg,v 1.1.2.1 2003/11/24 14:47:18 janakj Exp $
#
# simple quick-start config script including nathelper support
# This default script includes nathelper support. To make it work
# you will also have to install Maxim's RTP proxy. The proxy is enforced
# if one of the parties is behind a NAT.
#
# If you have an endpoing in the public internet which is known to
# support symmetric RTP (Cisco PSTN gateway or voicemail, for example),
# then you don't have to force RTP proxy. If you don't want to enforce
# RTP proxy for some destinations than simply use t_relay() instead of
# route(1)
#
# Sections marked with !! Nathelper contain modifications for nathelper
#
# NOTE !! This config is EXPERIMENTAL !
#
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/openser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/openser/lib/openser/modules/sl.so"
loadmodule "/usr/local/openser/lib/openser/modules/tm.so"
loadmodule "/usr/local/openser/lib/openser/modules/rr.so"
loadmodule "/usr/local/openser/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/openser/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/openser/lib/openser/modules/registrar.so"
loadmodule "/usr/local/openser/lib/openser/modules/textops.so"
loadmodule "/usr/local/openser/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/openser/lib/openser/modules/mysql.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_url",
"mysql://openser:openserrw@localhost/openser")
modparam("usrloc", "db_mode", 1)
modparam("rr", "enable_full_lr", 1)
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("registrar", "sip_natping_flag", 7)
modparam("nathelper", "natping_interval", 30) # Ping interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping only clients
behind NAT
modparam("nathelper", "rtpproxy_sock",
"udp:127.0.0.1:22222")
modparam("nathelper", "sipping_from",
"sip:pinger@voip.swan.sk")
modparam("nathelper", "sipping_method", "OPTIONS")
# ------------------------- request routing logic -------------------
# main routing logic
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return(0);
};
if (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
return(0);
};
if (method=="REGISTER") {
if (uri==myself) {
sl_send_reply("403", "This is PROXY, you can't register
here!");
return(0);
} else {
if (nat_uac_test("3")) {
setflag(6);
fix_nated_register();
}
setflag(7);
force_rport();
save_noreply("location");
fix_nated_contact("62.152.225.27");
route(1);
}
return(0);
}
if (nat_uac_test("3")) {
if (uri==myself) {
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
return(0);
}
} else {
if (!lookup("location")) {
fix_nated_contact("62.152.225.27");
if (method=="INVITE") {
setflag(5);
force_rtp_proxy();
}
} else {
fix_nated_contact("62.152.225.27");
if (method=="INVITE") {
setflag(5);
force_rtp_proxy();
}
}
force_rport();
t_on_reply("1");
}
} else {
if (uri==myself) {
if (lookup("location")) {
if (method=="INVITE") {
setflag(5);
force_rtp_proxy();
}
force_rport();
t_on_reply("1");
} else {
sl_send_reply("404", "Not Found");
return(0);
}
}
}
route(1);
return(0);
}
route[1] {
if (!t_relay()) {
sl_reply_error();
};
return(0);
}
onreply_route[1] {
if (nat_uac_test("3")) {
fix_nated_contact("62.152.225.27");
if (isflagset(5) && status =~ "(183)|2[0-9][0-9]") {
force_rtp_proxy();
}
} else {
if (isflagset(5) && status =~ "(183)|2[0-9][0-9]") {
force_rtp_proxy();
}
}
force_rport();
}
Show replies by date
Have you taken a look at the Path implementation in openser CVS head
(download snapshots from openser.org)? It is exactly what you need
(search the archive for announces from Andreas Granig). Then you do not
need to patch openser.
regards
klaus
Peter Hudec wrote:
hi all,
I haven't found so far any suitable solution for my problem.
I want to have more outbound proxies and only one register.
Outbound proxies should be also RTP proxy for clients
/for all, or only behind NAT, it doesn't matter/
My idea is, that the REGISTER server see the IP of the outbound proxy, not the UA
it self. Insipired by siporxd and milkfish project I wrote a patch for nathelper to
rewrite
the contacnat addres to IP of the proxy.
If the proxy receives REGISTER, it save the contact and send new to to register with it
IP.
The signalinig is working good. But I have problem with RTP streams and the SDP part of
the
INVITE request.
If you try to call between two proxies, the RTP goes
PROXY1<->REGISTER<->PROXY2, instead of
only between PROXY1<->PROXY2. Also if you made a call between 2 phone on the same
proxy, the call
passes through REGISTER ;(
The example openser/nathelper configuration is working good, if the proxy is also
register ;)
I have atteached my own.
Can anyone just a bit help me with configuration or give me a link
to the another sip proxy project, which can satisfy my needs ?
best regards
Peter Hudec
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
Thanks,
I'm going to take a look for this.
hudecof
Klaus Darilion wrote:
Have you taken a look at the Path implementation in
openser CVS head
(download snapshots from openser.org)? It is exactly what you need
(search the archive for announces from Andreas Granig). Then you do not
need to patch openser.
regards
klaus
Peter Hudec wrote:
hi all,
I haven't found so far any suitable solution for my problem.
I want to have more outbound proxies and only one register.
Outbound proxies should be also RTP proxy for clients
/for all, or only behind NAT, it doesn't matter/
My idea is, that the REGISTER server see the IP of the outbound proxy,
not the UA
it self. Insipired by siporxd and milkfish project I wrote a patch for
nathelper to rewrite
the contacnat addres to IP of the proxy.
If the proxy receives REGISTER, it save the contact and send new to to
register with it IP.
The signalinig is working good. But I have problem with RTP streams
and the SDP part of the
INVITE request.
If you try to call between two proxies, the RTP goes
PROXY1<->REGISTER<->PROXY2, instead of
only between PROXY1<->PROXY2. Also if you made a call between 2 phone
on the same proxy, the call
passes through REGISTER ;(
The example openser/nathelper configuration is working good, if the
proxy is also register ;)
I have atteached my own.
Can anyone just a bit help me with configuration or give me a link
to the another sip proxy project, which can satisfy my needs ?
best regards
Peter Hudec
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
--
If you tell the truth you don't
have to remember anything.