Feature 7050: Some Vendorextensions replaced by using prefixinfo (prefixrange and facilityaction)

This commit is contained in:
Hemlata 2022-01-26 12:15:58 +00:00 committed by Amin Ben Ramdhane
parent 1fb18da748
commit a7fa6dd491
4 changed files with 136 additions and 247 deletions

View file

@ -217,14 +217,14 @@ static int browseServicesVoiceServiceCallControlOutgoingMapInst(struct dmctx *dm
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.!UCI:asterisk/tel_advanced/dmmap_asterisk*/
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.!UCI:asterisk/numberingplan/dmmap_asterisk*/
static int browseServicesVoiceServiceCallControlNumberingPlanInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
{
char *inst = NULL;
struct dmmap_dup *p = NULL;
LIST_HEAD(dup_list);
synchronize_specific_config_sections_with_dmmap("asterisk", "tel_advanced", "dmmap_asterisk", &dup_list);
synchronize_specific_config_sections_with_dmmap("asterisk", "numberingplan", "dmmap_asterisk", &dup_list);
list_for_each_entry(p, &dup_list, list) {
inst = handle_instance(dmctx, parent_node, p->dmmap_section, "numberingplaninstance", "numberingplanalias");
@ -236,6 +236,25 @@ static int browseServicesVoiceServiceCallControlNumberingPlanInst(struct dmctx *
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.PrefixInfo!UCI:asterisk/prefixinfo/dmmap_asterisk*/
static int browseServicesVoiceServiceCallControlNumberingPlanPrefixInfo(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
{
char *inst = NULL;
struct dmmap_dup *p = NULL;
LIST_HEAD(dup_list);
synchronize_specific_config_sections_with_dmmap("asterisk", "prefixinfo", "dmmap_asterisk", &dup_list);
list_for_each_entry(p, &dup_list, list) {
inst = handle_instance(dmctx, parent_node, p->dmmap_section, "prefixinfoinstance", "prefixinfoalias");
if (DM_LINK_INST_OBJ(dmctx, parent_node, (void *)p, inst) == DM_STOP)
break;
}
free_dmmap_config_dup_list(&dup_list);
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.!UCI:asterisk/calling_features/dmmap_asterisk*/
static int browseServicesVoiceServiceCallControlCallingFeaturesSetInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance)
{
@ -455,6 +474,18 @@ static int delObjServicesVoiceServiceCallControlNumberingPlan(char *refparam, st
return 0;
}
static int addObjServicesVoiceServiceCallControlNumberingPlanPrefixInfo(char *refparam, struct dmctx *ctx, void *data, char **instance)
{
BBF_DEBUG("VoiceService.1.CallControl.NumberingPlan.PrefixInfo cant be added or deleted\n");
return 0;
}
static int delObjServicesVoiceServiceCallControlNumberingPlanPrefixInfo(char *refparam, struct dmctx *ctx, void *data, char *instance, unsigned char del_action)
{
BBF_DEBUG("VoiceService.1.CallControl.NumberingPlan.PrefixInfo can't be added or deleted\n");
return 0;
}
static int addObjServicesVoiceServiceCallControlCallingFeaturesSet(char *refparam, struct dmctx *ctx, void *data, char **instance)
{
struct uci_section *dmmap = NULL;
@ -1040,10 +1071,10 @@ static int get_ServicesVoiceServiceCallControlExtension_CallStatus(char *refpara
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.InterDigitTimerStd!UCI:asterisk/tel_advanced,tel_options/interdigit*/
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.InterDigitTimerStd!UCI:asterisk/numberingplan/interdigitstdmsec*/
static int get_ServicesVoiceServiceCallControlNumberingPlan_InterDigitTimerStd(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_option_value_fallback_def("asterisk", "tel_options", "interdigit", "15000");
*value = dmuci_get_option_value_fallback_def("asterisk", "numberingplan", "interdigitstdmsec", "15000");
return 0;
}
@ -1055,7 +1086,7 @@ static int set_ServicesVoiceServiceCallControlNumberingPlan_InterDigitTimerStd(c
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value("asterisk", "tel_options", "interdigit", value);
dmuci_set_value("asterisk", "numberingplan", "interdigitstdmsec", value);
break;
}
return 0;
@ -1124,6 +1155,72 @@ static int set_ServicesVoiceServiceCallControlNumberingPlan_MaximumNumberOfDigit
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.PrefixInfo.{i}.Enable!UCI:asterisk/prefixinfo,@i-1/prefixenable*/
static int get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "prefixenable", "0");
return 0;
}
static int set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
bool b;
switch (action) {
case VALUECHECK:
if (dm_validate_boolean(value))
return FAULT_9007;
break;
case VALUESET:
string_to_bool(value, &b);
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "prefixenable", b ? "1" : "0");
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.PrefixInfo.{i}.PrefixRange!UCI:asterisk/prefixrange,@i-1/prefixrange*/
static int get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_PrefixRange(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_value_by_section_string(((struct dmmap_dup *)data)->config_section, "prefixrange", value);
return 0;
}
static int set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_PrefixRange(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "prefixrange", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.PrefixInfo.{i}.FacilityAction!UCI:asterisk/prefixinfo,@i-1/facilityaction*/
static int get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_FacilityAction(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_value_by_section_string(((struct dmmap_dup *)data)->config_section, "facilityaction", value);
return 0;
}
static int set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_FacilityAction(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "facilityaction", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CallWaitingEnable!UCI:asterisk/calling_features/call_waiting_enable*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CallWaitingEnable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
@ -1494,7 +1591,7 @@ DMOBJ tServicesVoiceServiceCallControlObj[] = {
{"Line", &DMWRITE, addObjServicesVoiceServiceCallControlLine, delObjServicesVoiceServiceCallControlLine, NULL, browseServicesVoiceServiceCallControlLineInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlLineParams, get_voice_service_line_linker, BBFDM_BOTH, LIST_KEY{"DirectoryNumber", "Alias", NULL}},
{"IncomingMap", &DMWRITE, addObjServicesVoiceServiceCallControlIncomingMap, delObjServicesVoiceServiceCallControlIncomingMap, NULL, browseServicesVoiceServiceCallControlIncomingMapInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlIncomingMapParams, get_voice_service_callcontrol_linker, BBFDM_BOTH, LIST_KEY{"Line", "Extension", "Alias", NULL}},
{"OutgoingMap", &DMWRITE, addObjServicesVoiceServiceCallControlOutgoingMap, delObjServicesVoiceServiceCallControlOutgoingMap, NULL, browseServicesVoiceServiceCallControlOutgoingMapInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlOutgoingMapParams, get_voice_service_callcontrol_linker, BBFDM_BOTH, LIST_KEY{"Extension", "Line", "Alias", NULL}},
{"NumberingPlan", &DMWRITE, addObjServicesVoiceServiceCallControlNumberingPlan, delObjServicesVoiceServiceCallControlNumberingPlan, NULL, browseServicesVoiceServiceCallControlNumberingPlanInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlNumberingPlanParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", NULL}},
{"NumberingPlan", &DMWRITE, addObjServicesVoiceServiceCallControlNumberingPlan, delObjServicesVoiceServiceCallControlNumberingPlan, NULL, browseServicesVoiceServiceCallControlNumberingPlanInst, NULL, NULL, tServicesVoiceServiceCallControlNumberingPlanObj, tServicesVoiceServiceCallControlNumberingPlanParams, NULL, BBFDM_BOTH, LIST_KEY{"Alias", NULL}},
{"CallingFeatures", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallControlCallingFeaturesObj, NULL, NULL, BBFDM_BOTH},
{"Group", &DMWRITE, addObjServicesVoiceServiceCallControlGroup, delObjServicesVoiceServiceCallControlGroup, NULL, browseServicesVoiceServiceCallControlGroupInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlGroupParams, get_voice_service_callcontrol_linker, BBFDM_BOTH},
{"Extension", &DMWRITE, addObjServicesVoiceServiceCallControlExtension, delObjServicesVoiceServiceCallControlExtension, NULL, browseServicesVoiceServiceCallControlExtensionInst, NULL, NULL, NULL, tServicesVoiceServiceCallControlExtensionParams, get_voice_service_callcontrol_linker, BBFDM_BOTH, LIST_KEY{"ExtensionNumber", NULL}},
@ -1555,6 +1652,12 @@ DMLEAF tServicesVoiceServiceCallControlExtensionParams[] = {
};
/* *** Device.Services.VoiceService.{i}.CallControl.NumberingPlan. *** */
DMOBJ tServicesVoiceServiceCallControlNumberingPlanObj[] = {
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
{"PrefixInfo", &DMWRITE, addObjServicesVoiceServiceCallControlNumberingPlanPrefixInfo, delObjServicesVoiceServiceCallControlNumberingPlanPrefixInfo, NULL, browseServicesVoiceServiceCallControlNumberingPlanPrefixInfo, NULL, NULL, NULL, tServicesVoiceServiceCallControlNumberingPlanPrefixInfoParams, NULL, BBFDM_BOTH},
{0}
};
DMLEAF tServicesVoiceServiceCallControlNumberingPlanParams[] = {
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
{"InterDigitTimerStd", &DMWRITE, DMT_UNINT, get_ServicesVoiceServiceCallControlNumberingPlan_InterDigitTimerStd, set_ServicesVoiceServiceCallControlNumberingPlan_InterDigitTimerStd, BBFDM_BOTH},
@ -1565,6 +1668,15 @@ DMLEAF tServicesVoiceServiceCallControlNumberingPlanParams[] = {
{0}
};
/* *** Device.Services.VoiceService.{i}.CallControl.NumberingPlan.{i}.PrefixInfo. *** */
DMLEAF tServicesVoiceServiceCallControlNumberingPlanPrefixInfoParams[] = {
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
{"Enable", &DMWRITE, DMT_BOOL, get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_Enable, set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_Enable, BBFDM_BOTH},
{"PrefixRange", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_PrefixRange, set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_PrefixRange, BBFDM_BOTH},
{"FacilityAction", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_FacilityAction, set_ServicesVoiceServiceCallControlNumberingPlanPrefixInfo_FacilityAction, BBFDM_BOTH},
{0}
};
/* *** Device.Services.VoiceService.{i}.CallControl.CallingFeatures. *** */
DMOBJ tServicesVoiceServiceCallControlCallingFeaturesObj[] = {
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/

View file

@ -20,6 +20,8 @@ extern DMLEAF tServicesVoiceServiceCallControlOutgoingMapParams[];
extern DMLEAF tServicesVoiceServiceCallControlGroupParams[];
extern DMLEAF tServicesVoiceServiceCallControlExtensionParams[];
extern DMLEAF tServicesVoiceServiceCallControlNumberingPlanParams[];
extern DMOBJ tServicesVoiceServiceCallControlNumberingPlanObj[];
extern DMLEAF tServicesVoiceServiceCallControlNumberingPlanPrefixInfoParams[];
extern DMOBJ tServicesVoiceServiceCallControlCallingFeaturesObj[];
extern DMOBJ tServicesVoiceServiceCallControlCallingFeaturesSetObj[];
extern DMLEAF tServicesVoiceServiceCallControlCallingFeaturesSetParams[];

View file

@ -299,173 +299,6 @@ static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSWaitTime(ch
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFIMOn!UCI:asterisk/calling_features/cfim_on*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfim_on", "cfimon");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfim_on", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFIMOff!UCI:asterisk/calling_features/cfim_off*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfim_off", "cfimoff");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfim_off", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFBSOnOn!UCI:asterisk/calling_features/cfbs_onn*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfbs_on", "cfbson");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfbs_on", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFBSOff!UCI:asterisk/calling_features/cfbs_off*/
static int get_SerCFBSOffvicesVoiceServiceCallControlCallingFeaturesSet_CFBSOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfbs_off", "cfbsoff");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfbs_off", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFBOn!UCI:asterisk/calling_features/cfb_on*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfb_on", "cfbon");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfb_on", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CFBOff!UCI:asterisk/calling_features/cfb_off*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cfb_off", "cfboff");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cfb_off", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CWOn!UCI:asterisk/calling_features/cw_on*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cw_on", "cwon");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cw_on", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CWOff!UCI:asterisk/calling_features/cw_off*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "cw_off", "cwoff");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "cw_off", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CWStatus!UCI:asterisk/calling_features/cw_status*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWStatus(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
@ -488,69 +321,6 @@ static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWStatus(char *
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.DNDOn!UCI:asterisk/calling_features/dnd_on*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "dnd_on", "dndon");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOn(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "dnd_on", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.DNDOff!UCI:asterisk/calling_features/dnd_off*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "dnd_off", "dndoff");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOff(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "dnd_off", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.DNDStatus!UCI:asterisk/calling_features/dnd_status*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDStatus(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
*value = dmuci_get_value_by_section_fallback_def(((struct dmmap_dup *)data)->config_section, "dnd_status", "dndstatus");
return 0;
}
static int set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDStatus(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
case VALUECHECK:
if (dm_validate_string(value, -1, 32, NULL, NULL))
return FAULT_9007;
break;
case VALUESET:
dmuci_set_value_by_section(((struct dmmap_dup *)data)->config_section, "dnd_status", value);
break;
}
return 0;
}
/*#Device.Services.VoiceService.{i}.CallControl.CallingFeatures.Set.{i}.CallReturn!UCI:asterisk/calling_features/callreturn*/
static int get_ServicesVoiceServiceCallControlCallingFeaturesSet_CallReturn(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
@ -618,18 +388,7 @@ DMLEAF tIOPSYS_VoiceServiceCallControlCallingFeaturesSetParams[] = {
{BBF_VENDOR_PREFIX"CBBSMaxRetry", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSMaxRetry, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSMaxRetry, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CBBSRetryTime", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSRetryTime, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSRetryTime, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CBBSWaitTime", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSWaitTime, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CBBSWaitTime, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFIMOn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFIMOff", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOff, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFIMOff, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFBSOn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFBSOff", &DMWRITE, DMT_STRING, get_SerCFBSOffvicesVoiceServiceCallControlCallingFeaturesSet_CFBSOff, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBSOff, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFBOn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CFBOff", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOff, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CFBOff, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CWOn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CWOff", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOff, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWOff, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CWStatus", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CWStatus, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CWStatus, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"DNDOn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"DNDOff", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOff, set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDOff, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"DNDStatus", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDStatus, set_ServicesVoiceServiceCallControlCallingFeaturesSet_DNDStatus, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"CallReturn", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_CallReturn, set_ServicesVoiceServiceCallControlCallingFeaturesSet_CallReturn, BBFDM_BOTH},
{BBF_VENDOR_PREFIX"Redial", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceCallControlCallingFeaturesSet_Redial, set_ServicesVoiceServiceCallControlCallingFeaturesSet_Redial, BBFDM_BOTH},
{0}

View file

@ -153,6 +153,22 @@ config call_filter 'call_filter0'
option block_outgoing '0'
option block_incoming '0'
config numberingplan 'numberingplan'
option interdigitstdmsec '15000'
option interdigitopenmsec '3000'
option minimumnumberdigits '1'
option maxnumdigits '15'
config prefixinfo 'prefixinfo1'
option prefixenable '1'
option prefixrange '*43#'
option facilityaction 'CW_ACTIVATE'
config prefixinfo 'prefixinfo2'
option prefixenable '0'
option prefixrange '*261#'
option facilityaction 'DND_ACTIVATE'
config sip_service_provider 'sip0'
list codecs 'alaw'
list codecs 'ulaw'