<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-7" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Alex<br>
<br>
Use the following if you just want to add the prefix 0030 in front of
the 123<br>
<br>
dpid 10<br>
pr 100<br>
match_op 1<br>
match_exp ^123+<br>
match_len 0<br>
subst_exp ^(123.+)<br>
repl_exp 0030\1<br>
<br>
if you want to replace the 123 with the 0030 use the following <br>
<br>
dpid 10<br>
pr 100<br>
match_op 1<br>
match_exp ^123+<br>
match_len 0<br>
subst_exp ^(123)(.+)<br>
repl_exp 0030\2<br>
<br>
and so on ..<br>
<br>
Regards<br>
<br>
Panagiotis<br>
<br>
alex pappas wrote:
<blockquote
cite="mid:88b5e74c0911260611k4d76468ela2f931f9d9d24f01@mail.gmail.com"
type="cite">Dear all,<br>
<br>
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.<br>
example:<br>
<br>
dpid 10<br>
pr 100<br>
match_op 0<br>
match_exp ^123(.*)$<br>
match_len 0<br>
subst_exp ^123<br>
repl_exp 0030<br>
<br>
<br>
Previous example from Daniel that I found in user lists:<br>
<br>
<pre style="margin: 0em;">s/subst_exp/repl_exp/
</pre>
<tt>subst_exp - is regular expression that can be used to group parts
of the </tt><tt>input
</tt>
<pre style="margin: 0em;">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
</pre>
Can someone provide an example that works with the latest kamailio
please? Also where I can find more docs about dialplan?<br>
<br>
Thank you all<br>
<br>
Alex<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a class="moz-txt-link-freetext" href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
</body>
</html>