<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Alberto<br>
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"<br>
<br>
The important bit for your scenario is in the example config:<br>
<blockquote>
<pre># ----- 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
</pre>
</blockquote>
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.<br>
<br>
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.<br>
<br>
<br>
<pre class="moz-signature" cols="72">
</pre>
On 12/10/14 21:38, Alberto Llamas wrote:<br>
</div>
<blockquote
cite="mid:CAHH1jkOUKvNfSJqh85-FT+1rnWJMjjt5Xia5PDOjoMqKmc59Rg@mail.gmail.com"
type="cite">
<p dir="ltr">Hello kamailio gurus,</p>
<p dir="ltr">Thanks if somebody can help me answering nex
question:</p>
<p dir="ltr">I have a kamailio server as registrar server with
asterisk behind. For register porpouse the UA are using
subdomain like:</p>
<p dir="ltr"><a moz-do-not-send="true"
href="mailto:100@test.mydomain.com">100@test.mydomain.com</a><br>
<a moz-do-not-send="true" href="mailto:200@test2.mydomain.com">200@test2.mydomain.com</a></p>
<p dir="ltr">I have to add each alias in the kamailio.cfg file an
restart the sevice.</p>
<p dir="ltr">Alias="<a moz-do-not-send="true"
href="http://test.mydomain.com">test.mydomain.com</a>"<br>
Alias="<a moz-do-not-send="true"
href="http://test2.mydomain.com">test2.mydomain.com</a>"</p>
<p dir="ltr">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.<br>
</p>
<p dir="ltr">Thanks a lot,</p>
<p dir="ltr">Albert</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
</body>
</html>