<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
drouting or other least cost routing modules typically choose the
destination based on prefix matching.<br>
<br>
In this case you need matching on domain, which I would do it with a
combination of htable+dispatcher.<br>
<br>
In htable (stored in database as well), I will keep items (domain,
setid).<br>
<br>
In dispatcher will be: setid and the associated PBX addresses.<br>
<br>
First retrieve the setid by looking up domain in hash table, then
with the retrieved setid value, use ds_select_dst(setid, ...).<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 08/12/15 01:54, Slava Bendersky
wrote:<br>
</div>
<blockquote
cite="mid:144928676.7641270.1449536077902.JavaMail.zimbra@skillsearch.ca"
type="cite">
<div style="font-family: lucida console,sans-serif; font-size:
12pt; color: #000000">
<div>Hello Everyone,</div>
<div>Looking for some design suggestion.</div>
<div>I am trying achieve routing based on domain.tld. I thought
use drouting, but not sure if it suitable for this task. </div>
<div><br data-mce-bogus="1">
</div>
<div>Example:</div>
<div><br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div> Kamailio Server 1 </div>
<div> |</div>
<div> |__________________
PBX Group 1 domain1.tld</div>
<div>
|</div>
<div>
|____ PBX Server 1</div>
<div>
|</div>
<div>
|____PBX Server 2</div>
<div> </div>
<div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
|__________________ PBX Group
2 domain2.tld</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
|</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
|____ PBX Server 1</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
|</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
|____PBX Server 2</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">and so
on.</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br
data-mce-bogus="1">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'lucida
console', sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px;" data-mce-style="color:
#000000; font-family: 'lucida console', sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">Slava.</div>
</div>
</div>
<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>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://miconda.eu">http://miconda.eu</a></pre>
</body>
</html>