callagent: Add the RSIP extension to the set of known commands
This commit is contained in:
parent
4abe362c62
commit
aae59837a8
|
@ -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 [
|
||||
<comment: 'I represent an Osmocom Extension to MGCP to reset remote
|
||||
mediagateways. The spec is working the other way around.'>
|
||||
<category: 'MGCP-Callagent'>
|
||||
|
||||
MGCPOsmoRSIPCommand class >> verb [
|
||||
<category: 'verb'>
|
||||
^ 'RSIP'
|
||||
]
|
||||
|
||||
MGCPOsmoRSIPCommand class >> createRSIP [
|
||||
^ self new
|
||||
]
|
||||
]
|
||||
|
|
|
@ -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 [
|
||||
<category: 'creation'>
|
||||
^ command
|
||||
]
|
||||
|
||||
command: aMGCPCommand [
|
||||
<category: 'configuration'>
|
||||
command := aMGCPCommand.
|
||||
|
|
|
@ -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.
|
||||
|
|
Reference in New Issue