OK. I see what you are coming from. You want to add user account to the database using
serweb and have the domain set correctly, right?
Serweb is able to do that. The trick is on you web server. When you add user account via
serweb, it use the domain where you connect as the domain for registration. So, if you
connect to
. Now,
if you connect to
and
you will get what you want.
For serctl, you need to set the SIP_DOMAIN environment variable correctly to get the same
result. So, to add user abc @
Serctl add abc <password> <email_account @ domain>
Then, you have two user accounts called abc, one for
. Note that the email address can be anything and is not used for
setting the domain field of the subscriber table.
Mind you, you still need to modparam the use_domain parameter for SER to correctly
authenticate, save and lookup location.
Zeus
-----Original Message-----
From: gaillac harry [mailto:gaillacharry@yahoo.fr]
Sent: Wednesday, 21 April 2004 2:26 AM
To: Zeus Ng
Cc: serusers(a)lists.iptel.org
Subject: RE: [Serusers] multiple domains
serctl use SIP_DOMAIN as variable, it's always the same
domain name insert into domain field of subscriber table.
serweb use this domain field for authentication. it's not
what I expect.
harry
Le mar 20/04/2004 à 14:30, Zeus Ng a écrit :
Both stable and unstable release have the serctl
command. There is
nothing to do with rpm. You can insert the domain records
into mysql
directly if that's what you want. However, to
get SER authenticate
domain, you need:
modparam("usrloc", "use_domain", 1)
modparam("registrar", "use_domain", 1)
Zeus
> -----Original Message-----
> From: gaillac harry [mailto:gaillacharry@yahoo.fr]
> Sent: Tuesday, 20 April 2004 9:43 PM
> To: Zeus Ng
> Subject: RE: [Serusers] multiple domains
>
>
> Hi,
>
> I don't use "serctl domain add" because of I can't build rpm
> with instable SER release from CVS so I use SER-0.8.12
> stable. I can't configure the last serweb release from CVS (
> I waste much time). here is my ser.cfg
>
> # ----------- 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
> debug=7
> fork=yes
> log_stderror=yes
> */
>
> check_via=no # (cmd. line: -v)
> dns=no # (cmd. line: -r)
> rev_dns=no # (cmd. line: -R)
> port=5060
> #listen=192.168.0.1
> children=4
> fifo="/tmp/ser_fifo"
> fifo_mode=0666
> #alias="example.com"
> # ------------------ module loading
> ----------------------------------
>
> # Uncomment this if you want to use SQL database
> loadmodule "/usr/lib/ser/modules/mysql.so"
>
> loadmodule "/usr/lib/ser/modules/sl.so"
> loadmodule "/usr/lib/ser/modules/tm.so"
> loadmodule "/usr/lib/ser/modules/rr.so"
> loadmodule "/usr/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/lib/ser/modules/domain.so"
> loadmodule "/usr/lib/ser/modules/usrloc.so"
> loadmodule "/usr/lib/ser/modules/registrar.so"
> loadmodule "/usr/lib/ser/modules/msilo.so"
>
> # Uncomment this if you want digest authentication
> # mysql.so must be loaded !
> loadmodule "/usr/lib/ser/modules/auth.so"
> loadmodule "/usr/lib/ser/modules/auth_db.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_url",
"mysql://ser:heslo@localhost/ser")
> 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) # --domain module--
> modparam("usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
> modparam("domain", "db_mode", 1)
> modparam("domain", "domain_table", "domain")
> modparam("domain", "domain_col", "domain")
> # --msilo params--
> modparam("msilo", "registrar",
"sip:registrar@example.com")
> modparam("msilo", "db_url",
"sql://ser:heslo@localhost/ser")
> # ------------------------- 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 (is_from_local()) {
>
> if (method=="REGISTER") {
>
> # Uncomment this if you want to use digest authentication
> if (!www_authorize("", "subscriber")) {
> www_challenge("", "0");
> break;
> };
>
> save("location");
> m_dump();
> break;
> };
>
> # native SIP destinations are handled using our
> USRLOC DB
> lookup("aliases");
> if (!lookup("location")) {
> if (method == "MESSAGE") {
> if (!t_newtran()) {
> sl_reply_error();
> break;
> };
> };
> if (m_store("0")) {
> t_reply("202", "Accepted for
Later
Delivery");
> break;
> };
>
> t_reply("503", "Service Unavailable");
> 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();
> };
>
> }
>
>
> Le mar 20/04/2004 à 13:16, Zeus Ng a écrit :
> > First, make sure you have
support.example.com and
>
example.com in your
> > domain table. Use
> >
> > serctl domain add
example.com
> > serctl domain add
support.example.com
> >
> > Second, depending on the version of SER you are using, you may
> > need
> > some or all of the following.
> >
> > modparam("usrloc", "use_domain", 1)
> > modparam("registrar", "use_domain", 1)
> >
> > Zeus
> >
> > > -----Original Message-----
> > > From: serusers-bounces(a)lists.iptel.org
> > > [mailto:serusers-bounces@lists.iptel.org] On Behalf Of gaillac harry
> > > Sent: Tuesday, 20 April 2004 7:31 PM
> > > To: serusers(a)lists.iptel.org
> > > Subject: [Serusers] multiple domains
> > >
> > >
> > > Hi all,
> > >
> > > here is my problem when i use serctl to add a account
the domain
> > > name is extract from email address
and insert to
domain field of
> > > subscriber table. I added two
domains
(
support.example.com and
> > >
example.com) but if i use digest
authentication (!www...) the
> > > client send is domain and SER look at its subscriber domain
> > > field so it's right for example.com's clients.
> > >
> > > I have to change domain name in subscriber table for all
> > > support.example.com's clients or don't use digest
> > > authentication!
> > >
> > > May I use one SERWEB per domain ?
> > >
> > > is it possible to avoid changing domain field of subscriber
> > > table for accounts of others domains?
> > >
> > > What about dns srv may I have to add srv recording for each
> > > domain or using outbound proxy?
> > >
> > > Regards
> > > Harry
> > >
> > >
>