summaryrefslogtreecommitdiffstats
path: root/callagent/transactions/SIPTransaction.st
diff options
context:
space:
mode:
Diffstat (limited to 'callagent/transactions/SIPTransaction.st')
-rw-r--r--callagent/transactions/SIPTransaction.st16
1 files changed, 11 insertions, 5 deletions
diff --git a/callagent/transactions/SIPTransaction.st b/callagent/transactions/SIPTransaction.st
index 82f8034..1906805 100644
--- a/callagent/transactions/SIPTransaction.st
+++ b/callagent/transactions/SIPTransaction.st
@@ -18,7 +18,7 @@
Object subclass: SIPTransaction [
| sem useragent initial_dialog state timeout success failure notification
- cseq branch retransmit_time fail_time removal
+ cseq branch retransmit_time fail_time removal identity
authorization last_was_auth proxy_authorization last_was_proxy_auth |
<category: 'OsmoSIP-Callagent'>
@@ -36,6 +36,7 @@ Object subclass: SIPTransaction [
<category: 'creation'>
^ self new
initialize;
+ identity: aUA mainIdentity;
userAgent: aUA;
initialDialog: aDialog;
setupTransaction: aCseq;
@@ -73,6 +74,11 @@ Object subclass: SIPTransaction [
useragent := aUA
]
+ identity: anIdentity [
+ <category: 'creation'>
+ identity := anIdentity
+ ]
+
state [
<category: 'state'>
^ state ifNil: [^ self class stateInitial]
@@ -180,13 +186,13 @@ Object subclass: SIPTransaction [
ifFalse: [^self wrongAuth: aResp dialog: aDialog].
authorization := SIPAuthorization new
- username: useragent username;
+ username: identity username;
realm: (auth at: 'realm');
nonce: (auth at: 'nonce');
uri: initial_dialog destinationAddress;
yourself.
authorization
- calculateResponse: useragent password
+ calculateResponse: identity password
operation: self class operationName.
"Increase CSeq and generate a new branch"
@@ -221,7 +227,7 @@ Object subclass: SIPTransaction [
ifFalse: [^self wrongAuth: aResp dialog: aDialog].
proxy_authorization := SIPProxyAuthorization new
- username: useragent proxyUsername;
+ username: identity proxyUsername;
realm: (auth at: 'realm');
nonce: (auth at: 'nonce');
qop: (auth at: 'qop');
@@ -363,7 +369,7 @@ Object subclass: SIPTransaction [
proxy_authorization ifNotNil: [
proxy_authorization incrementClientNonce.
proxy_authorization
- calculateResponse: useragent proxyPassword
+ calculateResponse: identity proxyPassword
operation: self class operationName.
aRequest addParameter: 'Proxy-Authorization' value: proxy_authorization].
]