[Serusers] Serving Multiple Domain in one SER.

Ricardo Martinez rmartinez at redvoiss.net
Mon Nov 22 22:18:50 CET 2004


Hello again.
	I need come back on this post.   Thanks to Daniel Mierla i was able
to register in one SER two clients with different domains.   I think that i
am missing something because i can't make calls between this two clients.
This is the error from the debug : 


3(15752) SIP Request:
 3(15752)  method:  <INVITE>
 3(15752)  uri:     <sip:5555832352 at sip1.mydomain.com>
 3(15752)  version: <SIP/2.0>
 3(15752) parse_headers: flags=1
 3(15752) Found param type 232, <branch> = <z9hG4bK-d0c66b36>; state=16
 3(15752) end of header reached, state=5
 3(15752) parse_headers: Via found, flags=1
 3(15752) parse_headers: this is the first via
 3(15752) After parse_msg...
 3(15752) preparing to run routing scripts...
 3(15752) DEBUG : is_maxfwd_present: searching for max_forwards header
 3(15752) parse_headers: flags=128
 3(15752) end of header reached, state=9
 3(15752) DEBUG: get_hdr_field: <To> [51];
uri=[sip:5555832352 at sip1.mydomain.com] 
 3(15752) DEBUG: to body [<sip:5555832352 at sip1.mydomain.com>
]
 3(15752) get_hdr_field: cseq <CSeq>: <101> <INVITE>
 3(15752) DEBUG: is_maxfwd_present: value = 70 
 3(15752) DEBUG: add_param: tag=a7b8327a12a17f9bo0
 3(15752) end of header reached, state=29
 3(15752) parse_headers: flags=256
 3(15752) DEBUG: get_hdr_body : content_length=422
 3(15752) found end of header
 3(15752) find_first_route(): No Route headers found
 3(15752) loose_route(): There is no Route HF
 3(15752) parse_headers: flags=64
 3(15752) check_via_address(64.76.148.244, 64.76.148.244, 0)
 3(15752) parse_headers: flags=-1
 3(15752) DEBUG: t_addifnew: msg id=2 , global msg id=0 , T on
entrance=0xffffffff
 3(15752) parse_headers: flags=-1
 3(15752) parse_headers: flags=60
 3(15752) t_lookup_request: start searching: hash=654, isACK=0
 3(15752) DEBUG: RFC3261 transaction matching failed
 3(15752) DEBUG: t_lookup_request: no transaction found
 3(15752) DBG: callback type 2, id 3 entered
 3(15752) parse_headers: flags=44
 3(15752) DEBUG: noisy_timer set for accounting
 3(15752) SER: new INVITE
 3(15752) parse_headers: flags=-1
 3(15752) check_via_address(64.76.148.244, 64.76.148.244, 0)
 3(15752) WARNING:vqm_resize: resize(0) called
 3(15752) DEBUG: reply sent out. buf=0x80ea668: SIP/2.0 1...,
shmem=0x402e7488: SIP/2.0 1
 3(15752) DEBUG: t_reply: finished
 3(15752) DEBUG: mk_proxy: doing DNS lookup...
 3(15752) get_record: lookup(_sip._udp.sip1.mydomain.com, 33) failed
 3(15752) sip_resolvehost: no SRV record found for sip1.mydomain.com, trying
'normal' lookup...
 3(15752) check_via_address(64.76.148.244, 64.76.148.244, 0)
 3(15752) DEBUG: add_to_tail_of_timer[4]: 0x402e5d90
 3(15752) DEBUG: add_to_tail_of_timer[0]: 0x402e5da4
 3(15752) SER: new transaction fwd'ed
 3(15752) DEBUG:destroy_avp_list: destroing list (nil)

Looking at this i come up with a question.  How does it suppose that
intra-domain call works?.  For example i have two domains and one client in
each of them.

Domain1 :sip1.mydomain.com
User1 : 1234 at sip1.mydomain.com

and

Domain2 : sip2.mydomain.com
User2 : 5678 at sip2.mydomain.com


If User1 calls to User2, the INVITE is like : 

<INVITE>
 uri: <sip:5678 at sip1.mydomain.com>

I guess SER look for the user 5678 in the sip1.mydomain.com domain, but this
user is Registered in the domain2 (sip2.domain.com), so it will never find
the user and the call will fail.  How SER knows in which domain table look
for a user?
For intra-domain calls do i have to append the domain of the destination
client?.
I hope that someone can help me.

I'm also attaching my ser.cfg, i guess that i'm missing something. (it's a
little bit edited)

#
# $Id: ser.cfg,v 1.21.2.2 2003/10/13 22:53:06 jiri Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

debug=9   # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes        # (cmd line: -E)

#Uncomment these lines to enter debugging mode 
#fork=no
#log_stderror=yes

check_via=yes   # (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666


# ------------------ 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"

loadmodule "/usr/local//lib/ser/modules/exec.so"

# Para trabajar con NAT
loadmodule "/usr/local//lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local//lib/ser/modules/domain.so"
loadmodule "/usr/local//lib/ser/modules/dbtext.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/auth_radius.so"
loadmodule "/usr/local/lib/ser/modules/group_radius.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"

# ----------------- setting module-specific parameters ---------------

# ----------------- setting module-specific parameters ---------------
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

# module authorization
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radiuscl
ient.conf")
modparam("auth_radius","service_type",15)

#module accounting
modparam("acc","radius_config","/usr/local/etc/radiusclient/radiusclient.con
f")
modparam("acc","log_level",1)
modparam("acc", "service_type", 15)
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "failed_transactions", 1)
modparam("acc", "report_ack", 0)

#group radius
modparam("group_radius","radius_config","/usr/local/etc/radiusclient/radiusc
lient.conf")
modparam("group_radius", "use_domain", 1)
 
#module mediaproxy
modparam("mediaproxy", "natping_interval", 60)
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy.sock")
#modparam("mediaproxy", "sip_asymmetrics",
"/usr/local/etc/ser/sip-asymmetrics-clients")
#modparam("mediaproxy", "rtp_asymmetrics",
"/usr/local/etc/ser/rtp-asymmetrics-clients")
modparam("registrar", "nat_flag", 5)

#module usrloc
modparam("usrloc", "use_domain", 1)

#module domain
modparam("domain", "db_url", "/usr/local/etc/ser/domaintables")
modparam("domain", "domain_table", "domain")
modparam("domain", "domain_col", "domain")

#module registrar (Con estos parametro haces que el location lookup priorize
solo los mas recientes contacts.
modparam("registrar", "append_branches", 0)
modparam("registrar", "desc_time_order", 1)
modparam("registrar", "use_domain", 1)

# -------------------------  request routing logic -------------------

# main routing logic

route {

 ..skipped....


        if (uri=="sip:sip1.mydomain.com") {
                if (method=="REGISTER") {
                       ....

                        save("location");
                        break;
                }; # FIN DE CHEQUEO DE REGISTRO

                # lookup("aliases");

              ...

              if ( (uri=~"^sip:0.@){
                        log(1,"FORWARDING : Llamada hacia plataforma
H.323\n");
                        route(1);
                break;
                };


                # Llamadas SIP locales
                if (!lookup("location")) { #Usuarios que no estan en
"location" database.
                        route(4);
                        break;
                };

                setflag(3);
.....
        } else if (uri=="sip:sip2.mydomain.com"){
                if (method=="REGISTER") {
                       .....

                        save("location");
                        break;
                }; # FIN DE CHEQUEO DE REGISTRO
.....
           
                if ((uri=~"^sip:0.@*)){
                        log(1,"FORWARDING : Llamada hacia plataforma
H.323\n");
                        route(1);
                break;
                };


                # Llamadas SIP locales
                if (!lookup("location")) { #Usuarios que no estan en
"location" database.
                        route(4);
                        break;
                };

                setflag(3);

                ...

        };

        append_hf("P-hint: USRLOC\r\n");

        if (!t_relay()) {
                sl_reply_error();
                break;
        };

} /* end of initial routing logic */

#--------- Route 1 hacia SIPQUEST -------------------------------
route[1] 
{
        ......
        if (!t_relay()) {
                sl_reply_error();
                break;
        };
        
}


#------- Route 3 : Trafico de Internet hacia la PSTN -------------------

route[3] {
        .....

        if(!t_relay()) {
                sl_reply_error();
                break;
        };

}


#------ Route 4 : Llamadas a usuarios Off-line ------------------------

route[4] {

        if (!t_newtran()) {
                sl_reply_error();
        };

        if (!t_reply("404", "Not Found IT!")) {
                sl_reply_error();
        };
        break;
}

# ---------------------------- Begin On-Reply Routes
--------------------------

onreply_route[1] {
     .......
      };

}

# ------------------------------ End On-Reply Routes
--------------------------


Thanks in advance.
Ricardo.-




More information about the sr-users mailing list