mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Voice: Add support for Source and Destination avgRoundTripDelay
This commit is contained in:
parent
6dab2cf7b8
commit
6a9c4a16df
4 changed files with 27 additions and 4 deletions
|
|
@ -529,7 +529,15 @@ int init_call_log(void)
|
|||
token += 1;
|
||||
end = DM_LSTRSTR(token, ",");
|
||||
CHECK_RESULT(end);
|
||||
DM_STRNCPY(cdr.averageRoundTripDelay, token, end - token + 1);
|
||||
DM_STRNCPY(cdr.localAverageRoundTripDelay, token, end - token + 1);
|
||||
|
||||
token = DM_LSTRSTR(token, ",");
|
||||
CHECK_RESULT(token);
|
||||
token += 1;
|
||||
end = DM_LSTRSTR(token, ",");
|
||||
CHECK_RESULT(end);
|
||||
DM_STRNCPY(cdr.remoteAverageRoundTripDelay, token, end - token + 1);
|
||||
|
||||
|
||||
token = DM_LSTRSTR(token, ",");
|
||||
CHECK_RESULT(token);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ struct call_log_entry {
|
|||
char txpkts[20];
|
||||
char jitter[20];
|
||||
char maxJitter[20];
|
||||
char averageRoundTripDelay[20];
|
||||
char localAverageRoundTripDelay[20];
|
||||
char remoteAverageRoundTripDelay[20];
|
||||
char farEndInterarrivalJitter[20];
|
||||
char averageFarEndInterarrivalJitter[20];
|
||||
char receiveInterarrivalJitter[20];
|
||||
|
|
|
|||
|
|
@ -225,7 +225,14 @@ static int get_ServicesVoiceServiceCallLog_Src_MaxJitter(char *refparam, struct
|
|||
static int get_ServicesVoiceServiceCallLog_Src_AverageRoundTripDelay(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct call_log_entry *entry = (struct call_log_entry *)data;
|
||||
*value = (entry) ? dmstrdup(entry->averageRoundTripDelay) : "0";
|
||||
*value = (entry) ? dmstrdup(entry->localAverageRoundTripDelay) : "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_ServicesVoiceServiceCallLog_Destination_AverageRoundTripDelay(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
struct call_log_entry *entry = (struct call_log_entry *)data;
|
||||
*value = (entry) ? dmstrdup(entry->remoteAverageRoundTripDelay) : "0";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -301,7 +308,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},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
|
@ -361,3 +368,9 @@ DMLEAF tServicesVoiceServiceCallLogSessionSourceRTPParams[] = {
|
|||
{"ReceivePacketLossRate", &DMREAD, DMT_UNINT, get_ServicesVoiceServiceCallLog_Src__ReceivePacketLossRate, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
||||
/* *** Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Destination.RTP. *** */
|
||||
DMLEAF tServicesVoiceServiceCallLogSessionDestinationRTPParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"AverageRoundTripDelay", &DMREAD, DMT_INT, get_ServicesVoiceServiceCallLog_Destination_AverageRoundTripDelay, NULL, BBFDM_BOTH},{0}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ extern DMOBJ tServicesVoiceServiceCallLogSessionSourceDSPObj[];
|
|||
extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationDSPCodecParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionSourceDSPCodecParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionSourceRTPParams[];
|
||||
extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationRTPParams[];
|
||||
|
||||
#endif //__SERVICESVOICESERVICECALLLOG_H
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue