<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>this might be due to automatic translation of kamcmd for its
      parameters that look like numbers, can you try with:</p>
    <p><font face="monospace, monospace" color="#000000">kamcmd
        dialplan.translate 1 s:+39123456</font></p>
    <br>
    If still fails, send here the log messages with debug=3 when running
    the rpc command.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 10.10.18 10:00, Stefano Bertuola
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHeTMT4ahGtatOMY1o4pWbLP-3Bmei_qguhxDkH3c=CuvHf1Aw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)">Hi
                  Patrick.</div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                </div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)">Thanks
                  for your replay.</div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                </div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)">I
                  also verified an issue with <b>dialplan.translate</b>
                  command in <b>kamcmd</b>. </div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                </div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)">Running
                  a live test it is working.</div>
                <div class="gmail_default"
                  style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                </div>
              </div>
            </div>
          </div>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">mysql> select * from dialplan; 
                                                             </font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">+----+------+----+----------+--------------+-----------+--------------+----------+-------+</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">| id | dpid | pr | match_op |
                          match_exp    | match_len | subst_exp    |
                          repl_exp | attrs |</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">+----+------+----+----------+--------------+-----------+--------------+----------+-------+</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">|  1 |    1 |  1 |        1 |
                          ^(\+39)(.*)$ |         0 | ^(\+39)(.*)$ | \2 
                               | 1     |</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace">+----+------+----+----------+--------------+-----------+--------------+----------+-------+</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default"
                      style="color:rgb(11,83,148);font-family:verdana,sans-serif"><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace" color="#000000">NOTICE:
                          <script>: +3912345|Before Dialplan</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div class="gmail_default">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace" color="#000000">NOTICE:
                          <script>: 12345|After Dialplan</font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div class="gmail_default">
                  <div class="gmail_default"
                    style="color:rgb(11,83,148);font-family:verdana,sans-serif"><br>
                  </div>
                  <div class="gmail_default"
                    style="color:rgb(11,83,148);font-family:verdana,sans-serif">Br.
                    Stefano</div>
                  <div class="gmail_default"
                    style="color:rgb(11,83,148);font-family:verdana,sans-serif"><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Wed, Oct 10, 2018 at 6:50 AM Patrick Wakano
          <<a href="mailto:pwakano@gmail.com" moz-do-not-send="true">pwakano@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">
            <div>Hi Stefano,</div>
            <div>I have similar rules in my dialplan and they work.</div>
            <div>However the kamcmd dialplan.translate command also
              fails for me (Kamailio 5.0.4), but I guess it is a problem
              with the command itself and not with the translation done
              by the dp_translate(), because for real calls it does
              work!<br>
            </div>
            <div><br>
            </div>
            <div>Patrick Wakano<br>
            </div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr">On Wed, 10 Oct 2018 at 02:21, Stefano
              Bertuola <<a href="mailto:stefano.bertuola@gmail.com"
                target="_blank" moz-do-not-send="true">stefano.bertuola@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)">Hi
                      Experts.</div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                    </div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)">I
                      did some tests with DIALPLAN module and I have
                      some doubts about how to define the regular
                      expressions in the database.</div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                    </div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)">For example,
                      using the start character '^' (beginning of the
                      string), it looks not working:</div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                    </div>
                  </div>
                </div>
                <blockquote style="margin:0 0 0
                  40px;border:none;padding:0px">
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">kamcmd>
                            dialplan.dump 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">{</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  DPID: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  ENTRIES: {</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                          ENTRY: {</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  PRIO: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHOP: 2</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHEXP: ^(\+39)(.*)$</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHLEN: 0</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  SUBSTEXP: ^(\+39)(.*)$</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  REPLEXP: \2</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  ATTRS: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                          }</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  }</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">}</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">kamcmd>
                            dialplan.translate 1 "+39123456"   </font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">error:
                            500 - No translation</font></div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <div dir="ltr">
                  <div dir="ltr">
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)"><br>
                    </div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif;color:rgb(11,83,148)">Removing
                      it, it works... but not as desired:</div>
                    <div class="gmail_default"
                      style="font-family:verdana,sans-serif"><font
                        color="#000000"><br>
                      </font></div>
                  </div>
                </div>
                <blockquote style="margin:0 0 0
                  40px;border:none;padding:0px">
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">kamcmd>
                            dialplan.dump 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">{</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  DPID: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  ENTRIES: {</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><span
                            style="color:rgb(0,0,0);font-family:monospace,monospace"> 
                                          ENTRY: {</span></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  PRIO: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHOP: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHEXP: (\+39)(.*)$</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  MATCHLEN: 0</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  SUBSTEXP: (\+39)(.*)$</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  REPLEXP: \2</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                                  ATTRS: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                          }</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  }</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">}</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">kamcmd>
                            dialplan.translate 1 "+39123456"</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">{</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  Output: 123456"</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  Attributes: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">}</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">kamcmd>
                            dialplan.translate 1 "xxxxxxx+39123456"</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">{</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  Output: 123456"</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000"> 
                                  Attributes: 1</font></div>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div class="gmail_default">
                        <div class="gmail_default"><font
                            face="monospace, monospace" color="#000000">}</font></div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <div dir="ltr">
                  <div dir="ltr">
                    <div class="gmail_default">
                      <div class="gmail_default"><font face="monospace,
                          monospace" color="#000000"><br>
                        </font></div>
                      <div class="gmail_default"><font face="verdana,
                          sans-serif" color="#0b5394">Can someone help
                          me understand how the regular expression
                          should be used in DIALPLAN, please?</font></div>
                      <div class="gmail_default"><font face="verdana,
                          sans-serif" color="#0b5394"><br>
                        </font></div>
                      <div class="gmail_default"><font face="verdana,
                          sans-serif" color="#0b5394">Br. Stefano</font></div>
                    </div>
                  </div>
                </div>
              </div>
              _______________________________________________<br>
              Kamailio (SER) - Users Mailing List<br>
              <a href="mailto:sr-users@lists.kamailio.org"
                target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
              <a
                href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            </blockquote>
          </div>
          _______________________________________________<br>
          Kamailio (SER) - Users Mailing List<br>
          <a href="mailto:sr-users@lists.kamailio.org" target="_blank"
            moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
          <a
            href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>