Thank you Bogdan. That makes sense. I guess I would only need one dpid in my case.<div><br></div><div>Regards,</div><div>Ali</div><div><br><br><div class="gmail_quote">On Thu, Apr 5, 2012 at 10:02 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Hi Ali,<br>
    <br>
    the dpid is DialPlan ID - the idea is that you can group the rules
    in different sets and use a certain set at a given moment. This dpid
    is linked to the first param of the dp_translate() function  - you
    tell to the function which set of rules to use (and only the rules
    from that set will be evaluated for the current translation)<br>
    <br>
    Regards,<br>
    Bogdan<div><div class="h5"><br>
    <br>
    On 04/05/2012 04:36 PM, Ali Pey wrote:
    <blockquote type="cite">Hi Sammy,
      <div><br>
      </div>
      <div>Thank you for your response but I don&#39;t think you understood
        my question.</div>
      <div><br>
      </div>
      <div>As the subject of the thread suggests my question is
        regarding the dialplan module. I don&#39;t want to list all hundreds
        of my numbers in my config script and then restart opensips
        every time I need to make a change. I want to use the dialplan
        module to be able to look up numbers or patterns from the
        Database.</div>
      <div><br>
      </div>
      <div>
        <div style="font-size:13px;font-family:arial,sans-serif">I just don&#39;t understand
          the usage of the dpid filed in the dialplan table. Can all my
          rows in the dialplan table have the same dpid value?</div>
        <div style="font-size:13px;font-family:arial,sans-serif"><br>
        </div>
      </div>
      <div style="font-size:13px;font-family:arial,sans-serif">Basically I would like to
        use the dialplan module to see if there is a match; if there is
        no match, then use the load balancer module to route the calls.</div>
      <div style="font-size:13px;font-family:arial,sans-serif"><br>
      </div>
      <div style="font-size:13px;font-family:arial,sans-serif">Hope I explained it
        better this time.</div>
      <div><br>
        Regards,</div>
      <div>Ali</div>
      <div><br>
      </div>
      <div><br>
        <div class="gmail_quote">On Thu, Apr 5, 2012 at 1:25 AM, SamyGo
          <span dir="ltr">&lt;<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div><br>
            </div>
            Hey,
            <div><br>
            </div>
            <div>I think using this would help
              <div><br>
              </div>
              <div>if( $tU =~ &quot;1234567890&quot;)</div>
              <div>{</div>
              <div>   $avp(gid) = 1;</div>
              <div>}else if( $tU =~ &quot;
                9876543210  &quot;){</div>
              <div>    $avp(gid) = 2;</div>
              <div>}</div>
              <div>if (!load_balance(&quot;$avp(gid)&quot;,&quot;transc;pstn&quot;)) {</div>
              <div>     sl_send_reply(&quot;500&quot;,&quot;Service full&quot;);</div>
              <div>
                     exit;</div>
              <div>}</div>
              <div><br>
              </div>
              <div>engage <a href="http://www.opensips.org/Resources/DocsTutLoadbalancing" target="_blank">load-balancer</a> to use $avp(gid)
                where group_id=1/2 contains pool of servers serving your
                required destination number!</div>
              <div><br>
              </div>
              <div>I hope this helped.</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>BR,</div>
              <div>Sammy.</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>
                <div class="gmail_quote">
                  <div>
                    <div>On Thu, Apr 5, 2012 at 12:02 AM, Ali
                      Pey <span dir="ltr">&lt;<a href="mailto:alipey@gmail.com" target="_blank">alipey@gmail.com</a>&gt;</span>
                      wrote:<br>
                    </div>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                    <div>
                      <div>Hello,
                        <div><br>
                        </div>
                        <div>I need to match some destination numbers to
                          specific servers. For instance if the call is
                          to 1234567890 go to server 1 and if it is to
                          9876543210 go to server 2, etc.</div>
                        <div><br>
                        </div>
                        <div>The purpose is to look up some numbers or
                          patterns and then route to specific servers
                          and use the load balancer module for any other
                          numbers.</div>
                        <div><br>
                        </div>
                        <div>Can I use the dial plan module to lookup
                          the destinations?</div>
                        <div><br>
                        </div>
                        <div>I don&#39;t understand the dpid. Do I need a
                          dpid for each number? Can all my rows have the
                          same dpid? </div>
                        <div>How can I do one look up to see if the
                          dialed number is in the dialplan table? It can
                          be hundreds of numbers.</div>
                        <div><br>
                        </div>
                        <div>Regards,</div>
                        <div>Ali</div>
                        <div><br>
                        </div>
                        <br>
                      </div>
                    </div>
                    _______________________________________________<br>
                    Users mailing list<br>
                    <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                    <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                    <br>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
    <br>
    </div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
  </font></span></div>

</blockquote></div><br></div>