<div dir="ltr">Solved. <div><br></div><div><b>^(99888)([0-9]+)$ worked</b>. The issue I had was that I was using this and replacement pattern 99888\2 at the same time not realizing that I was stripping and adding the 99888 at the same time.</div><div><br></div><div>Thanks</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2024 at 11:00 AM <<a href="mailto:spce-user-request@lists.sipwise.com">spce-user-request@lists.sipwise.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Send Spce-user mailing list submissions to<br>
<a href="mailto:spce-user@lists.sipwise.com" target="_blank">spce-user@lists.sipwise.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.sipwise.com/mailman/listinfo/spce-user_lists.sipwise.com" rel="noreferrer" target="_blank">http://lists.sipwise.com/mailman/listinfo/spce-user_lists.sipwise.com</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:spce-user-request@lists.sipwise.com" target="_blank">spce-user-request@lists.sipwise.com</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:spce-user-owner@lists.sipwise.com" target="_blank">spce-user-owner@lists.sipwise.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Spce-user digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Rewrite Rule Set number manipulation question (Edo)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 10 Jul 2024 11:37:01 -0500<br>
From: Edo <<a href="mailto:edo.ekunwe@gmail.com" target="_blank">edo.ekunwe@gmail.com</a>><br>
To: <a href="mailto:spce-user@lists.sipwise.com" target="_blank">spce-user@lists.sipwise.com</a><br>
Subject: [Spce-user] Rewrite Rule Set number manipulation question<br>
Message-ID:<br>
<CAFkRdGuaYL6d_HGLn2NBxNe86k1SrM9Vsr-bV2GMWeSgC=<a href="mailto:0YgQ@mail.gmail.com" target="_blank">0YgQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi All,<br>
<br>
I am looking for examples on the scenario below<br>
<br>
*********************<br>
<br>
I am trying to configure the system to implement tech prefixes for<br>
different products. This is essentially a routing implementation.<br>
<br>
<br>
Scenario:<br>
<br>
<br>
I have 3 flavors of products that can be accessed using peer-specific<br>
prefixes, eg 99222 to product 1, 99555 to product 2 and 99888 to product 3<br>
<br>
<br>
A call comes in from Peer A with 99222e164 number, the incoming filter for<br>
the peer has a line item to accept this call, a fee is applied to this call<br>
then routed to another Peer B for termination. Before it is sent off to<br>
Peer B, the product prefix is stripped off then sent to the terminating<br>
Peer B (who does not know anything about the 99222 prefix but it may also<br>
request a prefix as well) e.g. change 99222e164 to 2114e164 before sending<br>
it to Peer B or just send e164 to Peer B ? I will like to have the<br>
configuration example for both scenarios for sending to Peer B.<br>
<br>
********************<br>
<br>
I know the Rewrite Rule Sets can help me do the number manipulations but<br>
the examples they have are just too overly permissive for me e.g.<br>
^([0-9]+)$ masks for ALL numbers....<br>
<br>
I tried using ^(99888[0-9]+)$ to mask for that particular prefix but do not<br>
know how to strip the first 5 numbers before sending it out. The only<br>
example I have is how to ADD numbers before sending it out like Replacement<br>
pattern "XXXXX\1" adds XXXXX to the front of the number and sends out.. If<br>
I wanted to add the XXXXX to the end of the e164 I do not know how to do<br>
that or if I wanted to strip 99888 from the number then add XXXXX to the<br>
front, I don't know how to do that..<br>
<br>
I also tried ^(99888)([0-9]+)$ with a Replacement pattern of "\2" with no<br>
success, also tried replacement pattern of "99888\2" with no success as<br>
well.<br>
<br>
Any ideas?<br>
<br>
Thanks<br>
<br>
-- <br>
-----<br>
Ekunwe<br>
Tel: 601.497.3932<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20240710/d1b5a1ea/attachment-0001.htm" rel="noreferrer" target="_blank">http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20240710/d1b5a1ea/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com" target="_blank">Spce-user@lists.sipwise.com</a><br>
<a href="http://lists.sipwise.com/mailman/listinfo/spce-user_lists.sipwise.com" rel="noreferrer" target="_blank">http://lists.sipwise.com/mailman/listinfo/spce-user_lists.sipwise.com</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Spce-user Digest, Vol 61, Issue 4<br>
****************************************<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>-----</div>Ekunwe<br>Tel: 601.497.3932<br></div></div>