diff --git a/callagent/MGCPCommands.st b/callagent/MGCPCommands.st index cce994a..707a3c4 100644 --- a/callagent/MGCPCommands.st +++ b/callagent/MGCPCommands.st @@ -1,5 +1,5 @@ " - (C) 2010-2011 by Holger Hans Peter Freyther + (C) 2010-2012 by Holger Hans Peter Freyther All Rights Reserved This program is free software: you can redistribute it and/or modify @@ -164,3 +164,18 @@ MGCPCommand subclass: MGCPAUEPComamnd [ yourself ] ] + +MGCPCommand subclass: MGCPOsmoRSIPCommand [ + + + + MGCPOsmoRSIPCommand class >> verb [ + + ^ 'RSIP' + ] + + MGCPOsmoRSIPCommand class >> createRSIP [ + ^ self new + ] +] diff --git a/callagent/MGCPTransaction.st b/callagent/MGCPTransaction.st index 2de2672..f38efba 100644 --- a/callagent/MGCPTransaction.st +++ b/callagent/MGCPTransaction.st @@ -1,5 +1,5 @@ " - (C) 2011 by Holger Hans Peter Freyther + (C) 2011-2012 by Holger Hans Peter Freyther All Rights Reserved This program is free software: you can redistribute it and/or modify @@ -126,6 +126,11 @@ MGCPTransactionBase subclass: MGCPTransaction [ id := anId. ] + command [ + + ^ command + ] + command: aMGCPCommand [ command := aMGCPCommand. diff --git a/callagent/Tests.st b/callagent/Tests.st index 9f7c2a6..2bb86ee 100644 --- a/callagent/Tests.st +++ b/callagent/Tests.st @@ -1,5 +1,5 @@ " - (C) 2010-2011 by Holger Hans Peter Freyther + (C) 2010-2012 by Holger Hans Peter Freyther All Rights Reserved This program is free software: you can redistribute it and/or modify @@ -85,6 +85,22 @@ TestCase subclass: MGCPCommandTest [ self assert: crcx asDatagram = self exampleCRCX. ] + exampleRSIP [ + ^ (WriteStream on: String new) + nextPutAll: 'RSIP 808080 14@mgw MGCP 1.0'; cr; nl; + contents + ] + + testRSIPCreation [ + | trans | + + trans := (MGCPTransaction on: self endpoint of: self callagent) + transactionId: '808080'; + command: (MGCPOsmoRSIPCommand createRSIP); + yourself. + self assert: trans command asDatagram = self exampleRSIP. + ] + testEndPointName [ | trunk | trunk := MGCPDSTrunk createWithDest: '0.0.0.0' trunkNr: 1.