Dear Panagiotis,
I tried your sugestions but without result :-(
having in my kamailio.cfg this line fo code:
xlog("----------- The $ruri.user ----------\n");
dp_translate("10", "$ruri.user/$ruri.user");
xlog("----------- The $ruri.user ----------\n");
When a call a number with length more than 6 digit the dialplan module does
not match the prefix of the number. I also tried changing the *match_exp
^123+ to match_exp ^123.** but still with no success. The prefix match if I
call a 7 digit number only in the second case.
Any other suggestions are welcomed.
Alex
2009/11/26 Panagiotis Skoulikaritis <pskoul(a)algonet.gr>
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
listUsers@lists.kamailio.orghttp://lists.kamailio.org/cgi-bin/mailman/listinfo/usershttp://lists.openser-project.org/cgi-bin/mailman/listinfo/users