File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -731,7 +731,14 @@ export class TransactionServiceProcessor {
731
731
const codecString = `${ name || '--' } /${ ! isNaN ( rate ) ? rate : '--' } /PT:${
732
732
! isNaN ( pt ) ? pt : '--'
733
733
} `;
734
- const outDataItem = {
734
+ const fallbackDescription = `${ sIP } :${ sPORT } -> ${ dIP } :${ dPORT } ` ;
735
+ const isRuriFromMessage = i . raw_source . includes ( i . ruri_user ) ;
736
+ const ruriDescription = isRuriFromMessage ? i . raw_source : i . ruri_user ;
737
+ const isCodecValid = pt || name || rate ;
738
+ const RTPDescription = isRTP && isCodecValid ? codecString : fallbackDescription
739
+ const description = ruriDescription || RTPDescription ;
740
+
741
+ const outDataItem = {
735
742
id : i . id ,
736
743
codecData,
737
744
callid : i . callid ,
@@ -740,10 +747,7 @@ export class TransactionServiceProcessor {
740
747
: eventName ) ,
741
748
method : eventName ,
742
749
description :
743
- i . ruri_user ||
744
- ( isRTP && ( pt || name || rate )
745
- ? codecString
746
- : `${ sIP } :${ sPORT } -> ${ dIP } :${ dPORT } ` ) ,
750
+ description ,
747
751
info_date : `[${ i . id || '#' + ( pid + 1 ) } ] [${ protoName } ] ${ moment (
748
752
i . micro_ts
749
753
) . format ( dateFormat ) } `,
You can’t perform that action at this time.
0 commit comments