diff --git a/dmtree/tr104/common.c b/dmtree/tr104/common.c index 945dfae2..88d6bdbf 100644 --- a/dmtree/tr104/common.c +++ b/dmtree/tr104/common.c @@ -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); diff --git a/dmtree/tr104/common.h b/dmtree/tr104/common.h index c564481a..4d19783f 100644 --- a/dmtree/tr104/common.h +++ b/dmtree/tr104/common.h @@ -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]; diff --git a/dmtree/tr104/servicesvoiceservicecalllog.c b/dmtree/tr104/servicesvoiceservicecalllog.c index 18ac6601..7738a2a2 100644 --- a/dmtree/tr104/servicesvoiceservicecalllog.c +++ b/dmtree/tr104/servicesvoiceservicecalllog.c @@ -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} +}; diff --git a/dmtree/tr104/servicesvoiceservicecalllog.h b/dmtree/tr104/servicesvoiceservicecalllog.h index 15f86392..0db95bf5 100644 --- a/dmtree/tr104/servicesvoiceservicecalllog.h +++ b/dmtree/tr104/servicesvoiceservicecalllog.h @@ -24,6 +24,7 @@ extern DMOBJ tServicesVoiceServiceCallLogSessionSourceDSPObj[]; extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationDSPCodecParams[]; extern DMLEAF tServicesVoiceServiceCallLogSessionSourceDSPCodecParams[]; extern DMLEAF tServicesVoiceServiceCallLogSessionSourceRTPParams[]; +extern DMLEAF tServicesVoiceServiceCallLogSessionDestinationRTPParams[]; #endif //__SERVICESVOICESERVICECALLLOG_H