From f170f2185d69db20eedfe76bb6cc07df4eb48c72 Mon Sep 17 00:00:00 2001 From: Edoardo Spadoni Date: Tue, 18 Nov 2025 10:13:54 +0100 Subject: [PATCH] feat: expose feature_codes in proxy --- lib/astproxy.js | 1 + lib/proxy_logic_13/proxy_logic_13.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib/astproxy.js b/lib/astproxy.js index f51aad0..84dab8e 100644 --- a/lib/astproxy.js +++ b/lib/astproxy.js @@ -640,5 +640,6 @@ exports.queueRecallingManager = queueRecallingManager; exports.CF_TYPES = CF_TYPES; exports.getExtensions = proxyLogic.getExtensions; exports.getQueues = proxyLogic.getQueues; +exports.getFeatureCodes = proxyLogic.getFeatureCodes; exports.call = proxyLogic.call; exports.EVENTS = EVENTS; diff --git a/lib/proxy_logic_13/proxy_logic_13.js b/lib/proxy_logic_13/proxy_logic_13.js index 9c2a7c3..b08ea47 100644 --- a/lib/proxy_logic_13/proxy_logic_13.js +++ b/lib/proxy_logic_13/proxy_logic_13.js @@ -1278,6 +1278,21 @@ function getPickupCode() { } } +/** + * Return all the asterisk feature codes. + * + * @method getFeatureCodes + * @return {object} The asterisk feature codes object. + * @static + */ +function getFeatureCodes() { + try { + return featureCodes; + } catch (err) { + logger.error(IDLOG, err.stack); + } +} + /** * Set the initial trunks list read from JSON configuration file. * @@ -10288,6 +10303,7 @@ exports.recordAudioFile = recordAudioFile; exports.redirectParking = redirectParking; exports.getExtenCfValue = getExtenCfValue; exports.setFeatureCodes = setFeatureCodes; +exports.getFeatureCodes = getFeatureCodes; exports.getExtenCfbValue = getExtenCfbValue; exports.getExtenCfuValue = getExtenCfuValue; exports.EVT_EXTEN_HANGUP = EVT_EXTEN_HANGUP;