Hi Alberto
The magic you are looking for is in the "domain" module. The example
configuration files in the distribution have it set up and ready to use
if you add the line "#!define WITH_MULTIDOMAIN"
The important bit for your scenario is in the example config:
# ----- domain params -----
#!ifdef WITH_MULTIDOMAIN
modparam("domain", "db_url", DBURL)
# register callback to match myself condition with domains list
modparam("domain", "register_myself", 1)
#!endif
That section tells the domain module to use the database, and to include
the domains loaded from there when matching the special keyword
"myself". The example config files also set up other modules (like user
location module) to be domain aware as well.
In this setup you do not need to restart kamailio when you add or remove
domains.... but you do need to tell it to reload the domains from
database as Kamailio holds a cached copy of the list in memory.... so
when you make a database change then do "kamctl domain reload". You can
also run "kamctl domain show" to see what domains are currently listed
in memory.
On 12/10/14 21:38, Alberto Llamas wrote:
Hello kamailio gurus,
Thanks if somebody can help me answering nex question:
I have a kamailio server as registrar server with asterisk behind. For
register porpouse the UA are using subdomain like:
100(a)test.mydomain.com <mailto:100@test.mydomain.com>
200(a)test2.mydomain.com <mailto:200@test2.mydomain.com>
I have to add each alias in the kamailio.cfg file an restart the sevice.
Alias="test.mydomain.com <http://test.mydomain.com>"
Alias="test2.mydomain.com <http://test2.mydomain.com>"
Is there some option to add it in the database? Then i don't have to
restart the server each time i have to add/edit/delete each subdomain.
Thanks a lot,
Albert
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users