invite: Work-around canceling a dialog issue
* -> INVITE * <- 100 Trying * -> Cancel * <- 200 ACK * -> OK * <- 100 Trying ... * <- 463 Timeout and we would run through the same circle again. Instead opt for a simple work-around right now and remember if we canceled once. We should spawn a transaction and remember the result.
This commit is contained in:
parent
c3c038f2c8
commit
3dd23b46dd
|
@ -17,7 +17,7 @@
|
|||
"
|
||||
|
||||
SIPTransaction subclass: SIPInviteTransaction [
|
||||
| sdp ack_branch canceled |
|
||||
| sdp ack_branch canceled cancelSent |
|
||||
|
||||
<category: 'OsmoSIP-Callagent'>
|
||||
<comment: 'RFC3161 17.2.1'>
|
||||
|
@ -36,7 +36,8 @@ SIPTransaction subclass: SIPInviteTransaction [
|
|||
initialize [
|
||||
<category: 'creation'>
|
||||
super initialize.
|
||||
canceled := false
|
||||
canceled := false.
|
||||
cancelSent := false.
|
||||
]
|
||||
|
||||
transmit [
|
||||
|
@ -85,7 +86,13 @@ SIPTransaction subclass: SIPInviteTransaction [
|
|||
|
||||
"We will send a CANCEL, maybe it is already the second."
|
||||
code < 200 ifTrue: [
|
||||
self queueData: (self createCancel asDatagram) dialog: initial_dialog.
|
||||
"Some equipment sent us 100 TRYING. We sent CANCEL, we got a 200 for
|
||||
and then we 'ACK' the cancel. Just for the equipment to send us trying
|
||||
again. TODO: Link a cancel transaction here? And verify that it succeeded?
|
||||
"
|
||||
cancelSent ifFalse: [
|
||||
self queueData: (self createCancel asDatagram) dialog: initial_dialog].
|
||||
cancelSent := true.
|
||||
].
|
||||
|
||||
"We are connected but we didn't want to, let us BYE it"
|
||||
|
@ -148,6 +155,7 @@ SIPTransaction subclass: SIPInviteTransaction [
|
|||
|
||||
old_state = self class stateProceeding ifTrue: [
|
||||
self queueData: self createCancel asDatagram dialog: initial_dialog.
|
||||
cancelSent := true.
|
||||
].
|
||||
old_state = self class stateCompleted ifTrue: [
|
||||
self logError: 'SIPTransaction already completed.' area: #sip.
|
||||
|
|
Reference in New Issue