Hi Alex

Use the following if you just want to add the prefix 0030 in front of the 123

dpid 10
pr    100
match_op 1
match_exp ^123+
match_len 0
subst_exp ^(123.+)
repl_exp 0030\1

if you want to replace the 123 with the 0030 use the following

dpid 10
pr    100
match_op 1
match_exp ^123+
match_len 0
subst_exp ^(123)(.+)
repl_exp 0030\2

and so on ..

Regards

Panagiotis

alex pappas wrote:
Dear all,

I'm having difficulties in the dialplan module. My problem is in the regular expressions added to the database. I tried some examples from previous users but they don't work for me.
example:

dpid 10
pr    100
match_op 0
match_exp ^123(.*)$
match_len 0
subst_exp ^123
repl_exp 0030


Previous example from Daniel that I found in user lists:

s/subst_exp/repl_exp/


  
subst_exp - is regular expression that can be used to group parts of the input
repl_exp - is used to build the output

Example: you want to remove the first 0 and prefix +44 to a number:

subst_exp=^0(.+)$
repl_exp=+44\1


  
Can someone provide an example that works with the latest  kamailio please? Also where I can find more docs about dialplan?

Thank you all

Alex

_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users