Dear Panagiotis,<br><br>I tried your sugestions but without result :-(<br>having in my kamailio.cfg this line fo code:<br><br> xlog("----------- The $ruri.user ----------\n");<br> dp_translate("10", "$ruri.user/$ruri.user");<br>
xlog("----------- The $ruri.user ----------\n");<br><br>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 <b style="background-color: rgb(255, 0, 0);">match_exp ^123+ to match_exp ^123.*</b> but still with no success. The prefix match if I call a 7 digit number only in the second case.<br>
<br>Any other suggestions are welcomed.<br><br>Alex<br><br><br><div class="gmail_quote">2009/11/26 Panagiotis Skoulikaritis <span dir="ltr"><<a href="mailto:pskoul@algonet.gr">pskoul@algonet.gr</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div 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<div class="im"><br>
<br>
dpid 10<br>
pr 100<br>
match_op 1<br>
match_exp ^123+<br>
match_len 0<br>
subst_exp ^(123.+)<br></div>
repl_exp 0030\1<br>
<br>
if you want to replace the 123 with the 0030 use the following <br><div class="im">
<br>
dpid 10<br>
pr 100<br>
match_op 1<br>
match_exp ^123+<br>
match_len 0<br>
subst_exp ^(123)(.+)<br></div>
repl_exp 0030\2<br>
<br>
and so on ..<br>
<br>
Regards<br>
<br>
Panagiotis<br>
<br>
alex pappas wrote:
<blockquote type="cite"><div><div></div><div class="h5">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>
</div></div><pre><hr size="4" width="90%">
_______________________________________________
Kamailio (OpenSER) - Users mailing list
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
</div>
</blockquote></div><br>