Harald Welte
8cecce3aba
CCO: actually hand over the [{invoke, #'Invoke'{}}] style components to DHA
2012-01-30 01:21:21 +01:00
Harald Welte
5d2061e509
DHA: properly encode dialogueportion during BEGIN
2012-01-30 00:55:38 +01:00
Harald Welte
153cdc4564
ISM: give ISM processes a proper name to help debugging
2012-01-29 23:37:27 +01:00
Harald Welte
c2773f018b
enable gen_fsm debug tracing for TSM and DHA for the tiem being
2012-01-29 23:23:24 +01:00
Harald Welte
983e81e9e6
transaction supervisor: properly convert name from list to atom
2012-01-29 23:22:54 +01:00
Harald Welte
992982b298
TSM FSM: Make sure to replace 'undefined' in DialoguePortion with asn1_NOVALUE
...
The ASN.1 encoder wants to explicitly have asn1_NOVALUE for OPTIONAL
fields. However, the default erlang record initializer is 'undefiend',
so we have to replace undefined with asn1_NOVALUE before feeding it to
asn1rt.
2012-01-29 23:06:42 +01:00
Harald Welte
b8f82b68af
DHA: Fix encoding of ComponentPortion
2012-01-29 20:24:22 +01:00
Harald Welte
05f7778a81
TCO/TCU: Make sure to start all supervisors on INVOKE
...
This introduces a new 'call' from the TC-User to TCO, which creates
the equired transaction_sup, dialogues_sup, dha_fsm and tsm_fsm _before_
the TC-INVOKE component will be passed into the new DHA fsm.
Once the TCO actually receives the TR-BEGIN, it will not start the
transaction supervisor, but merely look it up based on the TR-user
provided transaction ID.
2012-01-29 20:07:38 +01:00
Harald Welte
0b3d9b053c
make sure CCO correctly starts new ISM
2012-01-29 20:02:25 +01:00
Harald Welte
24b34f506a
transaction_sup: start dha_fsm in addition to dsm_fsm
2012-01-28 20:50:55 +01:00
Harald Welte
dbb39e1776
Fxi the way that TCO starts transaction_sup and tsm_fsm in local-out-begin
2011-12-18 21:45:49 +01:00
Harald Welte
bedd015b07
DHA: No need for passing PID of dialogue_sup into DHA
2011-12-18 12:54:08 +01:00
Harald Welte
4ab9bffba2
TSM: use a caller-provided Fun to send primitives towards SCCP
2011-12-18 12:22:31 +01:00
Harald Welte
6b0a7361be
DHA: Since TCO is a gen_server, not gen_fsm, use cast!
2011-12-18 12:20:42 +01:00
Harald Welte
f42d43b9f4
TCO: export the new_tid() function
2011-12-17 19:11:32 +01:00
Harald Welte
0f692c61b5
make sure that the 'transactionID' key in the ets table exists
2011-12-17 19:11:22 +01:00
Harald Welte
a6ead2ab01
make sure ANSI part at least compiles, even if incomplete
2011-12-17 18:59:04 +01:00
Harald Welte
2cdfd20466
s/transaction_coordinator_server/tcap_tco_server/g
2011-12-17 18:56:54 +01:00
Harald Welte
04c548c2d8
CCO: make sure ISM list is initialized as empty list []
2011-12-17 18:55:27 +01:00
Harald Welte
f6f4f6d5cc
CCO: fix typo (send_event instead of sent_event)
2011-12-17 18:37:44 +01:00
Harald Welte
70be83b1c9
tcap_invocation_sup:start_ism/5 instead of start_ism/1
2011-12-17 18:35:14 +01:00
Harald Welte
2e7ab1fe65
CCO: ensure state.components is always a list, not just a record
2011-12-17 18:34:47 +01:00
Harald Welte
5c0f228e11
tcap_user: correctly resolve DHA/TCO
...
ets lookups return a tuple, not just the Pid value that we want.
2011-12-17 18:27:28 +01:00
Harald Welte
a0dd2c6228
TCAP: make sure to start tcap_invocation_sup above tcap_ism_fsm
...
The tcap_invocation_sup is cretaed at the same time the tcap_cco_server
is created. Once TR requests BEGIN components, the tcap_invocation_sup
is requested to start a new tcap_ism_fsm child.
2011-12-17 17:47:41 +01:00
Harald Welte
205f585435
invocation supervisor: correctly call ISM
2011-12-17 17:22:55 +01:00
Harald Welte
9cb1851b3b
ISM: properly register a local name
2011-12-17 17:22:35 +01:00
Harald Welte
d828cfabba
TCAP: resolve DHA / CCO dependencies on TC-U initiated BEGIN
...
Prior to this patch, DHA needs to know the CCO pid, and CCO needed to
know the DHA pid at startup. The idea was to start CCO from within the
init() callback in DHA. However, this caused a deadlock in the
supervisor.
We now use the locally registred process names (tcap_cco_DLGID) to
resolve the process. However, it might be cleaner to use an ets table
at some later point. For now it is nice to see the name of each process
in pman for debugging...
2011-12-17 17:06:29 +01:00
Harald Welte
5c1cd340eb
make sure tcap_user start tcap_dialogue_sup starts tcap_dha_fsm
2011-12-16 00:36:45 +01:00
Harald Welte
66514a113e
add new tcap_user:start_sap() function
...
This can be used to instantiate the per-SAP tcap_sap_sup and
tcap_tco_server callback module in a simple call like this:
{ok, TcoPid} = tcap_user:start_sap(osmo_sccp_tcap, [7], []).
2011-12-15 23:38:29 +01:00
Harald Welte
f23b46c414
add symlinks from ebin/itu/*.beam to ebin/*.beam
...
erlang doesn't search for modules recursively in ERL_LIBS
2011-12-15 23:25:54 +01:00
Harald Welte
1452830d37
Update Makefile to make sure TC.{erl,hrl,beam} is removed
2011-12-15 23:24:55 +01:00
Harald Welte
6f1e72c678
add new tcap_user module
...
This is what a user process will call in order to initiate TCAP
transactions.
2011-12-15 16:45:28 +01:00
Harald Welte
efd9ab0344
prefix process names with "tcap_"
2011-12-15 16:43:20 +01:00
Harald Welte
fb5de0e5cc
rename ets 'transaction' table to 'tcap_transaction'
...
the ets namespace is global, so weshould prefix it with the name tcap to
avoid collisions with other applications.
2011-12-15 11:33:17 +01:00
Harald Welte
9d04bb6e40
TCAP: don't depend on the sccp application
...
First of all, different SCCP implementations may have different names.
Secontly, the TCAP application can be started without SCCP. It's only
needed when the adaptor process between tcap_tco_server and SCCP is
created. This is an explicit action by the user anyway...
2011-12-15 11:19:33 +01:00
Harald Welte
665aacb35b
TCO server: make sure argument list for behaviour module is a list
2011-12-13 19:19:47 +01:00
Harald Welte
0dde0bd85f
TCAP SAP supervisor: make sure we correctly start behaviour module
...
start of a given TCO is done as follows:
{ok, Pid} = supervisor:start_child(tcap_sup, [[osmo_sccp_tcap, [7],[]]]).
where '7' is the SCCP sub-system number (SSN) to which TCAP should bind.
2011-12-13 19:18:52 +01:00
Harald Welte
c569118a3a
tcap_tco_server is a gen_server, not gen_fsm!
2011-12-13 18:58:41 +01:00
Harald Welte
467e7c7a59
fix various typos in the ISM
2011-12-12 00:42:19 +01:00
Harald Welte
28e1293cdb
components supervisor: DHA pid is passed to CCO
2011-10-22 22:19:32 +02:00
Harald Welte
e676002dd9
ISM: generate a nice process name including dialogue + invoke ID
2011-10-22 22:19:01 +02:00
Harald Welte
bd91071d0b
include DHA pid in init arguments of component supervisor
2011-10-22 22:18:39 +02:00
Harald Welte
57be88ad13
CCO: handle incoming Reject from ISM
2011-10-22 19:54:33 +02:00
Harald Welte
75c35570e9
ISM: actually generate REJECT components
2011-10-22 19:54:12 +02:00
Harald Welte
3afbf0a65a
CCO: Use TC.hrl instead of ROS
2011-10-18 21:12:44 +02:00
Harald Welte
c9e48ab1e7
TCAP DHA: Make sure to use gen_server:cast for CCO as it is no gen_fsm
2011-10-18 21:12:15 +02:00
Harald Welte
4d8b44a455
create a new ets table to save the DialogueId -> DHA-Pid mapping
2011-10-18 21:09:46 +02:00
Harald Welte
59d0c8ab37
Implement the actual CCO, it was just a skeleton before...
2011-10-18 20:52:29 +02:00
Harald Welte
745bcf4099
rename SimpleTCAP asn.1 module to TC (TCAP Components)
...
This reflects the existing code which expects such a TC module to exist.
2011-10-18 20:42:47 +02:00
Harald Welte
6b363e580e
first attempt at implementing the TCO and ISM parts
2011-10-18 20:22:36 +02:00