paging: Introduce a paging manager than can page on all BSCs
This commit is contained in:
parent
91d3d3ef7a
commit
2b233e68c5
1
Start.st
1
Start.st
|
@ -13,6 +13,7 @@ Eval [
|
||||||
fileIn: 'src/GSMCMServiceRequest.st';
|
fileIn: 'src/GSMCMServiceRequest.st';
|
||||||
fileIn: 'src/GSMEmergencySetup.st';
|
fileIn: 'src/GSMEmergencySetup.st';
|
||||||
fileIn: 'src/BSCIPAConnection.st';
|
fileIn: 'src/BSCIPAConnection.st';
|
||||||
|
fileIn: 'src/PagingManager.st';
|
||||||
fileIn: 'src/MSC.st';
|
fileIn: 'src/MSC.st';
|
||||||
fileIn: 'src/SIPCall.st'.
|
fileIn: 'src/SIPCall.st'.
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<filein>src/GSMMOCall.st</filein>
|
<filein>src/GSMMOCall.st</filein>
|
||||||
<filein>src/GSMLURequest.st</filein>
|
<filein>src/GSMLURequest.st</filein>
|
||||||
<filein>src/GSMEmergencySetup.st</filein>
|
<filein>src/GSMEmergencySetup.st</filein>
|
||||||
|
<filein>src/PagingManager.st</filein>
|
||||||
<filein>src/BSCIPAConnection.st</filein>
|
<filein>src/BSCIPAConnection.st</filein>
|
||||||
<filein>src/MSC.st</filein>
|
<filein>src/MSC.st</filein>
|
||||||
<filein>src/SIPCall.st</filein>
|
<filein>src/SIPCall.st</filein>
|
||||||
|
|
|
@ -70,6 +70,11 @@ peer address, the lac, if it is connected'>
|
||||||
connection := aCon.
|
connection := aCon.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
connection [
|
||||||
|
<category: 'private'>
|
||||||
|
^ connection
|
||||||
|
]
|
||||||
|
|
||||||
sendOsmoRSIP [ <category: 'accessing'> ^ osmoExtension ]
|
sendOsmoRSIP [ <category: 'accessing'> ^ osmoExtension ]
|
||||||
sendOsmoRSIP: useExtension [
|
sendOsmoRSIP: useExtension [
|
||||||
<category: 'private'>
|
<category: 'private'>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"
|
"
|
||||||
(C) 2010-2011 by Holger Hans Peter Freyther
|
(C) 2010-2013 by Holger Hans Peter Freyther
|
||||||
All Rights Reserved
|
All Rights Reserved
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -86,6 +86,13 @@ Object subclass: BSCConnection [
|
||||||
command: Osmo.MGCPOsmoRSIPCommand createRSIP;
|
command: Osmo.MGCPOsmoRSIPCommand createRSIP;
|
||||||
startSingleShot.
|
startSingleShot.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
sendUdt: aMsg [
|
||||||
|
| udt addr |
|
||||||
|
addr := Osmo.SCCPAddress createWith: 254.
|
||||||
|
udt := Osmo.SCCPUDT initWith: addr calling: addr data: aMsg.
|
||||||
|
^ self send: udt toMessage with:Osmo.IPAConstants protocolSCCP.
|
||||||
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
BSCConnection subclass: BSCIPAConnection [
|
BSCConnection subclass: BSCIPAConnection [
|
||||||
|
|
|
@ -160,7 +160,7 @@ Object subclass: MSCBSCConnectionHandler [
|
||||||
]
|
]
|
||||||
|
|
||||||
Object subclass: MSCApplication [
|
Object subclass: MSCApplication [
|
||||||
| hlr vlr config bscListener bscConfig bscConHandler mgcp sip |
|
| hlr vlr config bscListener bscConfig bscConHandler mgcp sip paging |
|
||||||
|
|
||||||
<category: 'OsmoMSC-MSC'>
|
<category: 'OsmoMSC-MSC'>
|
||||||
<comment: 'I am a MSC as I have the VLR/HLR and other instances'>
|
<comment: 'I am a MSC as I have the VLR/HLR and other instances'>
|
||||||
|
@ -190,6 +190,8 @@ Object subclass: MSCApplication [
|
||||||
hlr [ ^ hlr ifNil: [HLRLocalCollection new]]
|
hlr [ ^ hlr ifNil: [HLRLocalCollection new]]
|
||||||
vlr [ ^ vlr ifNil: [VLRLocalCollection new]]
|
vlr [ ^ vlr ifNil: [VLRLocalCollection new]]
|
||||||
|
|
||||||
|
pagingManager [ ^ paging ifNil: [paging := PagingManager initWith: self]]
|
||||||
|
|
||||||
config [ ^ config ifNil: [config := MSCConfig new]]
|
config [ ^ config ifNil: [config := MSCConfig new]]
|
||||||
bscConfig [ ^ bscConfig ifNil: [bscConfig := BSCConfig new]]
|
bscConfig [ ^ bscConfig ifNil: [bscConfig := BSCConfig new]]
|
||||||
bscConHandler [ ^ bscConHandler ifNil: [bscConHandler := MSCBSCConnectionHandler initWith: self]]
|
bscConHandler [ ^ bscConHandler ifNil: [bscConHandler := MSCBSCConnectionHandler initWith: self]]
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
"
|
||||||
|
(C) 2013 by Holger Hans Peter Freyther
|
||||||
|
All Rights Reserved
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
"
|
||||||
|
|
||||||
|
Object subclass: PagingManager [
|
||||||
|
| msc |
|
||||||
|
|
||||||
|
PagingManager class >> initWith: aMsc [
|
||||||
|
^ self new
|
||||||
|
instVarNamed: #msc put: aMsc;
|
||||||
|
yourself.
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
pageAll: anImsi [
|
||||||
|
<category: 'paging'>
|
||||||
|
"Page a subscriber on all LACs of all BSCs"
|
||||||
|
msc bscConfig bscList do: [:bscConfig |
|
||||||
|
"This can race with a disconnect but that is fine."
|
||||||
|
bscConfig connected ifTrue: [
|
||||||
|
OsmoDispatcher dispatchBlock: [
|
||||||
|
self pageBSC: bscConfig with: anImsi]]].
|
||||||
|
]
|
||||||
|
|
||||||
|
pageBSC: aBscConfig with: anImsi [
|
||||||
|
| connection cmd |
|
||||||
|
<category: 'paging'>
|
||||||
|
"Page a single BSC"
|
||||||
|
|
||||||
|
"Is the bsc still connected?"
|
||||||
|
connection := aBscConfig connection.
|
||||||
|
connection ifNil: [
|
||||||
|
^ false
|
||||||
|
].
|
||||||
|
|
||||||
|
cmd := self createPagingCommand: aBscConfig lac with: anImsi.
|
||||||
|
connection sendUdt: cmd toMessage asByteArray.
|
||||||
|
]
|
||||||
|
|
||||||
|
createPagingCommand: aLac with: anImsi [
|
||||||
|
| cmd |
|
||||||
|
cmd := OsmoGSM.IEMessage initWith: OsmoGSM.GSM0808Helper msgPaging.
|
||||||
|
cmd
|
||||||
|
addIe: (OsmoGSM.GSM0808IMSI initWith: anImsi);
|
||||||
|
addIe: (OsmoGSM.GSM0808CellIdentifierList new
|
||||||
|
ident: OsmoGSM.GSM0808CellIdentifierList cellLocationAreaCode;
|
||||||
|
cells: (Array with: aLac);
|
||||||
|
yourself);
|
||||||
|
yourself.
|
||||||
|
|
||||||
|
^ OsmoGSM.BSSAPManagement initWith: cmd toMessage
|
||||||
|
]
|
||||||
|
]
|
Reference in New Issue