JavaScript API interceptor reference
If you want to use more complicated dial plans than the ones you can set in the Dial plan configuration page, then the built in JavaScript API interceptor is the tool that you are looking for. With it's help you can specify yourself how the calls should be routed.
JavaScript API routing interceptor classes
Below is a summary of the classes of the JavaScript API routing interceptor with their parameters and methods.
Class | Description |
CountryCodeService |
The CountryCodeService class can be used for getting information about the country. |
ExtensionInfoService |
The ExtensionInfoService class is used for getting information about the extension. |
UserInfoService |
The UserInfoService class is used for getting user information. |
The parameters of the classes
Parameter | Description |
CountryCodeService class parameters: | |
Continent | This parameter contains the continent. |
Country | This parameter contains the country. |
CountryPrefix | This parameter contains the prefix of the country. |
TrunkPrefix | This parameter contains the prefix of the area. |
ExitPrefix | This parameter contains the prefix used for calls aimed to abroad. |
Alpha2CountryCode | This parameter contains the two letter code of the country . |
Alpha3CountryCode | This parameter contains the three letter code of the country. |
Language | This parameter contains the language of the country. |
ExtensionInfoService class parameters: | |
ExtensionId | This parameter contains the Id of the extension. |
ExtensionName | This parameter contains the name of the extension. |
ExtensionType | This parameter contains the type of the extension. |
ExtensionConnectionType | This parameter contains the connection type of the extension. |
ExtensionStatus | This parameter contains the status of the extension. |
ExtensionStatusType | This parameter contains the type of the status of the extension. |
ExtensionDescription | This parameter contains the description of the extension. |
ExtensionClientInfo | This parameter contains information about the client of the extension. |
UserInfoService class parameters: | |
Username | This parameter contains the username. |
FullName | This parameter contains the full name. |
PhoneNumber | This parameter contains the phone number. |
MobileNumber | This parameter contains the mobile number. |
EmailAddress | This parameter contains the e-mail address. |
Enabled | This parameter contains a true/false value depending on that the user is enabled or disabled. |
Devices | This parameter contains a list of the devices belonging to the user. |
Just a quick note, every parameter is a simple string, only the 'Devices' parameter is a list of strings.
JavaScript API routing interceptor methods
Method | Description |
CountryCodeService class methods: | |
CountryCodeService.getCountryCodeByCountryPrefix(PhoneNumber) | This method gets the country code by the prefix of the phone number. |
CountryCodeService.getCountryCodeByCountryName(PhoneNumber) | Returns the country code by the name of the country. |
CountryCodeService.getCountryCodeByPhoneNumber(PhoneNumber) | Returns the country code by the phone number. |
ExtensionInfoService class methods: | |
ExtensionInfoService.getExtensions() | This method gets information about the extensions. |
ExtensionInfoService.getExtensionsById(PhoneNumber) | Returns information about the extension by the Id of the call. |
UserInfoService class methods: | |
UserInfoService.getUsers() | This method gets information about the users. |
UserInfoService.getUserById(PhoneNumber) | Returns user information by the Id. |
UserInfoService.getUserByDevice(PhoneNumber) | Returns user information by the Device. |
If you have any questions or need assistance, please contact us at info@ozekiphone.com
More information
- Call class
- Extension class
- Helper class
- OzCamera class
- OzWebClient class for connecting
- Session class
- User class
- Interceptor classes reference