<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><bogdan@voice-system.ro></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 <bogdan@voice-system.ro><br>Subject: Re: [OpenSIPS-Users] need help on dialplan module<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org><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> <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>> Hi all<br>><br>> could you please need me to understand the translation on dialplan module;<br>> mysql> select * from dialplan;<br>> +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>> | id | dpid | pr | match_op | match_exp | match_len | subst_exp | <br>> repl_exp | attrs |<br>> +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>> | 73 | 15 | 0 | 1 | ^000 | 0 | ^(0)(.+) | <br>> \2
| |<br>> | 78 | 16 | 0 | 1 | 000 | 0 | (000)(.+) | <br>> 8\2 | |<br>> | 76 | 14 | 0 | 1 | ^000 | 0 | ^(000)(.+) | <br>> 8\2 | |<br>> | 75 | 15 | 0 | 1 | ^55 | 0 | ^(55)(.+) | <br>> \2 | |<br>> +----+------+----+----------+-----------+-----------+------------+----------+-------+<br>><br>> [root@localhost ~]# opensipsctl fifo dp_translate 14 00055980007<br>>
Output:: 855980007<br>> [root@localhost ~]# opensipsctl fifo dp_translate 15 0007<br>> Output:: 007<br>> [root@localhost ~]# opensipsctl fifo dp_translate 15 55980007<br>> Output:: 980007<br>> [root@localhost ~]# opensipsctl fifo dp_translate 16 55980007<br>> Output:: 87<br>><br>> repl_exp : sometimes has value \2 or \1 - what does it mean?? does it <br>> have other value?<br>> what does the ^ mean??<br>> is there more special character??<br>><br>> where do i find more docs for translation rule<br>><br>> Thank you<br>> Ha`<br>><br>><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>> <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>