diff --git a/GSM48.st b/GSM48.st index 73d483c..f3fa21b 100644 --- a/GSM48.st +++ b/GSM48.st @@ -525,6 +525,16 @@ GSM48DataHolder subclass: GSMCCCapabilities [ GSMCCCapabilities class >> elementId [ ^ 16r15 ] ] +GSM48DataHolder subclass: GSMConnectedNumber [ + + GSMConnectedNumber class >> elementId [ ^ 16r4C ] +] + +GSM48DataHolder subclass: GSMConnectedSubNumber [ + + GSMConnectedSubNumber class >> elementId [ ^ 16r4D ] +] + GSM48SimpleData subclass: GSMAlertingPattern [ GSMAlertingPattern class >> elementId [ ^ 16r19 ] GSMAlertingPattern class >> length [ ^ 2 ] @@ -729,6 +739,7 @@ GSM48MSG subclass: GSM48CCMessage [ GSM48CCMessage class >> msgAlerting [ ^ 16r1 ] GSM48CCMessage class >> msgProceeding [ ^ 16r2 ] GSM48CCMessage class >> msgSetup [ ^ 16r5 ] + GSM48CCMessage class >> msgConnect [ ^ 16r7 ] ti [ ^ ti ifNil: [ 0 ] @@ -1027,6 +1038,31 @@ GSM48CCMessage subclass: GSM48CCAlerting [ ] ] +GSM48CCMessage subclass: GSM48CCConnect [ + + + Mandantory := nil. + Optional := nil. + + GSM48CCConnect class >> messageType [ ^ self msgConnect ] + GSM48CCConnect class >> Mandantory [ + ^ Mandantory ifNil: [ Mandantory := OrderedCollection new. ] + ] + + GSM48CCConnect class >> Optional [ + ^ Optional ifNil: [ Optional := OrderedCollection new. ] + ] + + GSM48CCConnect class >> initialize [ + self addOptional: 'facility' with: GSMFacility. + self addOptional: 'progress' with: GSMProgress. + self addOptional: 'connected' with: GSMConnectedNumber. + self addOptional: 'connectedSub' with: GSMConnectedSubNumber. + self addOptional: 'useruser' with: GSMUserUser. + self addOptional: 'ssVersion' with: GSMSSVersionInd. + ] +] + Eval [ GSM48LURequest initialize. GSM48LUReject initialize. @@ -1041,4 +1077,5 @@ Eval [ GSM48CCSetup initialize. GSM48CCProceeding initialize. GSM48CCAlerting initialize. + GSM48CCConnect initialize. ] diff --git a/Tests.st b/Tests.st index 34a53ce..e680a82 100644 --- a/Tests.st +++ b/Tests.st @@ -359,5 +359,10 @@ TestCase subclass: TestMessages [ inp := #(6 0 0 72 0 1 9 1 0 6 131 1 30 2 234 129) asByteArray. msg := MSGParser parse: inp. self assert: msg toMessage asByteArray = inp. + + "Connect" + inp := #(6 0 0 72 0 1 5 1 0 2 131 7) asByteArray. + msg := MSGParser parse: inp. + self assert: msg toMessage asByteArray = inp. ] ]