From 0d786b3171b13b972639ef1a1169fe4592271455 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 8 Jun 2013 10:37:49 +0200 Subject: [PATCH] TSM: outgoing END needs DTID and CallingParty We need to store the SCCP CalledAddress in the TSM state at the time we receive the BEGIN of this dialogue. --- TCAP/src/ITU/tcap_tsm_fsm.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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),