These are utility functions that selects a part of the dynamic data or database.
pos(data) def= π1(data) queue(data) def= π2(data) party(data) def= π3(data) armed(db) def= π1(db) present(db) def= π2(db)
Thenew function initiates aBCSM state with the the point in call (pic) and what party its connected to. The phone (ph) which it is associated to is used to de-termine the user profile. The phone can be connected or, if it is just a link in a connection chain, not connected. Finally the database (db) is used to lookup the profile in.
new(pic, party, ph,
connected, db) def= hpic,
hpic, nil, partyi, nil,
harmed2, present2, lookup2, accounting, ∅, cphii where harmed,
present,
lookupi = services: standard profile harmed1, present1,
lookup1,
accounting, , i = ssf : profile(ph, db)
armed2 = armed ⊕ armed1
present2 = present ⊕ present1 lookup2 = lookup ⊕ lookup1
cph = if(connected, ph, ⊥)
The arcs function describes the graphs of the BCSM annotated with guards and sent messages found in the Figure 6.4, 6.5. The functions takes a P osition and the number of the outgoing arc returns guard message to be sent and the resulting P osition.
6.4 Functions 69
arcs: (P osition ×N→ (EventT emplate²× EventT emplate²× P osition) arcs =
{
hO Null, 1, h², ², Orig.Attempt Authorizedii,
hCollect Info, 1, hhhssf, requesti, connecti, ², Collected Infoii, hCollect Info, 2, hhhssf, notificationi, onhooki, ², O Abandonii, hCollect Info, 3, hhhssf, requesti, servicei, ², Collected Service Infoii, hAnalyse Info, 1, h², ², Analysed Infoii,
hAnalyse Info, 2, hhhssf, notificationi, onhooki, ², O Abandonii, hRouting&Alerting, 1, hhhssf, notificationi, offhooki, ², O Answerii,
hRouting&Alerting, 2, hhhssf, notificationi, select faili, ², Route Select Failureii, hRouting&Alerting, 3, hhhssf, notificationi, busyi, ², O Call Party Busyii, hRouting&Alerting, 4, hhhssf, notificationi, no answeri, ², O No Answerii, hRouting&Alerting, 5, hhhssf, notificationi, onhooki, ², O Abandonii, hO Active, 1, hhhssf, requesti, servicei, ², O Mid Callii, hO Active, 2, hhhssf, notificationi, onhooki, ², O Disconnectii,
hO Active, 3, hhhssf, notificationi, exceptioni, hhbcsm, notificationi, terminatei, O Exceptionii,
hO Exception, 1, h², ², O Nullii,
hOrig.Attempt Authorized, 1, h², hhbcsm, notificationi, authorisedi, Collect Infoii, hCollected Service Info, 1, h², ², Analyse Infoii,
hCollected Info, 1, h², ², Analyse Infoii,
hAnalysed Info, 1, h², hhbcsm, requesti, connecti, Routing&Alertingii, hRoute Select Failure, 1, h², hhbcsm, notificationi, terminatei, O Exceptionii, hO Call Party Busy, 1, h², hhbcsm, notificationi, busyi, O Exceptionii, hO No Answer, 1, h², hhbcsm, notificationi, no answeri, O Exceptionii, hO Answer, 1, h², hhbcsm, notificationi, connectioni, O Activeii, hO Mid Call, 1, h², ², O Activeii,
hO Disconnect, 1, h², hhbcsm, notificationi, terminatei, O Nullii, hO Abandon, 1, h², hhbcsm, notificationi, terminatei, O Nullii, hT Null, 1, h², ², Term.Attempt Authorizedii,
hSelect Facility&Present Call, 1, hhhssf, notificationi, facility availablei, ², T Term Seizedii, hSelect Facility&Present Call, 2, hhhssf, notificationi, offhooki, ², T Answerii,
hSelect Facility&Present Call, 3, hhhssf, notificationi, busyi, ², T Call Party Busyii, hSelect Facility&Present Call, 4, hhhssf, notificationi, onhooki, ², T Abandonii, hT Alerting, 1, hhhssf, notificationi, no answeri, ², T No Answerii, hT Alerting, 2, hhhssf, notificationi, onhooki, ², T Abandonii, hT Alerting, 3, hhhssf, notificationi, offhooki, ², T Answerii, hT Active, 1, hhhssf, requesti, servicei, ², T Mid Callii, hT Active, 2, hhhssf, notificationi, onhooki, ², T Disconnectii,
hT Active, 3, hhhssf, notificationi, exceptioni, hhbcsm, notificationi, terminatei, T Exceptionii,
hT Exception, 1, h², ², T Nullii,
hTerm.Attempt Authorized, 1, h², hhbcsm, requesti, select facilityi, Select Facility&Present Callii, hT Call Party Busy, 1, h², hhbcsm, notificationi, busyi, T Exceptionii,
hT Term Seized, 1, h², ², T Alertingii,
hT No Answer, 1, h², hhbcsm, notificationi, no answeri, T Exceptionii, hT Answer, 1, h², hhbcsm, notificationi, connectioni, T Activeii, hT Mid Call, 1, h², ², T Activeii,
hT Disconnect, 1, h², hhbcsm, notificationi, terminatei, T Nullii, hT Abandon, 1, h², hhbcsm, notificationi, terminatei, T Nullii }
1. O_Null & Authorize Origination_Attempt 6. O_Exception
1 2. Collect_Info
Orig.Attempt_Authorized
2 Collected_Info 3. Analyse_Info
4. Routing & Alerting 3 Analysed_Info
7 5. O_Active
O_Answer 10
9
8
4
5
6 19 Onhook
Onhook
Onhook
Connect
No_answer Busy Select_fail
Onhook
Exception O_Abandon
O_Disconnect
O_Mid_Call
Route_Select_Failure
O_Call_Party_Busy
O_No_Answer Service
Collected_Service_Info
Offhook
Service
Connection Terminate
Terminate
Busy
No_Answer
Terminate Terminate
Authorised
Connect
Figure 6.4: Figure 4-3 of [IN:Q.1214], annotated originatingBCSMfor CS-1
The guard, next and message functions handles the different aspects of an outgoing arc from the current P osition. The guard function returns the guard of the n:th outgoing arc, whereas the next returns the new data if one takes the n:th arc.
Finally the message function returns the events to be emitted,if any, should the BCSMfollow the n:th arc.
guard(n, data) def= π1(arcs(pos(data), n))
next(n, data) def= hπ3(arcs(pos(data), n)), queue(data), party(data)i message(n, data, db) def=
( ² if template = ²
hπ1(template), π2(template), di otherwise where template = π2(arcs(pos(data), n))
d =
party(data) if pos(data) = Analysed Info phone(db) if pos(data) ∈ O P ICs ∪
T P ICs
⊥ otherwise
The insert function inserts the event into the priority queue (pq) of events. The relation ≺ defines the order of priority and will be one of means of resolving feature
6.4 Functions 71
Onhook
Onhook
Offhook
Onhook Exception
Busy
Offhook
11. T_Exception 7. T_Null & Authorize Termination_Attempt
8. Select_Facility & Present_Call
9. T_Alerting
10. T_Active T_Answer 15 12
14 13 T_Call_Party_Busy
T_No_Answer
18
17
T_Mid_Call
T_Disconnect 16
T_Abandon
20 T_Term_Seized Facility_Available
No_Answer
Service Term.Attempt_Authorized
Terminate No_answer Busy
Connection
Terminate
Select_Facility
Terminate
Figure 6.5: Figure 4-4 of [IN:Q.1214], annotated terminatingBCSM for CS-1
interactions. Since we have as yet not tackled the problems of feature interactions no priorities are given, and consequently the ≺ relation is empty.
insert(event, data) def= hpos(data), insert1(event, queue(data)), party(data)i
insert1(event, pq) def=
hevent, nili if pq = nil
hevent, pqi if event ≺ list: hd(pq) hlist: hd(pq), otherwise
insert1(event, list: tl(pq))i
≺ def= ∅
The num function returns the number of outgoing arcs there are from a position.
num(position) def=
( 1 if position ∈ DP s
num1(position) otherwise num1 def= {hO Null, 1i, hCollect Info, 3i,
hAnalyse Info, 2i, hRouting&Alerting, 5i, hO Active, 3i, hO Exception, 1i,
hT Null, 1i, hSelect Facility&Present Call, 4i, hT Alerting, 3i, hT Active, 3i,
hT Exception, 1i}
The add present function adds the events generated on entering this position, by the subscribed services.
add present(data, db) def= hpos(data),
add present1((present(db))(pos(data))), party(data)i
add present1(new, queue) def= if(new = nil queue,
add present1(list: tl(new),
insert(list: hd(new), queue)) The active function searches the priority queue of events and looks if any event matches any of the guards of the outgoing arcs from the present point in call. If it finds an event matching a guard a tuple of that guard and the number of the arc is returned. If no matching event is found the function returns the tuple consisting of ⊥ and 0.
active(data) def=
h⊥, 0i if (guard = ²) ∧
(pos(data) ∈ active) ∧ (queue(data) = ∅) active0(num(pos(data)), otherwise
data)
where guard = π1(active0(num(pos(data)), data)) active = {O Active, T Active}
active0(n, data) def=
h⊥, 0i if n = 0
active0(n − 1, data) if guard = ⊥ hguard, ni otherwise
where guard = find guard(guard(n, data)queue(data))
find guard(guard, queue) def=
² if guard = ²
⊥ if list: null(queue)
list: hd(queue) if guard = template find guard(guard, otherwise
list: tl(queue))
where template = event: template(list: hd(queue))
The delete guard function deletes the guard from the priority event queue, unless it is a service request. If it is a service request it has to be retained in the queue to be handled by the reached detection point.
delete guard(event, data) def= if((event = ²) ∨ event: request(ssf, service, event), data,
hpos(data),
list: remove(event, queue(data)), party(data)i)
6.4 Functions 73
The set party function sets the party in the state if the event is a SSF connection request.
set party(event, data) def= if(π1(event) = hhssf, requesti, connect, partyi, hpos(data), queue(data), partyi,
data)
The triggered function searches the priority queue for any event that is armed. If any armed event is found the this is returned otherwise ⊥ is returned.
triggered(data, db) def= triggered1(pos(data), queue(data), armed(db)) triggered1(position,
queue, armed) def=
⊥ if list: null(queue)
list: hd(queue) if current ∈ armed triggered1(position, otherwise
list: tl(queue), armed) where current = hposition,
service template(list: hd(queue))i
The service template function takes an event and if it is a service request, it con-structs the service template.
service template(event) def= hevent: type(event), π1(event: data(event))i The report and request functions tests whether an event is a report or request event respectively.
report(event template) def= π2(π1(event template)) = report request(event template) def= π2(π1(event template)) = request
The pack function constructs a service request message to the SSF for delivery to the SCF, incorporating the service specific information as well the parts of the BCSM state needed.
pack(type, name, ssd, data,
harmed, p, l, a, c, phi) def= hhbcsm, requesti, type,
hπ1(l(name)), π2(l(name)) ∪ ssd ∪
{harmed, armedi, hlookup, li, hpresent, pi, haccounting, ai, hcost, ci,
hparty, party(data)i, hphone, phi}ii
The clean function removes untreated events from the priority queue. Some of the events are not removed, such as a number of SSF notifications and in some positions service request.
clean(data) def= hpos(data), clean1(pos(data), queue(data)), party(data)i
clean1(pos, queue) def=
nil if queue = nil
hlist: hd(queue), if template ∈ stay clean1(pos, list: tl(queue))i
clean1(pos, list: tl(queue)) otherwise where template = event: template(list: hd(queue))
stay = phone ∪ service
phone = {hhssf, notificationi, offhooki hhssf, notificationi, onhooki hhssf, requesti, connecti
hhssf, notificationi, facility availablei hhssf, notificationi, select faili hhssf, notificationi, busyi hhssf, notificationi, no answeri}
service = if(pos ∈ {Collected Service Info, O Mid Call, T Mid Call},
∅,
{hhssf, requesti, servicei})
The por function returns the first point of return event found in the priority queue, if none is present it will return ⊥.
por(data) def= por1(queue(data))
por1(queue) def=
⊥ if queue = nil
list: hd(queue) if type = hscf, responsei por1(list: tl(queue)) otherwise
where type = event: type(list: hd(queue))