callagent: Add setter for the MGCPEndpoint
Verify the state where the SDP file and the CallId can be set. Unset those when the endpoint is put back into the unused state.
This commit is contained in:
parent
0d952b54fb
commit
4aff818878
|
@ -92,6 +92,8 @@ Object subclass: MGCPEndpoint [
|
|||
<category: 'allocation'>
|
||||
self requireState: self class stateUsed.
|
||||
state := self class stateUnused.
|
||||
sdp := nil.
|
||||
callid := nil.
|
||||
]
|
||||
|
||||
tryBlock [
|
||||
|
@ -117,6 +119,17 @@ Object subclass: MGCPEndpoint [
|
|||
|
||||
sdp: aSdp [
|
||||
<category: 'sdp'>
|
||||
self requireState: self class stateUsed.
|
||||
sdp := aSdp.
|
||||
]
|
||||
|
||||
callId [
|
||||
<category: 'callid'>
|
||||
^ callid
|
||||
]
|
||||
|
||||
callId: aCallId [
|
||||
self requireState: self class stateReserved.
|
||||
callid := aCallId.
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue