diff --git a/TCAP/src/ITU/tcap_tsm_fsm.erl b/TCAP/src/ITU/tcap_tsm_fsm.erl index e5ae21e..9a20797 100644 --- a/TCAP/src/ITU/tcap_tsm_fsm.erl +++ b/TCAP/src/ITU/tcap_tsm_fsm.erl @@ -93,6 +93,7 @@ idle({'BEGIN', received, SccpParms}, State) when is_record(SccpParms, 'N-UNITDATA') -> %% Store remote address and remote TID NewState = State#state{remote_address = SccpParms#'N-UNITDATA'.callingAddress, + local_address = SccpParms#'N-UNITDATA'.calledAddress, remoteTID = (SccpParms#'N-UNITDATA'.userData)#'Begin'.otid}, Begin = SccpParms#'N-UNITDATA'.userData, QOS = {SccpParms#'N-UNITDATA'.sequenceControl, SccpParms#'N-UNITDATA'.returnOption}, @@ -178,7 +179,9 @@ initiation_received({'END', transaction, EndParms}, State) TrUserData = process_undefined(EndParms#'TR-END'.userData), DialoguePortion = TrUserData#'TR-user-data'.dialoguePortion, ComponentPortion = TrUserData#'TR-user-data'.componentPortion, - End = #'End'{dialoguePortion = DialoguePortion, components = ComponentPortion}, + Dtid = State#state.remoteTID, + End = #'End'{dtid = <>, dialoguePortion = DialoguePortion, + components = ComponentPortion}, %% Assemble TR-portion of END message {ok, TPDU} = 'TR':encode('TCMessage', {'end', End}), {SequenceControl, ReturnOption} = qos_from_tr_prim(EndParms),