<div>Hi All,</div>
<div> </div>
<div>I&#39;m new to the list and fairly new to the vastness which is kamailio and the tons of modules and options.  I&#39;m trying to figure out the simplest method to accomplish the following scenario:</div>
<div> </div>
<div>SIP call comes in, match DID in database (MySQL), rewrite ruri with associated database entry matching DID, relay call to specified gateway, if no matching entry for DID is in database, forward call to dispatcher module and continue processing call (I already use the dispatcher module for load balancing, just need to implement DID call routing before I send calls to dispatcher)</div>

<div> </div>
<div>I&#39;ve been reading about the following modules, dialplan, LCR, drouting, alias_db.</div>
<div> </div>
<div>I think dialplan is what I really need, but I&#39;m confused about what entries to put in the database to match on 10 digit DID:</div>
<div> </div>
<div>match-op = 0 (equal)</div>
<div>match_exp= 1112223333</div>
<div>match_len= 10<br clear="all">subst_exp= ?? is this where I would put the ruri <a href="mailto:sip%3A1112223333@10.10.10.10">sip:1112223333@10.10.10.10</a> (I&#39;m not sure of the syntax here)</div>
<div>repl_exp= ?? not sure what this is for</div>
<div> </div>
<div>can more than one database entry have the same id?</div>
<div> </div>
<div>and also I could use a practical example of how this would work int he config file:</div>
<div> </div>
<div>dp_translate(&quot;240&quot;, &quot;$ruri.user/$ruri.user&quot;); <br> t_relay??</div>
<div> </div>
<div>Any guidance on this would be much appreciated.</div>
<div><br>Thanks.</div>
<div><br>JR<br>-- <br>JR Richardson<br>Engineering for the Masses<br></div>