GSM: Call Control with a fixed number
This commit is contained in:
parent
fd74ca7bd6
commit
761201406b
27
GSMDriver.st
27
GSMDriver.st
|
@ -241,6 +241,8 @@ ProcedureBase subclass: CallProcedure [
|
|||
| cm |
|
||||
|
||||
cm := GSM48CMServiceReq new.
|
||||
cm mi imsi: aPhone imsi.
|
||||
cm keyAndType val: 16r21.
|
||||
self openConnection: cm sapi: 0 phone: aPhone handler: aHandler.
|
||||
]
|
||||
|
||||
|
@ -248,4 +250,29 @@ ProcedureBase subclass: CallProcedure [
|
|||
super execute.
|
||||
'Call Complete' printNl.
|
||||
]
|
||||
|
||||
serviceAccepted [
|
||||
| resp |
|
||||
'Accepted' printNl.
|
||||
|
||||
resp := GSM48CCSetup new.
|
||||
resp bearer1OrDefault data: #(16r60 16r02 0 1 4 16r85) asByteArray.
|
||||
resp calledOrDefault data: #(16r91 54 25 8 6 4 16) asByteArray.
|
||||
conn nextPutData: (BSSAPDTAP initWith: resp linkIdentifier: 0).
|
||||
]
|
||||
|
||||
handleData: aMsg sapi: aSapi [
|
||||
aMsg class messageType = GSM48CCMessage msgConnect ifTrue: [
|
||||
| resp |
|
||||
resp := GSM48CCConnectAck new.
|
||||
conn nextPutData: (BSSAPDTAP initWith: resp linkIdentifier: 0).
|
||||
].
|
||||
|
||||
aMsg class messageType = GSM48CCMessage msgDisconnect ifTrue: [
|
||||
| resp |
|
||||
resp := GSM48CCRelease new.
|
||||
resp causeOrDefault data: #(16rE1 16r90) asByteArray.
|
||||
conn nextPutData: (BSSAPDTAP initWith: resp linkIdentifier: 0)
|
||||
].
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue