Hi,
o Andreas Granig on 05/05/2011 06:28 PM:
Hi,
I think there's a problem with the handling of Record-Routes and Routes
when Sems sbc module performs authentication towards a peer host. The
initial INVITE is sent out as expected. When the 407 contains a
Record-Route set, then this is used as Route set in the following INVITE
containing the Proxy-Authorization headers, plus the outbound proxy is
also put into the Route. Is this really the correct behaviour? Shouldn't
the second INVITE just look like the first one?
I always get confused with auth, is it a new dialog or not?
I can't test it right now (sorry!) but you could try attached patch.
It also resets the remote URI, which might be necessary (?).
Stefan
diff --git a/core/AmSipDialog.h b/core/AmSipDialog.h
index 9bf9e3b..7004fea 100644
--- a/core/AmSipDialog.h
+++ b/core/AmSipDialog.h
@@ -224,6 +224,8 @@ class AmSipDialog
bool getUACInvTransPending();
int getStatus() { return status; }
void setStatus(int new_status);
+ void clearRoute() { route.clear(); }
+ void clearRemoteURI() { remote_uri.clear(); }
string getContactHdr();
diff --git a/core/plug-in/uac_auth/UACAuth.cpp b/core/plug-in/uac_auth/UACAuth.cpp
index 5804889..3bfb0d4 100644
--- a/core/plug-in/uac_auth/UACAuth.cpp
+++ b/core/plug-in/uac_auth/UACAuth.cpp
@@ -182,7 +182,13 @@ bool UACAuth::onSipReply(const AmSipReply& reply, int old_dlg_status, const stri
}
}
+ if (old_dlg_status < AmSipDialog::Connected) {
+ // reset Route
+ dlg->clearRoute();
+ dlg->clearRemoteURI();
+ }
}
+
// resend request
if (dlg->sendRequest(ri->second.method,
ri->second.content_type,
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems