<div dir="ltr">Still no luck. <div><br></div><div>when i add <span style="color:black;font-family:"Courier New";font-size:10pt">repl_exp = \1</span><div><br></div><div>i get this</div><div><br></div><div>Jun 5 12:13:04 [12250] DBG:dialplan:dp_translate_f: input is 7705557867129454<br>Jun 5 12:13:04 [12250] DBG:dialplan:dp_translate_f: no information available for dpid 17<br></div><div><br></div><div>DBG:sl:sl_reply_error: error text is Bad URI (475/SL)<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 5, 2024 at 10:04 AM Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg1763487511799252685">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_7266489831648704288WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">There’s a few issues.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">1. You are missing a “.” in your match_exp. The way you have it written will only match repeating digit 5 after the prefix.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">2. Your subst_exp is too greedy. The wildcards in the first grouping will make that grouping match the whole string, and there will be nothing left for the second grouping (or it won’t match at all because
of the + in the second grouping, not sure). If you are trying to match a fixed-string prefix you don’t need wildcards for that. You also don’t need to capture that grouping, since you aren’t using it in the replace.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Try this:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<pre><span style="color:black">dpid = 17<u></u><u></u></span></pre>
<pre><span style="color:black">pr = 0<u></u><u></u></span></pre>
<pre><span style="color:black">match_op = 1<u></u><u></u></span></pre>
<pre><span style="color:black">match_exp = ^770555.+<u></u><u></u></span></pre>
<pre><span style="color:black">match_flags = 0<u></u><u></u></span></pre>
<pre><span style="color:black">subst_exp = ^770555(.+)<u></u><u></u></span></pre>
<pre><span style="color:black">repl_exp = \1<u></u><u></u></span></pre>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:black">Ben Newlin</span><span style="font-size:11pt"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div id="m_7266489831648704288mail-editor-reference-message-container">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of morris edery <<a href="mailto:morrisedery@gmail.com" target="_blank">morrisedery@gmail.com</a>><br>
<b>Date: </b>Wednesday, June 5, 2024 at 12:48 AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>[OpenSIPS-Users] Strip prefix<u></u><u></u></span></p>
</div>
<div>
<div>
<div>
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:1pt solid rgb(182,0,0);background:white;padding:0.75pt">
<p class="MsoNormal"><b><span style="font-size:12pt;font-family:Calibri,sans-serif;color:rgb(182,0,0)"> EXTERNAL EMAIL - Please use caution with links and attachments <u></u><u></u></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:Helvetica"><u></u> <u></u></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12pt;font-family:Helvetica">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal"><span style="font-size:12pt">Hello Team, im trying to strip a prefix with dialplan from a number and from some reason have no success on that , please tell me what im doing wrong ? below <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">opensips 2.4.8<u></u><u></u></span></p>
<div>
<pre><span style="color:black">dpid = 17<u></u><u></u></span></pre>
<pre><span style="color:black">pr = 0<u></u><u></u></span></pre>
<pre><span style="color:black">match_op = 1<u></u><u></u></span></pre>
<pre><span style="color:black">match_exp = ^770555+<u></u><u></u></span></pre>
<pre><span style="color:black">match_flags = 0<u></u><u></u></span></pre>
<pre><span style="color:black">subst_exp = ^(*770555*)(.+)<u></u><u></u></span></pre>
<pre><span style="color:black">repl_exp = \2<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">need to remove 770555<u></u><u></u></span></pre>
<pre><span style="color:black">on cfg file <u></u><u></u></span></pre>
<div>
<div>
<pre style="line-height:14.25pt;background:rgb(39,40,34)"><span style="font-size:10.5pt;font-family:Consolas;color:rgb(248,248,242)"> if (dp_translate(</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(230,219,116)">"17"</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(248,248,242)">, </span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(230,219,116)">"$rU/$rU"</span><span style="font-size:10.5pt;font-family:Consolas;color:rgb(248,248,242)">)){ } <u></u><u></u></span></pre>
</div>
</div>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">Thanks<u></u><u></u></span></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote></div>