<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:8pt"><div style="font-family: times new roman,new york,times,serif; font-size: 8pt;">Hi Heinanen<br><br>&nbsp;&nbsp;&nbsp; When I was using the version 1.1.0, I needed to set a preferred route to my voip 123. This way, it was necessary to insert this underscores after 0. They match any single character (like dot in regular expressions). I used it because the prefix needs to match <br>the longest user part. <br><br>prefix-------------------from_uri-------grp_id--------priority<br> 0123456------------------------%------------&nbsp;&nbsp;1 ---------------1<br>0________-------------sip:123@.*-----------&nbsp;&nbsp; 2 ---------------0<br><br>If I call to number 01234560000 with voip 777, the GW 1 will be selected. Instead, when I use voip 123, the GW 2 is returned. This way, all the calls originated by voip 123 having a size
 of user part equal 7 or greater, will match with the second line. It does not happens with I have these lines (without the underscores):<br><br>prefix-------------------from_uri-------grp_id--------priority<br>
 0123456------------------------%------------&nbsp;&nbsp;1 ---------------1<br>
0-----------------------sip:123@.*-----------&nbsp;&nbsp; 2 ---------------0<br><br>In this case, GW 1 will be always selected to any voip. It works in version 1.1.0, but I need to set this behavior in 1.2.0. <br><br>I know that from_uri in this version is a regular expression. So, I added a '^' in the beginning.<br><br>prefix-------------------from_uri-------grp_id--------priority<br>

 0123456--------------------------------------&nbsp;&nbsp;1 ---------------1<br>

0________------------^sip:123@.*---------&nbsp;&nbsp; 2 ---------------0<br><br>The version 1.2.0 always use the LCR in memory. I looked for the query used by 1.1.0 in lcr_mod.h but I didn't find it. So, I don't know if the underscores is necessary because it is used by the MySQL. In my test, just the GW 1 was selected when I called using voip 123. <br><br>Using other words: I want to route all the calls originated by voip 123 through GW 2 (when beginning with a 0) and the others to GW 1. <br><br>Thanks for your help, Heinanen.<br><br>Bruno<br><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Mensagem original ----<br>De: Juha Heinanen &lt;jh@tutpro.com&gt;<br>Para: Bruno Machado &lt;bsmufu@yahoo.com.br&gt;<br>Cc: users@openser.org<br>Enviadas: Quinta-feira, 3 de Maio de 2007 12:36:33<br>Assunto: [Users] LCR module (1.2.0)<br><br><div>Bruno Machado writes:<br><br> &gt; prefix----------from_uri-------grp_id--------priority<br>
 &gt; 0123456------------------------------&nbsp;&nbsp;1 ---------------1<br> &gt; 0________------^sip:123.*---------&nbsp;&nbsp; 2 ---------------0<br> &gt; <br> &gt; Ok. The LCR documentation tells that the column 'from_uri' must be a<br> &gt; regular expression in this version. The route selected is the first<br> &gt; line. I'd like to route the voip number 123 through&nbsp;&nbsp;GW 2, but it<br> &gt; doesn't happens. <br><br>i don't understand based on the above, how your lcr table looks like<br>and which uri you are trying to call.&nbsp;&nbsp;what are the underscores after 0?<br>prefix is just a prefix, nothing else.<br><br>-- juha<br></div></div><br></div></div><br>__________________________________________________<br>Fale com seus amigos  de graça com o novo Yahoo! Messenger <br>http://br.messenger.yahoo.com/ </body></html>