Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endpoints. added nethlink endpoint #307

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ function setCompUtil(comp) {
var extenAgent = compAstProxy.getExtensionAgent(result.endpoints[compUser.ENDPOINT_TYPES.extension][i].id);
var actions = {};
if (result.endpoints[compUser.ENDPOINT_TYPES.extension][i].type === 'webrtc' ||
result.endpoints[compUser.ENDPOINT_TYPES.extension][i].type === 'mobile') {
result.endpoints[compUser.ENDPOINT_TYPES.extension][i].type === 'mobile' ||
result.endpoints[compUser.ENDPOINT_TYPES.extension][i].type === 'nethlink') {

actions.answer = true;
actions.dtmf = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @class EndpointExtension
* @param {string} identifier The extension identifier
* @param {object} data
* @param {string} data.type The type of the extension ("physical" | "webrtc" | "mobile")
* @param {string} data.type The type of the extension ("physical" | "webrtc" | "mobile" | "nethlink")
* @param {string} [data.web_user] The username of the physical phone to be used to invoke HTTP apis
* @param {string} [data.web_password] The password of the physical phone to be used to invoke HTTP apis
* @param {string} [data.username] The username of the sip extension. It is present with webrtc type
Expand All @@ -17,7 +17,7 @@
exports.EndpointExtension = function(identifier, data) {
// check the parameter
if (typeof identifier !== 'string' || typeof data !== 'object' ||
(data.type !== 'physical' && data.type !== 'webrtc' && data.type !== 'mobile')) {
(data.type !== 'physical' && data.type !== 'webrtc' && data.type !== 'mobile' && data.type !== 'nethlink')) {

throw new Error('wrong parameters: ' + JSON.stringify(arguments));
}
Expand Down Expand Up @@ -182,7 +182,7 @@ exports.EndpointExtension = function(identifier, data) {
type: type
};

if (type === 'webrtc' || type === 'mobile') {
if (type === 'webrtc' || type === 'mobile' || type === 'nethlink') {
obj.secret = sipPassword;
obj.username = sipUser;
}
Expand Down Expand Up @@ -218,7 +218,8 @@ exports.EndpointExtension = function(identifier, data) {
const TYPES = {
physical: 'physical',
webrtc: 'webrtc',
mobile: 'mobile'
mobile: 'mobile',
nethlink: 'nethlink',
};

exports.TYPES = TYPES
Expand Down
Loading