diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-18 19:31:35 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-03-18 19:31:35 +0100 |
commit | 15ef9af47933d77db1e2f9991f50759e0e64b8ba (patch) | |
tree | 7dae498214a870fc94db37f0227600e188d28156 | |
parent | 71aaedb9226e679b7c3dba31a78865c0fecf007b (diff) |
more hacks..hfreyther/features/proxy-auth
-rw-r--r-- | callagent/transactions/SIPInviteTransaction.st | 14 | ||||
-rw-r--r-- | callagent/transactions/SIPRegisterTransaction.st | 4 | ||||
-rw-r--r-- | callagent/useragent/SIPUserAgentBase.st | 1 |
3 files changed, 14 insertions, 5 deletions
diff --git a/callagent/transactions/SIPInviteTransaction.st b/callagent/transactions/SIPInviteTransaction.st index a462577..5691f5e 100644 --- a/callagent/transactions/SIPInviteTransaction.st +++ b/callagent/transactions/SIPInviteTransaction.st @@ -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. diff --git a/callagent/transactions/SIPRegisterTransaction.st b/callagent/transactions/SIPRegisterTransaction.st index e5cba72..879c99e 100644 --- a/callagent/transactions/SIPRegisterTransaction.st +++ b/callagent/transactions/SIPRegisterTransaction.st @@ -44,8 +44,8 @@ SIPTransaction subclass: SIPRegisterTransaction [ addParameter: 'CSeq' value: ('<1p> <2s>' expandMacrosWith: cseq with: 'REGISTER'); addParameter: 'Call-ID' value: aDialog callId; - addParameter: 'Contact' value: '*'; - addParameter: 'Expires' value: '0'; + addParameter: 'Contact' value: '<', aDialog contact, '>'; + addParameter: 'Expires' value: '3600'; yourself. self addAuthorizationTo: reg. useragent injectDefaults: reg. diff --git a/callagent/useragent/SIPUserAgentBase.st b/callagent/useragent/SIPUserAgentBase.st index 26b2441..2b4dedc 100644 --- a/callagent/useragent/SIPUserAgentBase.st +++ b/callagent/useragent/SIPUserAgentBase.st @@ -64,6 +64,7 @@ Object subclass: SIPUserAgentBase [ nextPutAll: transport port asString; nextPutAll: ';branch='; nextPutAll: aBranch; + nextPutAll: ';rport'; contents. ] |