<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Bogdan<br><br>i refer : String translation (regexp detection, subst translation) function<br><br>the repl_exp = a_value\1 the dialplan will use the a_value + subst_exp as the output if the match_exp=true<br><br>the repl_exp = a_value\2 the dialplan will use the columm a_value + (input string - subst_exp) as the output if the match_exp=true<br><br>it is right?<br><br>Thank you<br>Ha`<br><br><br><br>--- On <b>Fri, 1/22/10, Bogdan-Andrei Iancu <i>&lt;bogdan@voice-system.ro&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Bogdan-Andrei Iancu &lt;bogdan@voice-system.ro&gt;<br>Subject: Re: [OpenSIPS-Users] need help on dialplan module<br>To: "OpenSIPS users mailling list" &lt;users@lists.opensips.org&gt;<br>Date: Friday, January 22, 2010, 9:55 AM<br><br><div class="plainMail">Hi
 Ha,<br><br>The modules user PERL like substitution. A fast google gives some docs <br>on this:<br>&nbsp; &nbsp; <a href="http://www.anaesthetist.com/mnm/perl/Findex.htm#regex.htm" target="_blank">http://www.anaesthetist.com/mnm/perl/Findex.htm#regex.htm</a><br><br>Regards,<br>Bogdan<br><br>ha do wrote:<br>&gt; Hi all<br>&gt;<br>&gt; could you please need me to understand the translation on dialplan module;<br>&gt; mysql&gt; select * from dialplan;<br>&gt; +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>&gt; | id | dpid | pr | match_op | match_exp | match_len | subst_exp&nbsp; | <br>&gt; repl_exp | attrs |<br>&gt; +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>&gt; | 73 |&nbsp;&nbsp;&nbsp;15 |&nbsp; 0 |&nbsp; &nbsp; &nbsp; &nbsp; 1 | ^000&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;0 | ^(0)(.+)&nbsp;&nbsp;&nbsp;| <br>&gt; \2&nbsp; &nbsp;
 &nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|<br>&gt; | 78 |&nbsp;&nbsp;&nbsp;16 |&nbsp; 0 |&nbsp; &nbsp; &nbsp; &nbsp; 1 | 000&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;0 | (000)(.+)&nbsp; | <br>&gt; 8\2&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|<br>&gt; | 76 |&nbsp;&nbsp;&nbsp;14 |&nbsp; 0 |&nbsp; &nbsp; &nbsp; &nbsp; 1 | ^000&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;0 | ^(000)(.+) | <br>&gt; 8\2&nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|<br>&gt; | 75 |&nbsp;&nbsp;&nbsp;15 |&nbsp; 0 |&nbsp; &nbsp; &nbsp; &nbsp; 1 | ^55&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;0 | ^(55)(.+)&nbsp; | <br>&gt; \2&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;|<br>&gt; +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>&gt;<br>&gt; [root@localhost ~]# opensipsctl fifo dp_translate 14 00055980007<br>&gt;
 Output:: 855980007<br>&gt; [root@localhost ~]# opensipsctl fifo dp_translate 15 0007<br>&gt; Output:: 007<br>&gt; [root@localhost ~]# opensipsctl fifo dp_translate 15 55980007<br>&gt; Output:: 980007<br>&gt; [root@localhost ~]# opensipsctl fifo dp_translate 16 55980007<br>&gt; Output:: 87<br>&gt;<br>&gt; repl_exp : sometimes has value \2 or \1 - what does it mean?? does it <br>&gt; have other value?<br>&gt; what does the ^ mean??<br>&gt; is there more special character??<br>&gt;<br>&gt; where do i find more docs for translation rule<br>&gt;<br>&gt; Thank you<br>&gt; Ha`<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>&gt; <a
 href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>&gt;&nbsp;&nbsp;&nbsp;<br><br><br>-- <br>Bogdan-Andrei Iancu<br>www.voice-system.ro<br><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>