Hi Ha, The "match_exp" regexp is used only for matching the rule (against the input), to see if this rule is to be used - the output has nothing to do with this regexp.
The regexp is generated based on "subst_exp" and "repl_exp" - these two fields acts as a perl / sed substitution ops like "s/subst_exp/repl_exp" Regards, Bogdan ha do wrote: > Hi Bogdan > > i refer : String translation (regexp detection, subst translation) > function > > the repl_exp = a_value\1 the dialplan will use the a_value + subst_exp > as the output if the match_exp=true > > 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 > > it is right? > > Thank you > Ha` > > > > --- On *Fri, 1/22/10, Bogdan-Andrei Iancu /<[email protected]>/* > wrote: > > > From: Bogdan-Andrei Iancu <[email protected]> > Subject: Re: [OpenSIPS-Users] need help on dialplan module > To: "OpenSIPS users mailling list" <[email protected]> > Date: Friday, January 22, 2010, 9:55 AM > > Hi Ha, > > The modules user PERL like substitution. A fast google gives some > docs > on this: > http://www.anaesthetist.com/mnm/perl/Findex.htm#regex.htm > > Regards, > Bogdan > > ha do wrote: > > Hi all > > > > could you please need me to understand the translation on > dialplan module; > > mysql> select * from dialplan; > > > > +----+------+----+----------+-----------+-----------+------------+----------+-------+ > > | id | dpid | pr | match_op | match_exp | match_len | subst_exp | > > repl_exp | attrs | > > > > +----+------+----+----------+-----------+-----------+------------+----------+-------+ > > | 73 | 15 | 0 | 1 | ^000 | 0 | ^(0)(.+) | > > \2 | | > > | 78 | 16 | 0 | 1 | 000 | 0 | (000)(.+) | > > 8\2 | | > > | 76 | 14 | 0 | 1 | ^000 | 0 | ^(000)(.+) | > > 8\2 | | > > | 75 | 15 | 0 | 1 | ^55 | 0 | ^(55)(.+) | > > \2 | | > > > > +----+------+----+----------+-----------+-----------+------------+----------+-------+ > > > > [r...@localhost ~]# opensipsctl fifo dp_translate 14 00055980007 > > Output:: 855980007 > > [r...@localhost ~]# opensipsctl fifo dp_translate 15 0007 > > Output:: 007 > > [r...@localhost ~]# opensipsctl fifo dp_translate 15 55980007 > > Output:: 980007 > > [r...@localhost ~]# opensipsctl fifo dp_translate 16 55980007 > > Output:: 87 > > > > repl_exp : sometimes has value \2 or \1 - what does it mean?? > does it > > have other value? > > what does the ^ mean?? > > is there more special character?? > > > > where do i find more docs for translation rule > > > > Thank you > > Ha` > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Users mailing list > > [email protected] </mc/[email protected]> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > -- > Bogdan-Andrei Iancu > www.voice-system.ro > > > _______________________________________________ > Users mailing list > [email protected] </mc/[email protected]> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Bogdan-Andrei Iancu www.voice-system.ro _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
