<div dir="ltr">Hi Edo,<div><br></div><div>Rewriting Rules are the thing to use in cases like this one.</div><div>You can also use some online tools like <a href="https://regex101.com/">https://regex101.com/</a> to tests your regex.</div><div><br></div><div>I think in your case you need something like this:</div><div>match: ^99888([0-9]+)$</div><div>replace: \1</div><div><br></div><div>Cheers</div><div>Marco</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2024 at 6:38 PM Edo <<a href="mailto:edo.ekunwe@gmail.com">edo.ekunwe@gmail.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 dir="ltr">Hi All,<div><br></div><div>I am looking for examples on the scenario below</div><div><br></div><div><div>*********************</div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal">I am trying to configure the system to implement tech prefixes for different products. This is essentially a routing implementation.</p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;min-height:14px"><br></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal">Scenario:</p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;min-height:14px"><br></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal">I have 3 flavors of products that can be accessed using peer-specific prefixes, eg 99222 to product 1, 99555 to product 2 and 99888 to product 3</p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;min-height:14px"><br></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal">A call comes in from Peer A with 99222e164 number, the incoming filter for the peer has a line item to accept this call, a fee is applied to this call then routed to another Peer B for termination. Before it is sent off to Peer B, the product prefix is stripped off then sent to the terminating Peer B (who does not know anything about the 99222 prefix but it may also request a prefix as well) e.g. change 99222e164 to 2114e164 before sending it to Peer B or just send e164 to Peer B — I will like to have the configuration example for both scenarios for sending to Peer B.</p><p></p>********************</div><div><br></div><div><div>I know the Rewrite Rule Sets can help me do the number manipulations but the examples they have are just too overly permissive for me e.g. ^([0-9]+)$ masks for ALL numbers.... </div><div><br></div><div>I tried using ^(99888[0-9]+)$ to mask for that particular prefix but do not know how to strip the first 5 numbers before sending it out. The only example I have is how to ADD numbers before sending it out like Replacement pattern "XXXXX\1" adds XXXXX to the front of the number and sends out.. If I wanted to add the XXXXX to the end of the e164 I do not know how to do that or if I wanted to strip 99888 from the number then add XXXXX to the front, I don't know how to do that..</div><div><br></div></div><div>I also tried ^(99888)([0-9]+)$ with a Replacement pattern of "\2" with no success, also tried replacement pattern of "99888\2" with no success as well.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks</div><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></div></div>
-- <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>
</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><span style="font-size:9px"><br></span></div><span style="font-size:9px">Sipwise GmbH | an Alcatel-Lucent Company<br>Leonard-Bernstein-Straße 10 | 1220 Wien<br><a rel="noopener" href="mailto:gfuchs@sipwise.com" target="_blank">Email: invoice@sipwise.com</a><br>Website: <a href="https://www.sipwise.com" target="_blank">https://www.sipwise.com</a><br><br>Particulars according Austrian Companies Code paragraph 14<br>Geschäftsführer: DI Dr. Gernot Fuchs      Sitz: Wien             FG: Landesgericht Wien              FN: 305595f<br>Die
 übermittelten Informationen sind ausschließlich dem Empfänger 
vorbehalten und können vertrauliches oder privilegiertes Material 
enthalten. Ein Gebrauch, Weiterleitung oder Verbreitung in jeglicher 
Form seitens Dritter ist nicht gestattet. Sollten Sie diese Nachricht 
irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in 
Verbindung zu setzen und die Nachricht einschließlich der Anlagen zu 
löschen. Jegliche nicht autorisierte Nutzung dieser E-Mail ist illegal.<br>Hinweis
 zum Datenschutz: Sipwise GmbH ist der Schutz Ihrer Daten wichtig. Auch 
durch die Kommunikation per E-Mail werden personenbezogene Daten 
ausgetauscht. Erfahren Sie mehr unter: <a rel="noopener" href="http://www.sipwise.com/" target="_blank">www.sipwise.com</a><br><br>Managing Director: DI Dr. Gernot Fuchs     HQ: Vienna       FG: Vienna Regional Court        FN: 305595f<br>Confidentially
 notice. This e-mail transmission may contain legally privileged and/or 
confidential information. Please do not read it if you are not the 
intended recipient(s). Any use, reproduction or disclosure by any other 
person is prohibited. If you have received this e-mail in error, please 
notify the sender and destroy the original transmission and its 
attachments without reading or saving it in any manner. Any unauthorized
 use of this e-mail is illegal.<br>Note on data protection: Sipwise GmbH
 attaches great importance to the protection of your data. Personal data
 is also exchanged through communication by e-mail. Learn more at: <a rel="noopener" href="http://www.sipwise.com/" target="_blank">www.sipwise.com</a></span><br></div></div>