Sorry... a real lack of time.
I will add "port groups" to the "telephony ports" pages so groups can be created from external facing ports.
I hope some day the phones access to "providers" fields change to "trunk groups". So the configuration steps become create a provider, chose/configure which group it belongs, anable the extension to use such groups.
It seems complex but save a lot of time when adding a provider... add it to a trunk group and all extensions anabled on that group magically have it also.
To keep things simple for the casual user you can create a default group, than assign that as default when creating a new provider and also assign the default group to any extension at the time it's configured for the first time.
For failover providers I'm still wondering what the best approach is.
Will soon return to this after testing some dialplans i have built in the past, but however i prefer a group centric approach.
As said privately in the past i have a working COS...
I'm definitely interested. How do you see it integrating? Is it in another page, perhaps under services or is it a new option for each provider? I'd actually prefer it be a separate page so that each provider is not too crowded with options.
I agree. I'm working on a separate page to configure the feature to COS, the main list of available classes and a class specific configuration page where the user can specify allowed and denied patterns. Finally a specific page must exist to handle emergency number and some exceptions. The only field needed on the extension configuration page is used to specify the assigned class.
This xml snipped i used for testing the cos dialplan macro might give you an idea:
<pbxservice>
<cos>
<!-- the enabled key flags if the COS service enabled or not -->
<enabled>1</enabled>
<!-- COS 0 means no restrictions at all, this COS isn't configurable
so doesn't exists in the configuration file. Any new extension defaults to COS 0 -->
<class>
<id>1</id>
<name>Deny International</name>
<descr>Deny International calls</descr>
<!-- deny digits represents a pattern matched at the start of the dialled extension -->
<deny>00</deny>
</class>
<class>
<id>2</id>
<name>Deny Mobile</name>
<descr>Deny Mobile calls</descr>
<deny>3</deny>
</class>
<class>
<id>3</id>
<name>Deny Mobile/International</name>
<descr>Deny both National mobile calls and international calls</descr>
<deny>3</deny>
<deny>00</deny>
</class>
<class>
<id>4</id>
<name>Deny National</name>
<descr>Deny National landline calls, allow local dial</descr>
<deny>0</deny>
<!-- allow digits represents a pattern matched at the start of the dialled extension,
this must be more specific than any deny pattern(s) in the same COS -->
<allow>02</allow>
</class>
<except>
<!-- distinction made for emergency numbers to leave an opportunity
for SoftHangup: SoftHangup(Technology/resource|options) -->
<!-- Any exception configured here apply to all COS but not COS 0 -->
<emergency>112</emergency>
<emergency>113</emergency>
<emergency>115</emergency>
<emergency>118</emergency>
<allow>3341234567</allow>
<deny>166</deny>
</except>
</cos>
</pbxservice>