perform default/timeout action when sending is complete
[lcr.git] / message.txt
1 call state messages between epoint and port, call and endpoint objects:
2 -----------------------------------------------------------------------
3
4 MESSAGE_SETUP
5 - a new call is set up
6
7 MESSAGE_MORE
8 - more digits are needed
9
10 MESSAGE_PROCEEDING
11 - call proceeds, no more digits needed
12
13 MESSAGE_ALERTING
14 - call alerts, no more digits needed
15
16 MESSAGE_CONNECT
17 - call connects
18
19 MESSAGE_DISCONNECT
20 - call disconnects, but not yet released
21
22 MESSAGE_RELEASE
23 - call has been released
24
25 * other messages like dialing information, notifications and others
26   are processed by the objects and can cause other internal states to change
27   but will not change any call state. objects may analyze the given information
28   and process call state message. (e.g MESSAGE_DISCONNECT when dialing a wrong
29   number)
30
31
32 states of port object:
33 ----------------------
34
35 PORT_STATE_IDLE
36 - port is just created, no setup yet
37 PORT_STATE_IN_SETUP
38 - a setup was received from isdn stack
39 PORT_STATE_OUT_SETUP
40 - a setup was sent to isdn stack
41 PORT_STATE_IN_MORE
42 - the endpoint object requires more digits to complete the call
43 PORT_STATE_OUT_MORE
44 - the port object requires more digits to complete the call
45 PORT_STATE_IN_PROCEEDING
46 - the incoming call proceeds, no more digits needed
47 PORT_STATE_OUT_PROCEEDING
48 - the outgoing call proceeds, no more digits needed
49 PORT_STATE_IN_ALERTING
50 - the incoming call alerts, no more digits needed
51 PORT_STATE_OUT_ALERTING
52 - the outgoing call alerts, no more digits needed
53 PORT_STATE_CONNECT
54 - the call is active
55 PORT_STATE_IN_DISCONNECT
56 - the call is disconnected from the incoming side
57 PORT_STATE_OUT_DISCONNECT
58 - the call is disconnected from the outgoing side
59 PORT_STATE_RELEASE
60 - the call is released, the port object waits for the l3-process to terminate
61
62
63 states of endpoint object:
64 --------------------------
65
66 EPOINT_STATE_IDLE
67 - endpoint is just created, no setup yet
68 EPOINT_STATE_OUT_SETUP
69 - a setup was received from call object
70 EPOINT_STATE_IN_MORE
71 - the port object requires more digits to complete the call
72 EPOINT_STATE_OUT_MORE
73 - the call object requires more digits to complete the call
74 EPOINT_STATE_IN_PROCEEDING
75 - the incoming call proceeds, no more digits needed
76 EPOINT_STATE_OUT_PROCEEDING
77 - the outgoing call proceeds, no more digits needed
78 EPOINT_STATE_IN_ALERTING
79 - the incoming call alerts, no more digits needed
80 EPOINT_STATE_OUT_ALERTING
81 - the outgoing call alerts, no more digits needed
82 EPOINT_STATE_CONNECT
83 - the call is active
84 EPOINT_STATE_IN_DISCONNECT
85 - the incoming call is disconnected
86 EPOINT_STATE_OUT_DISCONNECT
87 - the outgoing call is disconnected
88
89
90 states of call:
91 ---------------
92
93 there are no call states.
94
95
96 procedure of messages between port and endpoint objects:
97 --------------------------------------------------------
98
99 INCOMING CALL (port->endpoint)
100 - the endpoint object is created by the port object.
101 - a MESSAGE_SETUP is sent as the first message port->endpoint.
102   the port goes into PORT_STATE_IN_SETUP state.
103   the endpoint goes into EPOINT_STATE_IN_MORE state or any other state after
104   processing the given dialing information.
105 - the endpoint MUST now respond with MESSAGE_MORE, MESSAGE_PROCEEDING,
106   MESSAGE_ALERTING, MESSAGE_CONNECT, MESSAGE_DISCONNECT.
107   the endpoint goes into the appropiate EPOINT_STATE_IN_* state.
108   the port goes into the appropiate PORT_STATE_IN_* state.
109
110 OUTGOING CALL (endpoint->port)
111 - the port object is created by the endpoint object.
112 - a MESSAGE_SETUP is sent as the first message endpoint->port.
113   the endpoint goes into EPOINT_STATE_OUT_SETUP state.
114   the port goes into PORT_STATE_OUT_SETUP state.
115 - the port may now respond with MESSAGE_MORE, MESSAGE_PROCEEDING,
116   MESSAGE_ALERTING, MESSAGE_CONNECT, MESSAGE_DISCONNECT.
117   the port goes into the appropiate PORT_STATE_OUT_* state.
118   the endpoint goes into the appropiate EPOINT_STATE_OUT_* state.
119
120 DISCONNECTING CALL (endpoint->port)
121 - the endpoint may disconnect the call at any state, except IDLE.
122   it sends MESSAGE_DISCONNECT.
123   the endpoint goes into EPOINT_STATE_OUT_DISCONNECT state.
124   the port goes into PORT_STATE_OUT_DISCONNECT state.
125
126 DISCONNECTING CALL (port->endpoint)
127 - the port may disconnect the call at any state, except IDLE.
128   it sends MESSAGE_DISCONNECT.
129   the port goes into PORT_STATE_IN_DISCONNECT state.
130   the endpoint goes into EPOINT_STATE_IN_DISCONNECT state.
131
132 RELEASING CALL (port->endpoint, endpoint->port)
133 - at any state, this message is possible
134   the object sends MESSAGE_RELEASE, the port will terminate soon.
135   the receiving object will unlink the relation to the sending object.
136
137
138 procedure of messages between endpoint and call objects:
139
140 CALL PROCEEDING (endpoint->call, call->endpoint)
141 - any message will be sent to the call and transfered to the other end
142 - any message will be received from the endpoint coming from the other end
143 - if more than two endpoints are connected in one call, the messages are
144   blocked.
145 - if only one endpoint exists after creation, the call will create another
146   endpoint and delivers the MESSAGE_SETUP
147
148 CALL RELEASE (endpoint->call, call->endpoint)
149 - the endpoint sends MESSAGE_RELEASE in order to be removed from the call.
150   the endpoint will soon terminate.
151   the call will remove the endpoint and if there is only one endpoint left,
152   it will send a MESSAGE_RELEASE to the endpoint and will release itself.
153
154
155 DISCONNECT and RELEASE
156 ----------------------
157
158 the endpoint may receive MESSAGE_RELEASE from a call but may NOT send it
159 to the port. the port MUST get a MESSAGE_DISCONNECT instead. 
160  
161
162 REMOTE APPLICATION PROCEDURE
163 ----------------------------
164
165 MESSAGE_NEWREF
166 - is sent before outgoing setup may be sent
167 - is received before outgoing setup may be sent
168 - is received before incoming call
169
170 MESSAGE_BCHANNEL
171 - type BCHANNEL_REQUEST is sent to get the bchannel stack
172   the ref is required to find the corresponding port class
173 - type BCHANNEL_ASSIGN is received, if channel is available, ACK must be sent
174   the ref is given with the bchannel stack. 
175 - type BCHANNEL_ASSIGN_ACK must be sent to acknowledge channel
176   the ref is 0, the stack address must be set to find corresponding channel
177 - type BCHANNEL_REMOVE is received, if channel is not available anymore
178   the stack must then be release, the ACK must be sent.
179   the ref is given with the bchannel stack.
180 - type BCHANNEL_REMOVE_ACK must be sent after releasing stack.
181   the ref is 0, the stack address must be set to find corresponding channel
182
183 MESSAGE_RELEASE
184 - will be received or sent to release call and ref.
185
186 what happenes to channels that are not acked?
187 -> one solution may be: they are blocked until the port is unloaded/unblocked.
188
189
190