[OpenSER-Devel] dialplan repl_exp example

Daniel-Constantin Mierla miconda at gmail.com
Wed Jun 11 19:11:27 CEST 2008


Hello Juha,

just to give some details as concept:

match_exp - is a regular expression - you can optimize it for fast matching
subst_exp - is like the first part of the 's' (or subst function in 
textops) operation in perl (you can mark tokens withing parenthesis and 
then use them in repl_expr like \n ) -- this is used to break-down the 
input in tokens
repl_exp is like the second part of the 's' operation in perl, but you 
can have pseudo-variables as well - this is used to build the output

Cheers,
Daniel


On 06/11/08 19:11, Juha Heinanen wrote:
> here is one simple example that i would like to know how to write
> repl_exp for:
>
> match_exp  repl_exp  result
>
> ^0[1-9]	   ?	     +358[1-9]
>
> i.e., if number starts with 0[1-9], replace 0 it with +358.  currently
> dialplan README does not give a glue.
>
> -- juha
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>
>   

-- 
http://www.asipto.com




More information about the Devel mailing list