callagent: Allow multiple Via tags by having an OrderedCollection
This commit is contained in:
parent
b6e8dd15c6
commit
889461ca7f
2
TODO
2
TODO
|
@ -3,8 +3,6 @@ Grammar:
|
|||
* UTF8 things not defined
|
||||
|
||||
Request/Response:
|
||||
* Change Request to have a list like the Response, this allows to
|
||||
have multiple Via tags...
|
||||
* Parse more Parameters properly...
|
||||
|
||||
Transaction:
|
||||
|
|
|
@ -63,7 +63,7 @@ Object subclass: SIPRequest [
|
|||
|
||||
parameters [
|
||||
<category: 'accessing'>
|
||||
^ parameters ifNil: [parameters := Dictionary new]
|
||||
^ parameters ifNil: [parameters := OrderedCollection new]
|
||||
]
|
||||
|
||||
sdp: aSDP [
|
||||
|
@ -71,10 +71,9 @@ Object subclass: SIPRequest [
|
|||
sdp := aSDP
|
||||
]
|
||||
|
||||
addParameter: name value: aValue [
|
||||
"TODO: What about multiple Via's...?"
|
||||
addParameter: aPar value: aValue [
|
||||
<category: 'accessing'>
|
||||
self parameters at: name put: aValue.
|
||||
self parameters add: (aPar -> aValue).
|
||||
]
|
||||
|
||||
asDatagram [
|
||||
|
@ -85,11 +84,11 @@ Object subclass: SIPRequest [
|
|||
nextPutAll: '%1 %2 SIP/2.0' % {self class verb. self dest};
|
||||
cr; nl.
|
||||
|
||||
self parameters keysAndValuesDo: [:key :value |
|
||||
self parameters do: [:each |
|
||||
out
|
||||
nextPutAll: key;
|
||||
nextPutAll: each key;
|
||||
nextPutAll: ': ';
|
||||
nextPutAll: value;
|
||||
nextPutAll: each value;
|
||||
cr; nl.
|
||||
].
|
||||
|
||||
|
|
Reference in New Issue