[OpenSIPS-Users] need help on dialplan module

ha do haloha201 at yahoo.com
Mon Jan 25 06:50:17 CET 2010


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 <bogdan at voice-system.ro> wrote:

From: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
Subject: Re: [OpenSIPS-Users] need help on dialplan module
To: "OpenSIPS users mailling list" <users at lists.opensips.org>
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       |       |
> +----+------+----+----------+-----------+-----------+------------+----------+-------+
>
> [root at localhost ~]# opensipsctl fifo dp_translate 14 00055980007
> Output:: 855980007
> [root at localhost ~]# opensipsctl fifo dp_translate 15 0007
> Output:: 007
> [root at localhost ~]# opensipsctl fifo dp_translate 15 55980007
> Output:: 980007
> [root at 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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100124/ed000395/attachment.htm 


More information about the Users mailing list