smalltalk
/
osmo-st-mgcp
Archived
1
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
osmo-st-mgcp/pharo-porting/changes_for_pharo.st

30 lines
694 B
Smalltalk

MGCPDSTrunk extend [
endpointName: aNr [
^'ds/e1-<1p>/<2p>@mgw'
expandMacrosWithArguments: {trunk. aNr}
]
]
MGCPVirtualTrunk extend [
endpointName: aNr [
^'<1s>@mgw' expandMacrosWith: (aNr radix: 16) asLowercase.
]
]
MGCPGrammar extend [
MGCPCommand [
^self MGCPCommandLine , MGCPParameter star , SDPRecord optional
]
]
MGCPCallAgent extend [
generateTransactionId [
1 to: 100 do: [:each |
| ran |
ran := (OsmoSecureRandom rand: 4) asInteger bitAnd: 536870911.
(self transactionIdIsUsed: ran) ifFalse: [
^ran]].
^self error: 'No free transaction ID.'
]
]