Daniel hi,<br><br>mysql output:<br><br> select * from dialplan;<br>+----+------+-----+----------+-----------+-----------+-------------+----------+-------+<br>| id | dpid | pr  | match_op | match_exp | match_len | subst_exp   | repl_exp | attrs |<br>
+----+------+-----+----------+-----------+-----------+-------------+----------+-------+<br>|  2 |    9 | 100 |        0      |   ^123+      |         0       | ^(123.+)        | 0030\1   | 111   |<br>|  4 |    9 | 100 |        0      | ^1234.*      |         0       | ^(1234)(.+)    | 0030\2   | 111   |<br>
+----+------+-----+----------+-----------+-----------+-------------+----------+-------+<br><br>The dialed number has prefix 123 and we don&#39;t now the excact number of digit&#39;s. maybe is 10 or maybe is 12 and so on ... Also the number after the prefix could include a #.<br>
<br>Thanks for the dispatcher con BTW, was very nice ;-)<br><br>P.S. Because some times numbers are arriving in our network with many kind of prefixes (a confusing situation) we want to have the ability to manipulate them before we send them(the numbers) to the dispatcher.<br>
<br><br>Alex<br><br><br><div class="gmail_quote">On Thu, Nov 26, 2009 at 11:07 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<div class="im"><br>
<br>
On 26.11.2009 21:58 Uhr, alex pappas wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Panagiotis,<br>
<br>
I tried your sugestions but without result :-(<br>
having in my kamailio.cfg this line fo code:<br>
<br>
        xlog(&quot;----------- The $ruri.user  ----------\n&quot;);<br>
        dp_translate(&quot;10&quot;, &quot;$ruri.user/$ruri.user&quot;);<br>
</blockquote>
<br></div>
first, $ruri.user is obsoleted, use $rU.<br>
<br>
Send here the output of &#39;select * from dialplan&#39; and the dialed number.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
        xlog(&quot;----------- The $ruri.user  ----------\n&quot;);<br>
<br>
When a call a number with length more than 6 digit the dialplan module does not match the prefix of the number. I also tried changing the *match_exp ^123+ to match_exp ^123.** but still with no success. The prefix match if I call a 7 digit number only in the second case.<br>

<br>
Any other suggestions are welcomed.<br>
<br>
Alex<br>
<br>
<br></div>
2009/11/26 Panagiotis Skoulikaritis &lt;<a href="mailto:pskoul@algonet.gr" target="_blank">pskoul@algonet.gr</a> &lt;mailto:<a href="mailto:pskoul@algonet.gr" target="_blank">pskoul@algonet.gr</a>&gt;&gt;<div><div></div>
<div class="h5"><br>
<br>
    Hi Alex<br>
<br>
    Use the following if you just want to add the prefix 0030 in front<br>
    of the 123<br>
<br>
<br>
    dpid 10<br>
    pr    100<br>
    match_op 1<br>
    match_exp ^123+<br>
    match_len 0<br>
    subst_exp ^(123.+)<br>
    repl_exp 0030\1<br>
<br>
    if you want to replace the 123 with the 0030 use the following<br>
<br>
    dpid 10<br>
    pr    100<br>
    match_op 1<br>
    match_exp ^123+<br>
    match_len 0<br>
    subst_exp ^(123)(.+)<br>
    repl_exp 0030\2<br>
<br>
    and so on ..<br>
<br>
    Regards<br>
<br>
    Panagiotis<br>
<br>
    alex pappas wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
    Dear all,<br>
<br>
    I&#39;m having difficulties in the dialplan module. My problem is in<br>
    the regular expressions added to the database. I tried some<br>
    examples from previous users but they don&#39;t work for me.<br>
    example:<br>
<br>
    dpid 10<br>
    pr    100<br>
    match_op 0<br>
    match_exp ^123(.*)$<br>
    match_len 0<br>
    subst_exp ^123<br>
    repl_exp 0030<br>
<br>
<br>
    Previous example from Daniel that I found in user lists:<br>
<br>
    s/subst_exp/repl_exp/<br>
<br>
<br>
          subst_exp - is regular expression that can be used to group parts<br>
    of the input<br>
    repl_exp - is used to build the output<br>
<br>
    Example: you want to remove the first 0 and prefix +44 to a number:<br>
<br>
    subst_exp=^0(.+)$<br>
    repl_exp=+44\1<br>
<br>
<br>
          Can someone provide an example that works with the latest     kamailio please? Also where I can find more docs about dialplan?<br>
<br>
    Thank you all<br>
<br>
    Alex<br>
    ------------------------------------------------------------------------<br>
<br>
    _______________________________________________<br>
    Kamailio (OpenSER) - Users mailing list<br></div></div>
    <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a> &lt;mailto:<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a>&gt;<div class="im"><br>
    <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
    <a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote>
<br>
<br>
------------------------------------------------------------------------<div class="im"><br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote><font color="#888888">
<br>
-- <br>
Daniel-Constantin Mierla<br>
* <a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a><br>
<br>
</font></blockquote></div><br>