Hello List. I'm trying to set up an enviroment where i have one SER instance (in one machine), managing two domains. For this i defined two domains pointing to the same machin. Let's say : sip1.mydomain.com sip2.mydomain.com
both of them pointing to the 10.0.0.5 (SER).
My configuration file (ser.cfg) is something like this.
route { if ... { max_forward routine }; if ... { message_too_big routine }; if (uri=="sip1.mydomain.com") {
if (method=="REGISTER") { REGISTER_1 routine }; exec 1 routine routing 1 routine
} else if (uri=="sip2.mydomain.com")
if (method=="REGISTER") { REGISTER_2 routine }; exec 2 routine routing 2 routine
};
if (!t_relay()) { sl_reply_error(); break; };
}
route[1] ....
route[2] ....
I also have in my ser.cfg
#module domain modparam("domain", "db_url", "/usr/local/etc/ser/domaintables") modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "domain")
Where my domain file is like this: domain(str) sip1.mydomain.com sip2.mydomain.com
For this setup i run SER and there is no errors in the initialization. But when a UA is trying to register, for any domain, is getting the "Too many Hops" message. I think is maybe a problem with my host name or something like this. I don't know what i'm dogin wrong. Do i have to set up something else?, maybe in my hosts file?. I really hope that someone could help me.
Best regards, Ricardo Martinez
The problem here is that you are comparing the Request-URI to "sip1.mydomain.com", they will never be equal because the domain is only a portion of the Request-URI, you have to use regular expression matching instead:
if (uri =~ "sip2.mydomain.com")
Or even better, use the domain module, populate the database table with all your domains and then you can do something like this:
if (is_uri_host_local()) { if (method=="REGISTER")) { /* process the registration here */ }; };
and so on.
Jan.
On 22-11 11:39, Ricardo Martinez wrote:
Hello List. I'm trying to set up an enviroment where i have one SER instance (in one machine), managing two domains. For this i defined two domains pointing to the same machin. Let's say : sip1.mydomain.com sip2.mydomain.com
both of them pointing to the 10.0.0.5 (SER).
My configuration file (ser.cfg) is something like this.
route { if ... { max_forward routine };
if ... { message_too_big routine };
if (uri=="sip1.mydomain.com") {
if (method=="REGISTER") { REGISTER_1 routine };
exec 1 routine routing 1 routine
} else if (uri=="sip2.mydomain.com")
if (method=="REGISTER") { REGISTER_2 routine };
exec 2 routine routing 2 routine
};
if (!t_relay()) { sl_reply_error(); break; };
}
route[1] ....
route[2] ....
I also have in my ser.cfg
#module domain modparam("domain", "db_url", "/usr/local/etc/ser/domaintables") modparam("domain", "domain_table", "domain") modparam("domain", "domain_col", "domain")
Where my domain file is like this: domain(str) sip1.mydomain.com sip2.mydomain.com
For this setup i run SER and there is no errors in the initialization. But when a UA is trying to register, for any domain, is getting the "Too many Hops" message. I think is maybe a problem with my host name or something like this. I don't know what i'm dogin wrong. Do i have to set up something else?, maybe in my hosts file?. I really hope that someone could help me.
Best regards, Ricardo Martinez
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers