mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
TR104: Add support for extra parameters
This commit is contained in:
parent
48f1265d35
commit
ceec718bf7
5 changed files with 68 additions and 1 deletions
|
|
@ -823,6 +823,18 @@ static int get_ServicesVoiceServiceCallControlLineStatsRTP_BytesReceived(char *r
|
|||
return get_ServicesVoiceServiceCallControlLine_Stats(instance, "RTP", "BytesReceived", value);
|
||||
}
|
||||
|
||||
static int get_ServicesVoiceServiceCallControlLineStatsDSP_Overruns(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_ServicesVoiceServiceCallControlLineStatsDSP_Underruns(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*#Device.Services.VoiceService.{i}.CallControl.IncomingMap.{i}.Line!UCI:asterisk/incoming_map,@i-1/line*/
|
||||
static int get_ServicesVoiceServiceCallControlIncomingMap_Line(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
|
|
@ -1818,6 +1830,7 @@ DMOBJ tServicesVoiceServiceCallControlLineStatsObj[] = {
|
|||
{"IncomingCalls", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallControlLineStatsIncomingCallsParams, NULL, BBFDM_BOTH, NULL},
|
||||
{"OutgoingCalls", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallControlLineStatsOutgoingCallsParams, NULL, BBFDM_BOTH, NULL},
|
||||
{"RTP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallControlLineStatsRTPParams, NULL, BBFDM_BOTH, NULL},
|
||||
{"DSP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallControlLineStatsDSPParams, NULL, BBFDM_BOTH, NULL},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
@ -1854,6 +1867,14 @@ DMLEAF tServicesVoiceServiceCallControlLineStatsRTPParams[] = {
|
|||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.Services.VoiceService.{i}.CallControl.Line.{i}.Stats.DSP. *** */
|
||||
DMLEAF tServicesVoiceServiceCallControlLineStatsDSPParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type */
|
||||
{"Overruns", &DMREAD, DMT_UNINT, get_ServicesVoiceServiceCallControlLineStatsDSP_Overruns, NULL, BBFDM_BOTH},
|
||||
{"Underruns", &DMREAD, DMT_UNINT, get_ServicesVoiceServiceCallControlLineStatsDSP_Underruns, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.Services.VoiceService.{i}.CallControl.IncomingMap.{i}. *** */
|
||||
DMLEAF tServicesVoiceServiceCallControlIncomingMapParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ extern DMOBJ tServicesVoiceServiceCallControlLineStatsObj[];
|
|||
extern DMLEAF tServicesVoiceServiceCallControlLineStatsIncomingCallsParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlLineStatsOutgoingCallsParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlLineStatsRTPParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlLineStatsDSPParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlIncomingMapParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlOutgoingMapParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallControlGroupParams[];
|
||||
|
|
|
|||
|
|
@ -229,6 +229,18 @@ static int get_ServicesVoiceServiceCallLog_Src_AverageFarEndInterarrivalJitter(c
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int get_ServicesVoiceServiceCallLog_Src__ReceivePacketLossRate(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_ServicesVoiceServiceCallLogSessionDestinationRTP_ReceivePacketLossRate(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get Alias - Device.Services.VoiceService.{i}.CallLog.{i}. */
|
||||
static int get_ServicesVoiceServiceCallLog_Alias(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
|
|
@ -287,7 +299,7 @@ DMLEAF tServicesVoiceServiceCallLogSessionParams[] = {
|
|||
DMOBJ tServicesVoiceServiceCallLogSessionDestinationObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
{"DSP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallLogSessionDestinationDSPObj, NULL, NULL, BBFDM_BOTH},
|
||||
{"RTP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"RTP", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tServicesVoiceServiceCallLogSessionDestinationRTPParams, NULL, BBFDM_BOTH, NULL},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
@ -307,6 +319,13 @@ DMOBJ tServicesVoiceServiceCallLogSessionDestinationDSPObj[] = {
|
|||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Destination.RTP. *** */
|
||||
DMLEAF tServicesVoiceServiceCallLogSessionDestinationRTPParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type */
|
||||
{"ReceivePacketLossRate", &DMREAD, DMT_UNINT, get_ServicesVoiceServiceCallLogSessionDestinationRTP_ReceivePacketLossRate, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Source.DSP. *** */
|
||||
DMOBJ tServicesVoiceServiceCallLogSessionSourceDSPObj[] = {
|
||||
/* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/
|
||||
|
|
@ -343,5 +362,6 @@ DMLEAF tServicesVoiceServiceCallLogSessionSourceRTPParams[] = {
|
|||
{"MaxJitter", &DMREAD, DMT_INT, get_ServicesVoiceServiceCallLog_Src_MaxJitter, NULL, BBFDM_BOTH},
|
||||
{"AverageRoundTripDelay", &DMREAD, DMT_INT, get_ServicesVoiceServiceCallLog_Src_AverageRoundTripDelay, NULL, BBFDM_BOTH},
|
||||
{"AverageFarEndInterarrivalJitter", &DMREAD, DMT_INT, get_ServicesVoiceServiceCallLog_Src_AverageFarEndInterarrivalJitter, NULL, BBFDM_BOTH},
|
||||
{"ReceivePacketLossRate", &DMREAD, DMT_UNINT, get_ServicesVoiceServiceCallLog_Src__ReceivePacketLossRate, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ extern DMLEAF tServicesVoiceServiceCallLogSessionParams[];
|
|||
extern DMOBJ tServicesVoiceServiceCallLogSessionDestinationObj[];
|
||||
extern DMOBJ tServicesVoiceServiceCallLogSessionSourceObj[];
|
||||
extern DMOBJ tServicesVoiceServiceCallLogSessionDestinationDSPObj[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationRTPParams[];
|
||||
extern DMOBJ tServicesVoiceServiceCallLogSessionSourceDSPObj[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationDSPCodecParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionSourceDSPCodecParams[];
|
||||
|
|
|
|||
|
|
@ -14,6 +14,29 @@
|
|||
/*************************************************************
|
||||
* GET & SET PARAM
|
||||
**************************************************************/
|
||||
static int get_ServicesVoiceServiceVoIPProfile_Enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
*value = dmuci_get_option_value_fallback_def("asterisk", "general", "profile_enable", "1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_ServicesVoiceServiceVoIPProfile_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("asterisk", "general", "profile_enable", b ? "1" : "0");
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*#Device.Services.VoiceService.{i}.VoIPProfile.{i}.DTMFMethod!UCI:asterisk/sip_advanced,sip_options/dtmf_mode*/
|
||||
static int get_ServicesVoiceServiceVoIPProfile_DTMFMethod(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
|
|
@ -303,6 +326,7 @@ DMLEAF tServicesVoiceServiceVoIPProfileParams[] = {
|
|||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"DTMFMethod", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceVoIPProfile_DTMFMethod, set_ServicesVoiceServiceVoIPProfile_DTMFMethod, BBFDM_BOTH},
|
||||
{"Alias", &DMWRITE, DMT_STRING, get_ServicesVoiceServiceVoIPProfile_Alias, set_ServicesVoiceServiceVoIPProfile_Alias, BBFDM_BOTH},
|
||||
{"Enable", &DMWRITE, DMT_BOOL, get_ServicesVoiceServiceVoIPProfile_Enable, set_ServicesVoiceServiceVoIPProfile_Enable, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue