[Spce-user] Vertical Service Code (star codes)
Steve Saner
ssaner at hubris.net
Wed Apr 25 15:24:26 EDT 2018
On 04/17/2018 12:26 AM, Walter Klomp wrote:
> Hi Steve,
>
> You should be able to change the dial plan in the device to support 2 x
> * … it’s common for quite a few forwarding scenarios, even 3 in case of
> time-out settings.
>
> Warmest Regards,
> Walter
I wanted to follow-up on this thread in case someone else comes across it.
It appears to me that this business of multiple (*) in a VSC is common
in Europe and maybe other locations. But in North America it is not
common at all. And I have been unsuccessful at getting my ATA device to
map a common North American pattern to one that has multiple (*) digits.
While the Sipwise platform does give you the ability to change which
codes mean what in config.yml, it does not give you the ability to
change the pattern in config.yml.
However, I have found that it is fairly easy to make custom config
templates that handle North American patterns. The two templates that I
found that need to be modified are:
/etc/ngcp-config/templates/etc/ngcp-sems/etc/sw_vsc.conf.tt2
/etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.tt2
In both of those templates, regular expressions are used to define dial
patterns. An example from sw_vsc.conf.tt2:
cfu_on_pattern = ^\*[% sems.vsc.cfu_code %]\*[0-9]+$
By simply adding a (?) after the 2nd *, to mean match zero or one * at
that position in the pattern, makes it work for both the European model
and North American model. My change is:
cfu_on_pattern = ^\*[% sems.vsc.cfu_code %]\*?[0-9]+$
Interestingly, this technique is already used for the #72# pattern,
making #72 also a valid pattern:
cfu_off_pattern = ^(\%23)[% sems.vsc.cfu_code %](\%23)?.*$
So far this solution seems to work perfectly. The only downside being a
bit more to consider during an upgrade.
Can anyone think of other problems that this might create? Would there
be any reason not to suggest applying this change to the default templates?
Steve
--
--------------------------------------------------------------------------
Steven Saner <ssaner at hubris.net> Voice: 316-858-3000
Director of Network Operations Fax: 316-858-3001
Hubris Communications http://www.hubris.net
More information about the Spce-user
mailing list