I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Greg,
it occurs to me that you are looking at a solution for a problem which may be perhaps better solved other way. What are you trying to achieve, is it multidomain support?
-jiri
At 04:35 PM 11/22/2003, Greg Fausak wrote:
I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Jiri,
I do want to have a multi-domain capability. I'd also like to be able to run multiple processes on the same database. These may be different problems.
---greg
Jiri Kuthan wrote:
Greg,
it occurs to me that you are looking at a solution for a problem which may be perhaps better solved other way. What are you trying to achieve, is it multidomain support?
-jiri
At 04:35 PM 11/22/2003, Greg Fausak wrote:
I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments:
# -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
...
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
# our domains ...
if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; };
That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.)
-jiri
Thanks Jiri that's really wonderful and simple.
When I introduce the line
modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
Restarting ser says 3 Config Errors.
Can you pls help.
Kannaiyan
----- Original Message ----- From: "Jiri Kuthan" jiri@iptel.org To: "Greg Fausak" lgfausak@august.net Cc: serusers@lists.iptel.org; "Greg Fausak" greg@addaline.com Sent: Sunday, November 23, 2003 11:25 PM Subject: Re: [Serusers] multiple SER instances / REGISTRATION problem
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments:
# -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
..
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
# our domains ...
if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; };
That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.)
-jiri
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Multiple Domains works fine. I still have got an functional error.
I just loaded the module domain.so and then setting the parameters as specified.
when i have this in the routing script
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
My SIP client says Registration Timeout. I tried out the possibilities I could not find what could be the problem. Without the above script registration works fine.
Did anyone faced similar problem?
Kannaiyan
----- Original Message ----- From: "Jiri Kuthan" jiri@iptel.org To: "Greg Fausak" lgfausak@august.net Cc: serusers@lists.iptel.org; "Greg Fausak" greg@addaline.com Sent: Sunday, November 23, 2003 11:25 PM Subject: Re: [Serusers] multiple SER instances / REGISTRATION problem
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments:
# -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
..
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
# our domains ...
if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; };
That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.)
-jiri
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Probably is_from_local doesn't match your domains properly. Check SIP message dumps to see what happens to the messages and what do they contain in From.
Jan.
On 24-11 02:40, Kannaiyan Natesan wrote:
Multiple Domains works fine. I still have got an functional error.
I just loaded the module domain.so and then setting the parameters as specified.
when i have this in the routing script
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
My SIP client says Registration Timeout. I tried out the possibilities I could not find what could be the problem. Without the above script registration works fine.
Did anyone faced similar problem?
Kannaiyan
----- Original Message ----- From: "Jiri Kuthan" jiri@iptel.org To: "Greg Fausak" lgfausak@august.net Cc: serusers@lists.iptel.org; "Greg Fausak" greg@addaline.com Sent: Sunday, November 23, 2003 11:25 PM Subject: Re: [Serusers] multiple SER instances / REGISTRATION problem
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments:
# -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
..
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
# our domains ...
if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; };
That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.)
-jiri
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Can you please help to add new users with just mysql query. Is it possible to generate ha1 and ha1b within mysql query?
Is there is anyway to quickly add existing customers to ser database through php script or mysql query.
Thanks.
Kans
Kannaiyan Natesan wrote:
Can you please help to add new users with just mysql query. Is it possible to generate ha1 and ha1b within mysql query?
Is there is anyway to quickly add existing customers to ser database through php script or mysql query.
Please read the very good manuals you'll find at http://iptel.org/ser to find the answers you need. I think the manuals are very easy to read and understand.
There is a utility installed called "genha1" or something like that, a UNIX binary you can use to generate HA1 and HA1B.
There's another piece of software called "serweb" that you use to add customers. You'll find that the source helps you on how to add new users.
The HOWTO and the manual covers it all. You'll find pointers to it on http://www.voip-info.org/tiki-index.php?page=SIP%20Express%20Router
/Olle
We have a php script that calls serctl to add a user. Works very well, currently about 50 times a day! When we get to 50 times a second we will need to evaluate this approach.
---greg
Olle E. Johansson wrote:
Kannaiyan Natesan wrote:
Can you please help to add new users with just mysql query. Is it possible to generate ha1 and ha1b within mysql query?
Is there is anyway to quickly add existing customers to ser database through php script or mysql query.
Please read the very good manuals you'll find at http://iptel.org/ser to find the answers you need. I think the manuals are very easy to read and understand.
There is a utility installed called "genha1" or something like that, a UNIX binary you can use to generate HA1 and HA1B.
There's another piece of software called "serweb" that you use to add customers. You'll find that the source helps you on how to add new users.
The HOWTO and the manual covers it all. You'll find pointers to it on http://www.voip-info.org/tiki-index.php?page=SIP%20Express%20Router
/Olle
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Jiri,
Thanks. I made these changes (and the loadmodule domain.so) and the server fires up fine. However, when I send a REGISTER now I get a message: # U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060 SIP/2.0 500 I'm terribly sorry, server error occured (2/TM). Via: SIP/2.0/UDP 66.228.53.216:5060. From: sip:123456@named.com. To: sip:123456@named.com;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311. Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68@named.com. CSeq: 17301 REGISTER. Server: Sip EXpress router (0.8.12 (i386/linux)). Content-Length: 0. Warning: 392 66.228.44.254:5060 "Noisy feedback tells: pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
Also, in the syslog file: Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
I remember reading a thread about this error. Something about shared memory?
I've got a linux 9.x system, here is the config:
---greg
--- # # $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
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"
alias="named.com" alias="66.228.44.254"
# ------------------ 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/acc.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/postgres.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/uri.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params -- modparam("domain", "db_mode", 1) modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "did") modparam("domain","db_url", "X")
modparam("usrloc|group", "use_domain", 1)
modparam("usrloc","db_mode",1) modparam("usrloc|group|auth_db","user_column","user_id") modparam("usrloc|uri|group|auth_db","db_url", "X")
modparam("uri","subscriber_user_column","user_id") #modparam("uri","db_url", # "X")
#modparam("group","user_column","user_id") #modparam("group","db_url", # "X")
modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "log_fmt", "miocfsu" ) #modparam("auth_db","user_column","user_id") #modparam("auth_db","db_url", # "X")
# -- rr params -- # add value to ;lr param to make some broken UAs happy #modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 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"); xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); setflag(1); setflag(2); route(1); break; };
# if (!uri==myself) { if(!is_from_local()) { # 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") {
if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; };
save("location"); break; };
lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; };
if (method=="INVITE" || method=="ACK") {
if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); # if (lookup("location")) { route(1); break; };
if(uri=~"sip:[0-9]{10}@.*") { xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; } xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); sl_send_reply("580", "Sorry"); break; };
if (method=="CANCEL") {
xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; };
sl_send_reply("404", "Not Found"); break; }; xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); break; }
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
route[2] { consume_credentials(); rewritehostport("65.77.154.243:5060"); if(!t_relay()) { sl_reply_error(); break; }; } [root@sipproxy ser]#
Jiri Kuthan wrote:
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments:
# -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1)
...
if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; };
# our domains ...
if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; };
That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.)
-jiri
Greg,
I'm digging though serusers archives and found your report. I suppose it must have been a private memory leak and I don't remember that we closed on that. Does the problem persist?
-jiri
At 05:22 AM 11/25/2003, Greg Fausak wrote:
Jiri,
Thanks. I made these changes (and the loadmodule domain.so) and the server fires up fine. However, when I send a REGISTER now I get a message: # U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060 SIP/2.0 500 I'm terribly sorry, server error occured (2/TM). Via: SIP/2.0/UDP 66.228.53.216:5060. From: sip:123456@named.com. To: sip:123456@named.com;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311. Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68@named.com. CSeq: 17301 REGISTER. Server: Sip EXpress router (0.8.12 (i386/linux)). Content-Length: 0. Warning: 392 66.228.44.254:5060 "Noisy feedback tells: pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
Also, in the syslog file: Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
I remember reading a thread about this error. Something about shared memory?
I've got a linux 9.x system, here is the config:
---greg
# # $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
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"
alias="named.com" alias="66.228.44.254"
# ------------------ 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/acc.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/postgres.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/uri.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params -- modparam("domain", "db_mode", 1) modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "did") modparam("domain","db_url", "X")
modparam("usrloc|group", "use_domain", 1)
modparam("usrloc","db_mode",1) modparam("usrloc|group|auth_db","user_column","user_id") modparam("usrloc|uri|group|auth_db","db_url", "X")
modparam("uri","subscriber_user_column","user_id") #modparam("uri","db_url", # "X")
#modparam("group","user_column","user_id") #modparam("group","db_url", # "X")
modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "log_fmt", "miocfsu" ) #modparam("auth_db","user_column","user_id") #modparam("auth_db","db_url", # "X")
# -- rr params -- # add value to ;lr param to make some broken UAs happy #modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 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"); xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); setflag(1); setflag(2); route(1); break; };
# if (!uri==myself) { if(!is_from_local()) { # 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") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; if (method=="INVITE" || method=="ACK") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); # if (lookup("location")) { route(1); break; }; if(uri=~"sip:[0-9]{10}@.*") { xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; } xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); sl_send_reply("580", "Sorry"); break; }; if (method=="CANCEL") { xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; }; sl_send_reply("404", "Not Found"); break; }; xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); break;
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
route[2] { consume_credentials(); rewritehostport("65.77.154.243:5060"); if(!t_relay()) { sl_reply_error(); break; }; } [root@sipproxy ser]#
Jiri Kuthan wrote:
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments: # -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1) ... if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; }; # our domains ... if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; }; That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.) -jiri
-- Jiri Kuthan http://iptel.org/~jiri/
Yes, I think the problem persists. I was able to get around it by not doing domain support in registration. I just start a separate SER process for each domain.
It has something to do with multiple domain registration.
---greg
Jiri Kuthan wrote:
Greg,
I'm digging though serusers archives and found your report. I suppose it must have been a private memory leak and I don't remember that we closed on that. Does the problem persist?
-jiri
At 05:22 AM 11/25/2003, Greg Fausak wrote:
Jiri,
Thanks. I made these changes (and the loadmodule domain.so) and the server fires up fine. However, when I send a REGISTER now I get a message: # U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060 SIP/2.0 500 I'm terribly sorry, server error occured (2/TM). Via: SIP/2.0/UDP 66.228.53.216:5060. From: sip:123456@named.com. To: sip:123456@named.com;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311. Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68@named.com. CSeq: 17301 REGISTER. Server: Sip EXpress router (0.8.12 (i386/linux)). Content-Length: 0. Warning: 392 66.228.44.254:5060 "Noisy feedback tells: pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
Also, in the syslog file: Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
I remember reading a thread about this error. Something about shared memory?
I've got a linux 9.x system, here is the config:
---greg
# # $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
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"
alias="named.com" alias="66.228.44.254"
# ------------------ 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/acc.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/postgres.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/uri.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params -- modparam("domain", "db_mode", 1) modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "did") modparam("domain","db_url", "X")
modparam("usrloc|group", "use_domain", 1)
modparam("usrloc","db_mode",1) modparam("usrloc|group|auth_db","user_column","user_id") modparam("usrloc|uri|group|auth_db","db_url", "X")
modparam("uri","subscriber_user_column","user_id") #modparam("uri","db_url", # "X")
#modparam("group","user_column","user_id") #modparam("group","db_url", # "X")
modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "log_fmt", "miocfsu" ) #modparam("auth_db","user_column","user_id") #modparam("auth_db","db_url", # "X")
# -- rr params -- # add value to ;lr param to make some broken UAs happy #modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 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"); xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); setflag(1); setflag(2); route(1); break; };
# if (!uri==myself) { if(!is_from_local()) { # 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") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; if (method=="INVITE" || method=="ACK") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); # if (lookup("location")) { route(1); break; }; if(uri=~"sip:[0-9]{10}@.*") { xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; } xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); sl_send_reply("580", "Sorry"); break; }; if (method=="CANCEL") { xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; }; sl_send_reply("404", "Not Found"); break; }; xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); break;
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
route[2] { consume_credentials(); rewritehostport("65.77.154.243:5060"); if(!t_relay()) { sl_reply_error(); break; }; } [root@sipproxy ser]#
Jiri Kuthan wrote:
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments: # -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1) ... if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; }; # our domains ... if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; }; That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.) -jiri
-- Jiri Kuthan http://iptel.org/~jiri/
.
Can you please help us to find where it is. I was trying to reproduce the problem at iptel in the past few days but haven't seen any memory leaks with use of domain support.
All we would need you to do is to recompile SER with D_DBG_QM_MALLOC replacing F_MALLOC and setting memlog < debug in configuration file. SER prints lot of very detailed memory usage information on exit, including list of unfreed fragments.
Thanks,
-jiri
ps -- what was exactly the piece of configuration which caused the memory leaks?
At 11:09 PM 1/17/2004, Greg Fausak wrote:
Yes, I think the problem persists. I was able to get around it by not doing domain support in registration. I just start a separate SER process for each domain.
It has something to do with multiple domain registration.
---greg
Jiri Kuthan wrote:
Greg, I'm digging though serusers archives and found your report. I suppose it must have been a private memory leak and I don't remember that we closed on that. Does the problem persist? -jiri At 05:22 AM 11/25/2003, Greg Fausak wrote:
Jiri,
Thanks. I made these changes (and the loadmodule domain.so) and the server fires up fine. However, when I send a REGISTER now I get a message: # U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060 SIP/2.0 500 I'm terribly sorry, server error occured (2/TM). Via: SIP/2.0/UDP 66.228.53.216:5060. From: sip:123456@named.com. To: sip:123456@named.com;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311. Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68@named.com. CSeq: 17301 REGISTER. Server: Sip EXpress router (0.8.12 (i386/linux)). Content-Length: 0. Warning: 392 66.228.44.254:5060 "Noisy feedback tells: pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
Also, in the syslog file: Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
I remember reading a thread about this error. Something about shared memory?
I've got a linux 9.x system, here is the config:
---greg
# # $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
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"
alias="named.com" alias="66.228.44.254"
# ------------------ 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/acc.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/postgres.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/uri.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params -- modparam("domain", "db_mode", 1) modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "did") modparam("domain","db_url", "X")
modparam("usrloc|group", "use_domain", 1)
modparam("usrloc","db_mode",1) modparam("usrloc|group|auth_db","user_column","user_id") modparam("usrloc|uri|group|auth_db","db_url", "X")
modparam("uri","subscriber_user_column","user_id") #modparam("uri","db_url", # "X")
#modparam("group","user_column","user_id") #modparam("group","db_url", # "X")
modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "log_fmt", "miocfsu" ) #modparam("auth_db","user_column","user_id") #modparam("auth_db","db_url", # "X")
# -- rr params -- # add value to ;lr param to make some broken UAs happy #modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 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"); xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); setflag(1); setflag(2); route(1); break; };
# if (!uri==myself) { if(!is_from_local()) { # 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") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; if (method=="INVITE" || method=="ACK") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); # if (lookup("location")) { route(1); break; }; if(uri=~"sip:[0-9]{10}@.*") { xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; } xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); sl_send_reply("580", "Sorry"); break; }; if (method=="CANCEL") { xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; }; sl_send_reply("404", "Not Found"); break; }; xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); break;
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
route[2] { consume_credentials(); rewritehostport("65.77.154.243:5060"); if(!t_relay()) { sl_reply_error(); break; }; } [root@sipproxy ser]#
Jiri Kuthan wrote:
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments: # -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1) ... if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; }; # our domains ... if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; }; That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.) -jiri
-- Jiri Kuthan http://iptel.org/~jiri/ .
-- Jiri Kuthan http://iptel.org/~jiri/
Jiri,
I can try to reproduce the error, but I don't remember exactly what my configuration was. All I remember was I tried to use multi-domain support and I started getting memory errors.
I'll see if I can get it to break again.
I can't try until Monday, we are doing a big upgrade this weekend.
---greg
Jiri Kuthan wrote:
Can you please help us to find where it is. I was trying to reproduce the problem at iptel in the past few days but haven't seen any memory leaks with use of domain support.
All we would need you to do is to recompile SER with D_DBG_QM_MALLOC replacing F_MALLOC and setting memlog < debug in configuration file. SER prints lot of very detailed memory usage information on exit, including list of unfreed fragments.
Thanks,
-jiri
ps -- what was exactly the piece of configuration which caused the memory leaks?
At 11:09 PM 1/17/2004, Greg Fausak wrote:
Yes, I think the problem persists. I was able to get around it by not doing domain support in registration. I just start a separate SER process for each domain.
It has something to do with multiple domain registration.
---greg
Jiri Kuthan wrote:
Greg, I'm digging though serusers archives and found your report. I suppose it must have been a private memory leak and I don't remember that we closed on that. Does the problem persist? -jiri At 05:22 AM 11/25/2003, Greg Fausak wrote:
Jiri,
Thanks. I made these changes (and the loadmodule domain.so) and the server fires up fine. However, when I send a REGISTER now I get a message: # U 2003/11/24 22:16:09.124528 66.228.44.254:5060 -> 66.228.53.216:5060 SIP/2.0 500 I'm terribly sorry, server error occured (2/TM). Via: SIP/2.0/UDP 66.228.53.216:5060. From: sip:123456@named.com. To: sip:123456@named.com;tag=a6a1c5f60faecf035a1ae5b6e96e979a-8311. Call-ID: D54D4F19DB874E9DA7D3354FFF6A0F68@named.com. CSeq: 17301 REGISTER. Server: Sip EXpress router (0.8.12 (i386/linux)). Content-Length: 0. Warning: 392 66.228.44.254:5060 "Noisy feedback tells: pid=5601 req_src_ip=66.228.44.254 req_src_port=5060 in_uri=sip:named.com out_uri=sip:named.com via_cnt==166".
Also, in the syslog file: Nov 24 22:16:27 sipproxy ser[5599]: ERROR: build_req_buf_from_sip_req: out of memory Nov 24 22:16:27 sipproxy ser[5599]: ERROR: print_uac_request: no pkg_mem Nov 24 22:16:27 sipproxy ser[5599]: ERROR: t_forward_nonack: failure to add branches
I remember reading a thread about this error. Something about shared memory?
I've got a linux 9.x system, here is the config:
---greg
# # $Id: ser.cfg,v 1.23 2003/10/13 22:51:55 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
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"
alias="named.com" alias="66.228.44.254"
# ------------------ 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/acc.so" loadmodule "/usr/local/lib/ser/modules/domain.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/postgres.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/uri.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params -- modparam("domain", "db_mode", 1) modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "did") modparam("domain","db_url", "X")
modparam("usrloc|group", "use_domain", 1)
modparam("usrloc","db_mode",1) modparam("usrloc|group|auth_db","user_column","user_id") modparam("usrloc|uri|group|auth_db","db_url", "X")
modparam("uri","subscriber_user_column","user_id") #modparam("uri","db_url", # "X")
#modparam("group","user_column","user_id") #modparam("group","db_url", # "X")
modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "log_fmt", "miocfsu" ) #modparam("auth_db","user_column","user_id") #modparam("auth_db","db_url", # "X")
# -- rr params -- # add value to ;lr param to make some broken UAs happy #modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 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"); xlog("L_WARN", "LOOSE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); setflag(1); setflag(2); route(1); break; };
# if (!uri==myself) { if(!is_from_local()) { # 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") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; if (method=="INVITE" || method=="ACK") { if (!www_authorize("named.com", "subscriber")) { www_challenge("", "0"); break; }; xlog("L_WARN", "INVITE: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); # if (lookup("location")) { route(1); break; }; if(uri=~"sip:[0-9]{10}@.*") { xlog("L_WARN", "10DIGIT: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; } xlog("L_WARN", "UNKNOWN: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); sl_send_reply("580", "Sorry"); break; }; if (method=="CANCEL") { xlog("L_WARN", "CANCEL: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); route(2); break; }; sl_send_reply("404", "Not Found"); break; }; xlog("L_WARN", "FAILATBOTTOM: %Ts call-id:%ci cseq:%ci contact:%ct from:%fu fromtag:%ft to:%tu totag:%tt method:%rm ruri:%ru messageid:%mi\n"); break;
}
route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
route[2] { consume_credentials(); rewritehostport("65.77.154.243:5060"); if(!t_relay()) { sl_reply_error(); break; }; } [root@sipproxy ser]#
Jiri Kuthan wrote:
At 12:16 AM 11/24/2003, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability.
fragments: # -- multi-domain modparam("domain", "db_mode", 1) modparam("usrloc|group", "use_domain", 1) ... if (!is_from_local()) { # check against domain-module table .... /* outbound */ break; }; # our domains ... if (!www_authorize("", "subscriber")) { # challenge if none or invalid credentials www_challenge("", "0"); break; }; That's pretty much it, I guess. The list of served domains can be manipulated using serctl.
I'd also like to be able to run multiple processes on the same database. These may be different problems.
Why? (I mean it sounds like a ticket for problems to me.) -jiri
-- Jiri Kuthan http://iptel.org/~jiri/ .
-- Jiri Kuthan http://iptel.org/~jiri/
.
I think you can use the 'domain' field in subscriber table and use multi-domains.
Kannaiyan
----- Original Message ----- From: "Greg Fausak" lgfausak@august.net To: "Jiri Kuthan" jiri@iptel.org Cc: serusers@lists.iptel.org; "Greg Fausak" greg@addaline.com Sent: Sunday, November 23, 2003 11:16 PM Subject: Re: [Serusers] multiple SER instances / REGISTRATION problem
Jiri,
I do want to have a multi-domain capability. I'd also like to be able to run multiple processes on the same database. These may be different problems.
---greg
Jiri Kuthan wrote:
Greg,
it occurs to me that you are looking at a solution for a problem which may be perhaps better solved other way. What are you trying to achieve, is it multidomain support?
-jiri
At 04:35 PM 11/22/2003, Greg Fausak wrote:
I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On 23-11 17:16, Greg Fausak wrote:
Jiri,
I do want to have a multi-domain capability. I'd also like to be able to run multiple processes on the same database. These may be different problems.
Running multiple ser instances over the same table is currently not possible because of the caching. It will possible with 0.9.0 which is planned for the beginning of the next year (no exact timeline yet). I will add the possibility to switch the cache off.
Jan.
Hi Greg,
We have multiple SER servers all accesing the same database. We had to introduce a new "location" table for each instance of SER. So for example we have a main SER server which acceses the standard "location" table and we have another SER as RTPProxy which uses a table called "location_proxy". We just created that custom table using the structure of the regular "location" table.
Has been working great for us for several months.
----- Original Message ----- From: "Greg Fausak" greg@addaline.com To: serusers@lists.iptel.org Sent: Saturday, November 22, 2003 10:35 AM Subject: [Serusers] multiple SER instances / REGISTRATION problem
I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Greg,
The string passed to www_authorize or proxy_authorize cannot be used to distinguish the domains because it is not related to user location, it even doesn't have to be a valid domain.
The string is put into realm parameter of the digest challenge and it can be any value, for example "foobar".
In a multidomain setup this parameter is usually empty and the server picks it from SIP messages (From or To domain is taken, depending on the type of the message).
You can serve multiple domains even with one instance of SER, that's the reason why we have the domain column in location table. SER will always load all row from the table upon startup.
If you would like to have multiple server instances accessing the same database then you would have to create a separate table for each instance. Note that using different tables is much faster and efficient than using one table for everything.
The reason why we have this "mixed system" is that storing everything in a single table allows greater flexibility because you don't have to change your script (which requires restart of the server) and the script can be idenpendend of domains served.
On the other hand using multiple tables (which is more efficient because different tables have different locks) requires a restart of the server but it shouldn't harm in your case because you have multiple instances anyway.
Jan.
On 22-11 09:35, Greg Fausak wrote:
I'd like to run multiple SER instances on the same database. I knew from previous experiments that would not be possible because of the cache.
However, I just tried running multiple SER instances, on the same database, but in different domains. This did not work, they both wrote over each others location entries in the database even though the domains on each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only mess with authorizations that it challenged. Perhaps the problem is with the initial load of 'previous' registrations. When SER starts, it loads the current location table. During the load, ALL domains are loaded. Perhaps only the domains listed by the 'alias="domain"' should be loaded and tracked, and all of the rest should be ignored for each instance of SER?
---greg
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers