ScopTEL Class of Service Configuration

Module 7 - ScopTEL IP PBX Software - Class of Service Configuration


Class of Service (CoS) | Background


The Class of Service Manager is used to create objects with permissions or restrictions to Outgoing Lines, Incoming Lines, Extensions, Feature Codes, or Applications. These CoS objects can then be applied to Extensions, Incoming Lines, Auto Attendants, Outgoing Lines, or Applications
The Class of Service Manager can be found by navigating to Configuration|Telephony|Manager|Class of Service.
Class of Service objects also control permissions and restrictions which vary depending on whether or not a Hot Desk Extension, Agent Extension, or Room (Hotel) Restriction Feature code has been invoked. For example an extension can have a Class of Service which restricts long distance Outgoing Lines when no Hotdesk Extension is logged but if a valid Hotdesk Extension logs in then the Outgoing Lines access is allowed.
There is no limit on the number of Class of Service objects which can be created. Therefore many CoS objects can be added to create granular security rules which can easily be applied to Outgoing Lines, Incoming Lines, Extensions, Feature Codes, or Applications.
The Class of Service is one of the last objects to be built during a new installation because many pre-requisites are required.
Before a new Extension can be added a CoS must be built so that the CoS can be assigned to the new extension.
Before a non default Feature Code can be created the matching module must be configured.
Before a Feature Code can be included in a CoS the Feature Code must be configured.
Before an Application can be assigned to a CoS the Application must exist. It is therefore more efficient to create any required Applications prior to adding any new CoS objects so that the CoS does not have to be edited more than once.
Before an Outgoing Line can be included in a CoS object the Outgoing Line must already exist.
NOTE: It is best practice to leave Incoming Lines|Options|Class of Service configured to the default “System Default” setting. This is because the PSTN interface also has a “System Default” CoS value and the Incoming Line CoS and the Interface CoS must use matching values else incoming calls will fail. Unique requirements could dictate non default settings. Also choosing a non System Default CoS on an Incoming Line can have serious security implications if not configured correctly.

Class Of Service (CoS) | default CoS

This example shows the ‘default’ Class of Service automatically assigned to any new Extension



Class Of Service (CoS) |Outgoing Lines – Security Principles and LD Usage

Many Outgoing Lines can be created using Dial Plan patterns
Use Prefixes to determine which Outgoing Lines should not be included in another object’s Class of Service Assignment
Use the Outgoing Lines |Banned Prefix section to deny premium services like 1900 1976 809 and then add these Banned Prefixes to any Class of Service
Use Manager |Class of Service |Miscellaneous |Schedule to apply a Class of Service to an existing Scheduler object
Use Manager |Class of Service |Miscellaneous |Set Class of Service by PIN code: [x] to apply PIN codes to a Class of Service
Use Outgoing Lines |Dial String |Authentication/Password to assign Authentication (PIN) codes to Outgoing Lines if required

Custom Dial Plan Rules

Dial String = Matching Pattern.
Access Code Prefix = Outgoing Dial Plan Prefix. This digit is always stripped and never passed to the trunk.
      Note: optionally use this to add an access code like 9 for a PBX or site to site access code.
Number of digit to strip = Number of leading digits stripped from the “Dial String”.
Prefix to add to Number = The digit(s) prefixed to the outgoing call.
Authentication (PIN) can be used to force user authentication before call is sent to the trunk.



Outgoing Lines | Custom Dial Plan Settings

Custom Dial Plan Strings

X matches any digit from 0-9
Z matches any digit form 1-9
N matches any digit from 2-9
[1237-9] matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)
. wildcard, matches one or more characters
! wildcard, matches zero or more characters immediately

Examples

NXXXXXX matches a normal 7 digit telephone number
1NXXNXXXXXX matches an area code and phone number preceded by a one
9011. matches any string of at least five characters that starts with 9011, but it does not match the four-character string 9011 itself.  
# matches a single # key press

Outgoing Lines | North American Dialing Patterns Example:

E.164 number with a leading “+”
10 digits and 1+10 digits for local and long distance call
0+10D call (operator assistant North-America LD call)
01+International NDC (from 8 to 35 digits, operator assistant international call) 011+International call
101+xxxx+NDC call (from 13 to 40 digits, casual dial call) Dial 101 + (Carrier Code) + 1 + (area code) + (number) 211, 311, 411, 511, 611, 711, 811, 911
1-xxx-555-1212
310-xxxx call
Toll Free call 800, 888, 877, …
700
900 and 976 call
0 (operator call)
00 (LD provider operator call)
*67 prefix to suppress outgoing Caller ID using RFC-3323 or RFC-3325


ENUM and E.164 and Long Distance/International Calls:

RFC 6116: ENUM Protocol https://tools.ietf.org/html/rfc6116
This document discusses the use of the Domain Name System (DNS)[RFC1034] [RFC1035] for storage of data associated with E.164 [E.164] numbers, and for resolving those numbers into URIs that can be used (for example) in telephony call setup.  This document also describes how the DNS can be used to identify the services associated with an E.164 number.  This document includes a Dynamic Delegation Discovery System (DDDS) Application specification, as detailed in the document series described in [RFC3401].  This document obsoletes [RFC3761].
E.164 https://www.itu.int/rec/T-REC-E.164-201011-I/en defines a general format for international telephone numbers. Plan-conforming numbers are limited to a maximum of 15 digits, excluding the international call prefix. The presentation of a number is usually prefixed with the plus sign (+), indicating that the number includes the country calling code. When dialing, the number must typically be prefixed with the appropriate international call prefix (in place of the plus sign), which is a trunk code to reach an international circuit from within the country of call origination.
A good reference to International Country Codes can be found at https://countrycode.org/
E.164 formatting:
A telephone number can have a maximum of 15 digits
The first part of the telephone number is the country code (one to three digits)
The second part is the national destination code (NDC)
The last part is the subscriber number (SN)
The NDC and SN together are collectively called the national (significant) number

Feature Code Block Caller ID | Privacy *67

In order to customize *67 Privacy you must disable the *67 feature code and create customized Outgoing Lines using the *67 Prefix
Navigate to Configuration Telephony|Features Code and remove the *67 feature code from the Block Caller ID field



About Group ID’s

Entered in the form of an integer. Example: 1
The Group ID allows the same Dial String to be shared by multiple Trunks. And also allow for various Dial String, Dial Options, Caller ID optimizations per tenant. Example:
Tenant = customerabc Name = customerabcX.
Group ID = 1
Trunk = VoIP Interface 5551234 Dial String = X.
Prefix to add to Number =

Tenant = customerxyz Name = customerxyzX.
Group ID = 2
Trunk = VoIP Interface 5552234 Dial String = X.
Prefix to add to Number = 1

Creating both of these Outgoing Line objects will allow either Outgoing Line to be included in a tenant's Class of Service|Outgoing Lines Example:
Tenant = customerabc|Class of Service = default
Outgoing Line = customerabcX. (Group 1)

Tenant = customerxyz|Class of Service = default Outgoing Line = customerxyzX. (Group 2)

Usage:
An extension belonging to tenant customerabc dialing 5551212 will select from trunk 5551234 and pass digits 5551234 to the trunk
An extension belong to tenant customerxyz dialing 5551212 will select from trunk 5552234 and pass digits 15551212 to the trunk

Outgoing Lines | *67NXXNXXXXXX!

Click on Add a new Outgoing Line
On the General tab you must name the Outgoing Line
You will have to create many Outgoing Lines with custom Dial Strings
Name must be descriptive and you will add these Outgoing Lines to Class of Service objects so extensions can have access to these Outgoing Lines
This example uses *67NXXNXXXXXX! For local North American dialing
This example also uses example Group ID 1 as will all other examples
You must select your Bell Canada Trunks using the drop list for Multiple Trunks (VoIP Account) and choose both bellprimarysbc and bellsecondarysbc trunks using the select button.  This will allow the Outgoing Line to failover to the Secondary SBC if an INVITE to the Primary SBC fails.  The arrow buttons are used to increase or decrease priority of the trunk.  The bellprimarysbc must be set with the highest priority.
Click on the Dial String tab when done



For Type use the drop list to select Custom Dial String
Enter the text *67NXXNXXXXXX!
Number of digit to strip = 3 (this will strip *67 from the dialed digits passed to the Trunk)
Click on the Caller ID tab when done



Edit Line *67NXXNXXXXXX!
Change the Name to  *671NXXNXXXXXX!
Click on the Dial String tab




Change the Dial String to *671NXXNXXXXXX!
Number of digit to strip 4
Stripping 4 digits will strip *671 from the dialed digits
Prefix to add to number: +1
Will add +1 prefix to the wild card pattern NXXNXXXXXX! And send all digits to the trunk in E.164 format
Example: Dialed digits *6719055551234 will be passed to the trunk as +19055551234 and the resulting Caller ID outbound will be Anonymous
Click on Copy when done



Outgoing Lines | *67tollfree

Edit Line *67NXXNXXXXXX!
Change the Name to  *67tollfree
Click on the Dial String tab



Change the Dial String Type to Dial String
From the Dial String Drop List select 
      Toll Free (1-800/844/855/866/877/888)
Access Code (Prefix) *67
      (Access Codes are always stripped)
Click on Copy when done



Lines | Banned Prefixes

In order to allow wild card patterns but also block specific prefixes such as Premium numbers like 1900 1976 you need to create one or more Banned Prefix options
To create a Banned Prefix object go to Lines|Banned Prefix and Click on Add a new Banned Prefix 


Name the Banned Prefix

In the Prefix text field you can enter an ASCII list of prefixes separated by a space which you can include later in your Class of Service(s) applied to each Extension/Application/Auto Attendant etc…
This text example includes a list of commonly used premium prefixes and the overrides often used to defraud a system.
Example:
1976 1900 *671976 *671900 01976 01900 0011
Once you have configured your Prefix list click on the Destination tab


















Configure the Destination as desired; this document will set the destination to Congestion.
Click Add when done
You will apply the Banned Prefix to your Class of Service(s) later.



Outgoing Lines | 1NXXNXXXXXX!

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line 1NXXNXXXXXX!
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String




Change the Type to Custom Dial String
Change the Dial String to 1NXXNXXXXXX!
Number of digit to strip 1
      Stripping 1 digit will strip 1 from the dialed digits
Prefix to add to number: +1
      Will add +1 prefix to the wild card pattern NXXNXXXXXX! And send all digits to the trunk in E.164 format
      Example: Dialed digits 19055551234 will be passed to the trunk as +19055551234 
Click on the Caller ID tab



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | NXXNXXXXXX!

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line NXXNXXXXXX!
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String




Change the Type to Custom Dial String
Change the Dial String to NXXNXXXXXX!
Click on the Caller ID tab



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done




Outgoing Lines | tollfree

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line tollfree
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Dial String
Change the Dial String to Toll Free (1-800/844/855/866/877/888)
Click on the Caller ID tab



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done




Outgoing Lines | 011X.

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line 011X.
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Custom Dial String
Change the Dial String to 011X.
Click on the Caller ID tab



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | operatorassisted

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line operatorassisted
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Custom Dial String (Multiple)

Enter each Dial String separated by a carriage return
0011X.
01976XXXXXXX!
01900XXXXXXX!
01NXXNXXXXXX!
00
0
WARNING: operatorassisted calls can incur a high cost and care should be taken before allowing this Outgoing Line in a Class of Service.  Including this Outgoing Line in a Class of Service is NOT recommended on an business class PBX!
Click on the Caller ID tab




Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | casualdial

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line casualdial
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Custom Dial String
Change the Dial String to 101XXXX[01]XXXXXXX!
Click on Caller ID



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | carrierservices

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line carrierservices
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Custom Dial String
Change the Dial String to [2-8]11
Click on the Caller ID tab
NOTE: To avoid dial plan conflict you cannot have any local extensions which match the following extension numbers:
211
311
411
511
611
711 (this includes parking lots)
811
This can be avoided simply by making all local extensions and parking extensions 4 digits in length or longer



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | premiumservices

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line premiumservices
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
WARNING: premiumservices can incur a high cost and care should be taken before allowing this Outgoing Line in a Class of Service.  Including this Outgoing Line in a Class of Service is NOT recommended on an business class PBX!
Click on Dial String



Change the Type to Custom Dial String (Multiple)

Enter the following text into the Dial String separating each entry with a carriage return
      1976XXXXXXX!
      1900XXXXXXX!



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Outgoing Lines | businessservices

Go to Outgoing Lines and Click on Add a new Outgoing Line
Name the Line businessservices
Change the Group ID to 1
Change the Trunk to Multiple Trunks
Include both SIP Interfaces using the Select button
Click on Dial String



Change the Type to Custom Dial String
Enter the Dial String 310XXXX!



Check the box to Enable Presentation indicator and select the Presentation Allowed, Passed Screen option
The Caller ID Number and Caller Name options are generic options and aren’t mandatory.  They are not mandatory because each Extension can override the Outgoing Caller ID of the Outgoing Line using each Extension’s Caller ID tab.  However if each extension will send the same Outgoing Name and Number then these fields should be filled in on Each Outgoing Line.
Click on Add when done



Emergency Lines

Emergency Lines allow multiple actions to occur when an Extension dials 911 or any other number required to dial Emergency Services
Possible Actions include:
Play a Message(s) to one or more extensions • Bridge Extension(s) to the caller
      Description: Conference another extension such as a security position once the Emergency Call is established by the caller.
Page and Announce
      Description: Page one or more extensions including any extension supporting Multicast relay.
Email
      Description: Record the phone call and email a copy of the call to a preconfigured email address(es).
SMS
It is also possible to customize per Extension the Outgoing Caller ID Name and Number when the Emergency Line is dialed. TIP: Edit Extension|Caller ID tab.

Before Emergency Lines can be created you must enable the module in Telephony Modules and Save your change.




Emergency Lines | Add a new Line

Navigate to Lines|Emergency Lines
Add a new Line



Emergency Lines | Options

Emergency Number default is 911
This is the digits dialed by the extension or application to execute the Emergency Call
Number to Dial are the actual digits sent to the Trunk (in case any special prefix or dialed digits are required). Default: 911
Once these requirements are satisfied (defaults should be sufficient) click on the Options tab



Trunk: select Multiple Trunks and use the Select button to include the Trunks
The Record all Outgoing call option is optional and disabled by default.  But in this example it is enabled.
Once complete click on the Notification tab if you want to complete the optional step of adding Notification options.



Emergency Lines | Notification

Trunk: select Multiple Trunks and use the Select button to include the Trunks
The Record all Outgoing call option is optional and disabled by default.  But in this example it is enabled.
Once complete click on the Notification tab if you want to complete the optional step of adding Notification options.
Click on Add when you have completed all required Notification Actions



Manager | Class of Service

Go to Manager|Class of Service
You will see a Class of Service|default for each tenant which by default allows all Services, Applications, Outgoing Lines
It is recommended you Edit the default Class of Service so that each Class of Service so that each Outgoing Line can be re-ordered into the correct priority.  Some Class of Service objects should not be included based on individual security concerns i.e.… premiumservices should not be included if extensions and or applications should be disallowed from calling these services.



Class of Service | Outgoing Lines

Edit the Class of Service and click on Outgoing Lines
Uncheck the Enable All Outgoing Lines option.
Click on the Select button to start adding Outgoing Lines to the allowed list.
NOTE: Class of Service uses digit pattern matching to match the most explicit pattern match first.  It is critical to ensure that the order in which Outgoing Lines is prioritized using the up and down arrows after adding Outgoing Lines to the list.



CoS | Emergency Lines

Use the Drop List selector to choose Emergency Lines
On the left side column click to highlight 911 (911) and use the >> button to add to the right column
Click OK
This ensures that 911 pattern matches will always be matched first



CoS | Outgoing Lines

Use the Select button again to add additional Outgoing Lines to the Allow



Enable Banned Prefix List to include by checking the premiumnumbersbannedprefixes (default) box.
Click on Add when done



Extensions | Class of Service

By default all Extensions are assigned Class of Service default
This means that by default all Extensions will have the Outgoing Lines, Services, Applications that were previously applied to the default Class of Service object.  Therefore any additional modifications to the default Class of Service will be automatically applied to any other Telephony object which is already assigned the default Class of Service
Unlimited additional Class of Service objects can be created and may be assigned to Extensions, Applications, Outgoing Lines etc… at any time


Class Of Service (CoS) |Editing using the Select Tool

The Select tool is visible whenever you edit the Class of Service’s Services, Applications, Local Extensions, Outgoing Lines tabs
From the column on the left showing the available object(s) highlight the required object(s)using a mouse and then click >> to assign those objects to the column on the right. Click on the “OK” button to close this window. Only objects listed on the right will be available whenever this Class of Service is applied anywhere in the GUI where a CoS can be selected.
Use this process for Applications, Local Extensions, Outgoing Lines, only listing objects that will comply with your desired security policies.



Class Of Service (CoS) |Outgoing Line precedence

After selecting which Outgoing Line objects are allowed it is imperative to select the Outgoing Lines in the correct order of precedence.
Outgoing Lines are matched when dialed according to the precedence defined in the configured CoS object in top to bottom priority. Items at the top if matched will be immediately passed to the dial plan running in memory.
The most specific entry and most important dial plan matches should be placed in the highest priority at the top of the list.
By example a Outgoing Line equal to 1NXXNXXXXXX! should have a lower priority than a dial plan equal to 1800NXXXXXX! Else that rule would be matched and dialed first before querying the next possible match. This can affect which trunk is accessed or LCR rule is used to place the outgoing call.



CoS | Outgoing Lines | Precedence | Recommendations

This is the recommended order/priority of Outgoing Lines
NOTE: that premiumservices and operatorassisted and casualdial Outgoing Lines have not been included.  Excluding those Outgoing Lines from the CoS removes those prefixes from the default CoS. However as an additional security measure click on the Miscellaneous tab.



CoS | Outgoing Lines | Banned Prefixes

Enable Banned Prefix List to include by checking the premiumnumbersbannedprefixes (default) box.
Click on Add when done




    • Related Articles

    • ScopTEL IP PBX Software - Vegastream Analog Gateway Configuration

      FXO interfaces Also known as POTS line (Plain Old Telephone Service). Also known as 1fl (1 family line). Each FXO line can support one conversation between two parties (Tx and Rx Transmit and Receive). Most business use ‘equivalent lines’ placed into ...
    • Module 19 - ScopTEL IP PBX Software - Quality-of-Service-Training

      The use of IP as a foundation for converged networks has raised several issues for both enterprise IT departments and ISPs.  IP and Ethernet are connectionless technologies and do not guarantee bandwidth. The protocol will not differentiate network ...
    • Module 6 - ScopTEL IP PBX Software - Incoming Lines Management

      Incoming Lines | Background Information Incoming Lines types are typically: “Extension (DNIS)” which are received numbers from SIP/IAX2 or PRI trunks. “Block” (a configured list of DNIS numbers).  DNIS (Dialed Number Information Service). The service ...
    • Enable Instant Messaging (XMPP) Service on ScopTEL PBX

      We will look at how to setup an Instant Messaging server on ScopTEL PBX using a free and open source XMPP based IM server. Openfire is a real time collaboration (RTC) server dual-licensed under the Open Source GPL and commercially. It uses the only ...
    • ScopTEL IP PBX Software - Basic Installation Hierarchy for Telephony Server

      Basic Installation Hierarchy for Telephony Server Therefore the purpose of this document is to provide a visual walkthrough of a very basic but functional installation for one tenant. This tutorial does not include an overview of the overall network ...