callagent: Add writing SDP to the datagram
This commit is contained in:
parent
74e2cb0415
commit
2a8efb434d
|
@ -17,7 +17,7 @@
|
|||
"
|
||||
|
||||
Object subclass: MGCPCommand [
|
||||
| verb transaction endp params |
|
||||
| verb transaction endp params sdp |
|
||||
<comment: 'I am a command send to a MGCP gateway. I know my timeout
|
||||
and such. Each MGCPGateWay can have a MGCPCommand subclass to specify
|
||||
certain things. E.g. the endpoint numbering is different'>
|
||||
|
@ -71,6 +71,16 @@ Object subclass: MGCPCommand [
|
|||
^ params ifNil: [params := OrderedCollection new]
|
||||
]
|
||||
|
||||
sdpAdd: line [
|
||||
<category: 'private'>
|
||||
self sdp add: line.
|
||||
]
|
||||
|
||||
sdp [
|
||||
<category: 'private'>
|
||||
^ sdp ifNil: [sdp := OrderedCollection new]
|
||||
]
|
||||
|
||||
asDatagram [
|
||||
| out |
|
||||
<category: 'networking'>
|
||||
|
@ -89,6 +99,18 @@ Object subclass: MGCPCommand [
|
|||
cr; nl.
|
||||
].
|
||||
|
||||
"write optional SDP"
|
||||
sdp ifNotNil: [
|
||||
out
|
||||
cr; nl.
|
||||
|
||||
sdp do: [:each |
|
||||
out
|
||||
nextPutAll: each;
|
||||
cr; nl.
|
||||
].
|
||||
].
|
||||
|
||||
^ out contents
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue