[Spce-user] Rewrite Rule Set number manipulation question
Edo
edo.ekunwe at gmail.com
Wed Jul 10 12:37:01 EDT 2024
Hi All,
I am looking for examples on the scenario below
*********************
I am trying to configure the system to implement tech prefixes for
different products. This is essentially a routing implementation.
Scenario:
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
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.
********************
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....
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..
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.
Any ideas?
Thanks
--
-----
Ekunwe
Tel: 601.497.3932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20240710/d1b5a1ea/attachment.htm>
More information about the Spce-user
mailing list