No documentation. Change in the source file and recompile.
g-)
harry gaillac wrote:
> Hi Greger,
>
> Thanks for tour reply,
>
> Why these options?
> Where can we find the documentation in order to change
> rtp ports ??
>
> Regards
> Harry
>
>> If you have a firewall that denies all outgoing
>> ports except those
>> explicitly opened (most home routers/FW allow
>> outgoing):
>> SIP messages: udp (and TCP if you use that) port
>> 5060
>> RTP: udp 35000-65000 (can be changed in rtpproxy's
>> rttp_defines.h)
>> Both to your SER+RTPPROXY server.
>>
>
>
> --- "Greger V. Teigre" <greger(a)teigre.com> wrote:
>> See inline.
>>
>>> I need help to understand ser+rtpproxy.
>>>
>>> How may I configure rtpproxy options to run with
>>> ser/nathelper on the same box ?
>>>
>>> rttproxy options :
>>> usage: rtpproxy [-2fv] [-l addr1[/addr2]] [-6
>>> addr1[/addr2]] [-s path] [-t tos] [-r rdir [-S
>> sdir]]
>>
>> Just start rtpproxy without options and it will
>> listen on the standard
>> socket compiled into rtpproxy and nathelper.so.
>>>
>>> SER communicated with RTPPROXY via unix socket.
>>> Does RTPPROXY rewrite INVITE/REGISTER message with
>>> info from SER?
>>
>> Yes, when you call the appropriate functions. Read
>> the Getting Started
>> document (chapter 1 + the rtpproxy example chapter)
>> to get detailed info.
>>
>>> private-------FW+NAT------SER+RTPPROXY------
>> public
>>> network
>> network
>>>
>>> which ports must be opened on FW box for INVITE
>> and/or
>>> REGISTER methods are they the same than on
>> rtpproxy ?
>>
>> If you have a firewall that denies all outgoing
>> ports except those
>> explicitly opened (most home routers/FW allow
>> outgoing):
>> SIP messages: udp (and TCP if you use that) port
>> 5060
>> RTP: udp 35000-65000 (can be changed in rtpproxy's
>> rttp_defines.h)
>> Both to your SER+RTPPROXY server.
>>
>> g-)
>>
>> g-)
>>
>>
>
>
>
>
>
>
> __________________________________________________________________
> Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour
> vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
dear serusers,
I try to install ser 0.9 on redhat 9.After I have executed the"
make modules
make install
",I try to start ser using "/usr/local/sbin/ser",it always pops up the following errors:
0(0) DEBUG: init_mod: textops
textops - initializing
0(0) fixing /usr/local/lib/ser/modules/maxfwd.so mf_process_maxfwd_header
0(0) qm_free(0x80fbfe0, 0x8130ed8), called from maxfwd.c: fixup_maxfwd_header(122)
0(0) qm_free: freeing frag. 0x8130ec0 alloc'ed from cfg.lex: addstr(572)
0(0) fixing /usr/local/lib/ser/modules/sl.so sl_send_reply
0(0) qm_free(0x80fbfe0, 0x8131110), called from sl.c: fixup_sl_send_reply(142)
0(0) qm_free: freeing frag. 0x81310f8 alloc'ed from cfg.lex: addstr(572)
0(0) fixing /usr/local/lib/ser/modules/sl.so sl_send_reply
0(0) qm_free(0x80fbfe0, 0x8131454), called from sl.c: fixup_sl_send_reply(142)
0(0) qm_free: freeing frag. 0x813143c alloc'ed from cfg.lex: addstr(572)
ERROR: error -478 while trying to fix configuration
Does anyone give helps
Best Regards
3bs
3bs(a)21cn.com
2005-04-11
Hello,
I need help to understand ser+rtpproxy.
How may I configure rtpproxy options to run with
ser/nathelper on the same box ?
rttproxy options :
usage: rtpproxy [-2fv] [-l addr1[/addr2]] [-6
addr1[/addr2]] [-s path] [-t tos] [-r rdir [-S sdir]]
SER communicated with RTPPROXY via unix socket.
Does RTPPROXY rewrite INVITE/REGISTER message with
info from SER?
private-------FW+NAT------SER+RTPPROXY------ public
network network
which ports must be opened on FW box for INVITE and/or
REGISTER methods are they the same than on rtpproxy ?
Regards
Harry
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Alex,
How does a forking proxy help when dealing with virtual IP addresses?
Perhaps I don't quite understand what you mean by a "forking proxy" but it
appears you'd have one "main" proxy that basically hands off requests to
others? Right?
If so, what happens if the "main" proxy crashes? All customers experience a
service outage.
LVS is a very valid approach to achieving 99.999% uptime from a service
perspective.
Regards,
Paul
On Apr 10, 2005 10:49 AM, Alex Vishnev <avishnev(a)optonline.net> wrote:
>
> Hello All,
>
> I wanted to join this thread as it seems as a very interesting
> discussion. I have been monitoring for some time now. I am not quite sure if
> I this has been discussed before, but has anyone considered forking proxy
> instead of load balancer? One thing I am not very clear on, is what
> problem you are trying to resolve. Are you concerned that if sipuaregisters with sip-01/mysql-01 then LVS sending the next request to
> sip-02/mysql-02 without the second knowing what to do? Sorry, if this has
> been already discussed.
>
> Alex
>
Hello there,
see my comments inside.
KRs,
Tina
"Greger V. Teigre" <greger(a)teigre.com> wrote:
> Greger, thanks a lot.
> The problem with load balancer is that replies goes to the wrong
> server due to rewriting outgoing a.b.c.d . BTW, as Paul pointed, if
> you define some dummy interface with Virtual IP (VIP), there is no
> need to rewrite outgoing messages (I tested this a little).
Yes, if you use LVS with direct routing or tunneling, that is what you experience.
===Of course. That why I implemented small "session" stickness. However, it causes additional internal traffic.
What I described was a "generic" SIP-aware load balancer where SIP messages would be rewritten and stickiness implemented based on ex. UA IP address (or call-id like vovida's load balancer).
====Sure, it's better solution; I think we'll go this way soon (in our next version).
> Why DNS approach is bad (except restricted NAT - let's say I am
> solving this)?
Well, IMO, DNS SRV in itself is not bad. It's just that many user clients do not support DNS SRV yet. Except that, I like the concept and it will give you a geographical redundancy and load balancing.
===I am trying to build the following architecture:
DNS (returns domain's public IP)->LVS+tunneling (Virtual IP)->ser clusters (with private IPs)
|
|
DB (MySQL 4.1 cluster)
> I guess, Paul utilizes load-balancer scenario you have described.
> Believe there are only proprietary solutions for
> "the-replies-problem". We tried Vovida call-id-persistence package,
> unfortunately it didn't work for us.
Are you referring to the load balancer proxy? IMHO, the SIP-aware load balancer makes things a bit messy. It sounds to me that the LVS + tunneling/direct routing + virtual IP on dummy adapter is a better solution.
> In my configuration I use shared remote DB cluster (with
> replication). Each ser see it as one-public-IP (exactly the approach
> you named for SIP). May be it's good idea to use local DB clusters,
> but if you have more than 2 servers your replication algorythm gonna
> be complex. Additional problem - it still doesn't solve usrloc
> synchronization - you still have to use t_replicate()...
I'm not sure if I understand.
===Oh, probably I expressed myself not well enough...
So, you have 2 servers at two location, each location with a shared DB and then replication across an IPsec tunnel??
IMHO, mysql 3.23.x two-way replication is quite shaky and dangerous to rely on. With no locking, you will easily get overwrites and you have to be very sure that your application doesn't mess up the DB. I haven't looked at mysql 4.1 clustering, but from the little I have seen, it looks good. Is that what you use?
===We have 2 or more servers with MysQL 4.1 virtual server (clusters balanced by LVS). We use MySQL for maintaining subscribers' accounts, not for location. User location is still in-memory only so far. I am afraid I have to switch to ser 09 in order to use save_memory (thanks Paul!) and forward_tcp() for replication.
> With regard to t_replicate() - it doesn't work for more than 2
> servers, so I used exactly forward_tcp() and save_noreply() (you're
> absolutely right - this works fine so far); all sers are happy. Of
> course, this causes additional traffic. Interesting whether Paul's
> FIFO patch reduces traffic between sers?
I believe Paul uses forward_tcp() and save_memory() to save the location to the replicated server's memory, while the save("location") on the primary server will store to the DB (which then replicates on the DB level).
g-)
---------------------------------
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
hello
NATHelper Module is usefull in communicating through
sip.
now i am getting calles on both sides of NAT but
without voice. here is my "var/log/messages"
need help on RTP Proxy. how to install RTPProxy.
------------------------------------------------------
Apr 9 01:55:10 achieva ser[10869]: ERROR:
force_rtp_proxy2: support for RTP proxy is disabled
Apr 9 01:55:15 achieva ser[10870]: ERROR:
send_rtpp_command: can't connect to RTP proxy
Apr 9 01:55:15 achieva ser[10870]: WARNING:
rtpp_test: can't get version of the RTP proxy
Apr 9 01:55:15 achieva ser[10870]: WARNING:
rtpp_test: support for RTP proxyhas been disabled
temporarily
Apr 9 01:55:15 achieva ser[10870]: ERROR:
force_rtp_proxy2: support for RTP proxy is disabled
Apr 9 01:55:15 achieva ser[10870]: ERROR: on_reply
processing failed
------------------------------------------------------
ser.cfg
------------------------------------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading
----------------------------------
# Uncomment this if you want to use SQL database
#loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/usr/local/lib/ser/modules/auth.so"
#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# !! Nathelper
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters
---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which
true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping
interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping
only clients behind NAT
# ------------------------- request routing logic
-------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# !! Nathelper
# Special handling for NATed clients; first, NAT test
is
# executed: it looks for via!=received and RFC1918
addresses
# in Contact (may fail if line-folding is used);
also,
# the received test should, if completed, should
check all
# vias for rpesence of received
if (nat_uac_test("3")) {
# Allow RR-ed requests, as these may indicate that
# a NAT-enabled proxy takes care of it; unless it is
# a REGISTER
if (method == "REGISTER" || !
search("^Record-Route:")) {
log("LOG: Someone trying to register from
private IP, rewriting\n");
# This will work only for user agents that
support symmetric
# communication. We tested quite many of them
and majority is
# smart enough to be symmetric. In some phones
it takes a configuration
# option. With Cisco 7960, it is called
NAT_Enable=Yes, with kphone it is
# called "symmetric media" and "symmetric
signalling".
fix_nated_contact(); # Rewrite contact with
source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("1"); # Add direction=active
to SDP
};
force_rport(); # Add rport parameter to topmost
Via
setflag(6); # Mark as NATed
};
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy;
that's
# particularly good if upstream and downstream
entities
# use different transport protocol
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take
the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following
command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest
authentication
# if (!www_authorize("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our
USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# !! Nathelper
if
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"
&& !search("^Route:")){
sl_send_reply("479", "We don't forward to private
IP addresses");
break;
};
# if client or server know to be behind a NAT, enable
relay
if (isflagset(6)) {
force_rtp_proxy();
};
# NAT processing of replies; apply to all
transactions (for example,
# re-INVITEs from public to private UA are hard to
identify as
# NATed at the moment of request processing); look at
replies
t_on_reply("1");
# send it out now; use stateful forwarding as it
works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]")
{
fix_nated_contact();
force_rtp_proxy();
# otherwise, is it a transaction behind a NAT and
we did not
# know at time of request processing ? (RFC1918
contacts)
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
I have just downloaded and installed SER 0.9 and note that the URI module doesn't include the check_to and check_from functions any more. I look at the readme file of the uri module and it only includes the is_user and does_uri_exist functions. But I've seen them referred to in the documentation from onsip.org which uses 0.9. Does anyone know if these functions have been replaced with something else or whether I've done something wrong?
Regards
Cameron
I just installed ser 0.9.0 from onsip.org and compile using the script make_and_install. I also run the update_from_cvs script and the make_and_install again when I got the error below. The config that am using is the one on onsip.org
Am I missing something?
Thanks in advance
0(0) INFO: udp_init: SO_RCVBUF is initially 65535
0(0) INFO: udp_init: SO_RCVBUF is finally 131070
0(0) INFO: udp_init: SO_RCVBUF is initially 65535
0(0) INFO: udp_init: SO_RCVBUF is finally 131070
1(0) INFO: fifo process starting: 23656
1(0) ERROR: send_rtpp_command: can't connect to RTP proxy
1(0) WARNING: rtpp_test: can't get version of the RTP proxy
1(0) WARNING: rtpp_test: support for RTP proxy has been disabled temporarily
1(0) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
1(0) WARNING: no fifo_db_url given - fifo DB commands disabled
---------------------------------
Post your free ad now! Yahoo! Canada Personals
Hello all,
I have a problem about how to add the account into the mysql(I can use
SER control registy by mysql),I don't know how to write the sip.cfg to
account users into the mysql, my sip.cif following :
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=3
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
#modparam("rr", "enable_full_lr", 1)
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("acc", "log_level", 2)
modparam("acc", "log_flag", 2)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 3)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
#if (uri=="mydomain.com") {
if (method=="INVITE")
{
setflag(1);
}
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("127.0.0.1", "subscriber")) {
www_challenge("127.0.0.1", "0");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
#};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
Thank you!
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/