Hi Sammy,<div><br></div><div>Thank you for your response but I don'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'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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I just don'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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">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"><<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div>Hey,<div><br></div><div>I think using this would help<div><br></div><div>if( $tU =~ "1234567890")</div>
<div>{</div><div> $avp(gid) = 1;</div><div>}else if( $tU =~ "
9876543210 "){</div><div> $avp(gid) = 2;</div><div>}</div><div>if (!load_balance("$avp(gid)","transc;pstn")) {</div><div> sl_send_reply("500","Service full");</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 class="h5">On Thu, Apr 5, 2012 at 12:02 AM, Ali Pey <span dir="ltr"><<a href="mailto:alipey@gmail.com" target="_blank">alipey@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">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'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">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>