Startseite » Number manipulation via CSR (Call Setup Rules)

Number manipulation via CSR (Call Setup Rules)

by enricojost

Hello,

Our customer in China presented us with a complex task involving their PSTN carrier. They provided a huge list of mobile numbers, specifying that these should not have a „national zero“ added. All other local targets should include this zero:

My initial strategy was to configure manipulation rules for all provided numbers. These should take place before the „normal“ manipulations towards the carrier. As we were dealing with an ISDN carrier, the GW-application was also involved.

Unfortunately, this approach was crashed by the sheer volume of numbers in the customer’s Excel sheet. Meeting the requirement to treat these numbers differently meant the creation of hundreds of individual manipulation rules. And this would have been out of technical dimensions of this device.

Collaborating with a colleague, we went for a different approach:

We consolidated all defined numbers from the customer using ChatGPT. This was straightforward and no issue in terms of GDPR or so, as the provided list was publicly known.

Then we configured a dial-plan with these consolidated number ranges. The dial-plan can handle up to 2000 entries and we ended up with 860ish entries:

Since the customer uses AudioCodes Routing Manager (ARM) on a SIP Interface level, we configured a new CSR Set for the SIP interface on ingress leg:

Within this Call Setup Rule Set, two crucial rules were implemented:

If a called number (destination user) matches the dial-plan, remove the country prefix and only insert the remaining digits into the TO and RURI headers.

Removing the country prefix was a simple regex-task which would match $1 and $2, while we only add $2 at the end.

The IP2TEL (GW) manipulations for the destination were all based on +86 as the prefix. Therefore, none of these manipulations would be applied and add any unwanted 0 to our target… or strip of what was already stripped by CSR.

This demonstrates how you can separately handle a large set of numbers besides „normal manipulations“ by utilising the dial-plan combined with Call Setup Rules, and, in our specific case, ChatGPT.

Cheers,
Enrico

You may also like