diff --git a/GSMDriver.st b/GSMDriver.st index 1fcba03..2aed410 100644 --- a/GSMDriver.st +++ b/GSMDriver.st @@ -376,17 +376,33 @@ ProcedureBase subclass: USSDProcedure [ | req str | req := {BERTag fromTuple: #(2 true 1). OrderedCollection - with: {BERTag integer. #(4).} + with: {BERTag integer. #(0).} with: {BERTag integer. #(59).} with: {BERTag fromTuple: #(0 true 16). OrderedCollection with: {BERTag octetString. #(15).} - with: {BERTag octetString. aNr asUSSD7Bit.}.}.}. + with: {BERTag octetString. aNr asUSSD7Bit}}}. str := WriteStream on: (ByteArray new: 40). (DERTLVStream on: str) nextPut: req. ^ 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. ] @@ -419,6 +435,14 @@ ProcedureBase subclass: USSDProcedure [ aMsg class messageType = GSM48SSMessage msgReleaseCompl ifTrue:[ aMsg inspect. 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). ] ] ]