call: Work on call control and transactions
This commit is contained in:
parent
6f37808cc1
commit
9b3cf91901
|
@ -19,7 +19,7 @@
|
||||||
PackageLoader fileInPackage: 'OsmoGSM'.
|
PackageLoader fileInPackage: 'OsmoGSM'.
|
||||||
|
|
||||||
Object subclass: GSMTransaction [
|
Object subclass: GSMTransaction [
|
||||||
| sapi ti |
|
| sapi ti con |
|
||||||
<comment: 'I am the base for everything that goes on in a
|
<comment: 'I am the base for everything that goes on in a
|
||||||
GSM transaction on a given SAPI'>
|
GSM transaction on a given SAPI'>
|
||||||
|
|
||||||
|
@ -31,25 +31,66 @@ GSM transaction on a given SAPI'>
|
||||||
yourself
|
yourself
|
||||||
]
|
]
|
||||||
|
|
||||||
|
con: aCon [
|
||||||
|
<category: 'creation'>
|
||||||
|
con := aCon.
|
||||||
|
]
|
||||||
|
|
||||||
cancel [
|
cancel [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
nextPutSapi: aMsg [
|
||||||
|
<category: 'output'>
|
||||||
|
^ self nextPut: (OsmoGSM.BSSAPDTAP initWith: aMsg linkIdentifier: sapi)
|
||||||
|
]
|
||||||
|
|
||||||
|
nextPut: aMsg [
|
||||||
|
<category: 'output'>
|
||||||
|
con nextPutData: aMsg
|
||||||
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
GSMTransaction subclass: GSMLURequest [
|
GSMTransaction subclass: GSMLURequest [
|
||||||
<comment: 'I handle a Location Updating Request'>
|
<comment: 'I handle a Location Updating Request'>
|
||||||
]
|
]
|
||||||
|
|
||||||
|
GSMTransaction subclass: GSMMOCall [
|
||||||
|
| seq |
|
||||||
|
<comment: 'I handle Mobile-Originated calls'>
|
||||||
|
|
||||||
|
nextPutSapi: aMsg [
|
||||||
|
<category: 'output'>
|
||||||
|
aMsg ti: (ti bitOr: 8).
|
||||||
|
^ super nextPutSapi: aMsg.
|
||||||
|
]
|
||||||
|
|
||||||
|
initial [
|
||||||
|
| msg |
|
||||||
|
<category: 'transaction'>
|
||||||
|
|
||||||
|
msg := OsmoGSM.GSM48CCProceeding new.
|
||||||
|
self nextPutSapi: msg.
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
OsmoGSM.SCCPConnectionBase subclass: GSMProcessor [
|
OsmoGSM.SCCPConnectionBase subclass: GSMProcessor [
|
||||||
| transactions |
|
| transactions |
|
||||||
|
|
||||||
<comment: 'I am driving one subscriber connection'>
|
<comment: 'I am driving a SCCP Connection. This consists of being
|
||||||
|
hosting various transactions and dispatching to them.'>
|
||||||
<import: OsmoGSM>
|
<import: OsmoGSM>
|
||||||
|
|
||||||
|
initialize [
|
||||||
|
transactions := OrderedCollection new.
|
||||||
|
^ super initialize.
|
||||||
|
]
|
||||||
|
|
||||||
data: aData [
|
data: aData [
|
||||||
| msg bssmap data |
|
| msg bssmap data |
|
||||||
|
|
||||||
"The first message should be a Complete Layer3 Information"
|
"The first message should be a Complete Layer3 Information"
|
||||||
msg := aData data.
|
msg := aData data.
|
||||||
|
msg inspect.
|
||||||
|
|
||||||
msg class msgType = BSSAPHelper msgManagemnt ifFalse: [
|
msg class msgType = BSSAPHelper msgManagemnt ifFalse: [
|
||||||
^ self logError: 'Wrong initial message on %1' % {self srcRef} area: #msc.
|
^ self logError: 'Wrong initial message on %1' % {self srcRef} area: #msc.
|
||||||
|
@ -66,8 +107,14 @@ OsmoGSM.SCCPConnectionBase subclass: GSMProcessor [
|
||||||
data := bssmap findIE: GSMLayer3Info elementId ifAbsent: [
|
data := bssmap findIE: GSMLayer3Info elementId ifAbsent: [
|
||||||
^ self logError: 'Layer3Infor not present on %1' % {self srcRef} area: #msc.
|
^ self logError: 'Layer3Infor not present on %1' % {self srcRef} area: #msc.
|
||||||
].
|
].
|
||||||
|
data inspect.
|
||||||
|
|
||||||
|
(GSMMOCall on: 0 with: 0)
|
||||||
|
con: self;
|
||||||
|
initial.
|
||||||
|
|
||||||
"This is now the GSM data"
|
"This is now the GSM data"
|
||||||
|
self release.
|
||||||
]
|
]
|
||||||
|
|
||||||
terminate [
|
terminate [
|
||||||
|
|
Reference in New Issue