ussd: Switch invokeid... respond to a unstructuredRequest
Respond with a fixed response.... this is only useful for testing right now.
This commit is contained in:
parent
67c1801031
commit
60c5441e9b
28
GSMDriver.st
28
GSMDriver.st
|
@ -376,17 +376,33 @@ ProcedureBase subclass: USSDProcedure [
|
||||||
| req str |
|
| req str |
|
||||||
|
|
||||||
req := {BERTag fromTuple: #(2 true 1). OrderedCollection
|
req := {BERTag fromTuple: #(2 true 1). OrderedCollection
|
||||||
with: {BERTag integer. #(4).}
|
with: {BERTag integer. #(0).}
|
||||||
with: {BERTag integer. #(59).}
|
with: {BERTag integer. #(59).}
|
||||||
with: {BERTag fromTuple: #(0 true 16). OrderedCollection
|
with: {BERTag fromTuple: #(0 true 16). OrderedCollection
|
||||||
with: {BERTag octetString. #(15).}
|
with: {BERTag octetString. #(15).}
|
||||||
with: {BERTag octetString. aNr asUSSD7Bit.}.}.}.
|
with: {BERTag octetString. aNr asUSSD7Bit}}}.
|
||||||
|
|
||||||
str := WriteStream on: (ByteArray new: 40).
|
str := WriteStream on: (ByteArray new: 40).
|
||||||
(DERTLVStream on: str) nextPut: req.
|
(DERTLVStream on: str) nextPut: req.
|
||||||
^ str contents
|
^ str contents
|
||||||
]
|
]
|
||||||
|
|
||||||
|
USSDProcedure class >> buildReturnLast: invokeId text: aText [
|
||||||
|
| ret str |
|
||||||
|
|
||||||
|
ret := {BERTag fromTuple: #(2 true 2). OrderedCollection
|
||||||
|
with: {BERTag integer. invokeId}
|
||||||
|
with: {BERTag sequence. OrderedCollection
|
||||||
|
with: {BERTag integer. #(60)}
|
||||||
|
with: {BERTag sequence. OrderedCollection
|
||||||
|
with: {BERTag octetString. #(15).}
|
||||||
|
with: {BERTag octetString. aText asUSSD7Bit}}}}.
|
||||||
|
|
||||||
|
str := WriteStream on: (ByteArray new: 40).
|
||||||
|
(DERTLVStream on: str) nextPut: ret.
|
||||||
|
^ str contents
|
||||||
|
]
|
||||||
|
|
||||||
nr: aNr [
|
nr: aNr [
|
||||||
nr := aNr.
|
nr := aNr.
|
||||||
]
|
]
|
||||||
|
@ -419,6 +435,14 @@ ProcedureBase subclass: USSDProcedure [
|
||||||
aMsg class messageType = GSM48SSMessage msgReleaseCompl ifTrue:[
|
aMsg class messageType = GSM48SSMessage msgReleaseCompl ifTrue:[
|
||||||
aMsg inspect.
|
aMsg inspect.
|
||||||
self success: aMsg ti = 9.
|
self success: aMsg ti = 9.
|
||||||
|
].
|
||||||
|
|
||||||
|
aMsg class messageType = GSM48SSMessage msgFacility ifTrue: [
|
||||||
|
| fac |
|
||||||
|
fac := GSM48SSFacility new.
|
||||||
|
fac ti: 1.
|
||||||
|
fac facility data: (self class buildReturnLast: #(1) text: '45050888658950').
|
||||||
|
conn nextPutData: (BSSAPDTAP initWith: fac linkIdentifier: 0).
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
Reference in New Issue