[Asterisk-code-review] Bug ASTERISK-25154. Dialog fromtag not updated by request wi... (asterisk[11])
Damian Ivereigh
asteriskteam at digium.com
Wed Jun 10 02:48:12 CDT 2015
Damian Ivereigh has uploaded a new change for review.
https://gerrit.asterisk.org/616
Change subject: Bug ASTERISK-25154. Dialog fromtag not updated by request with auth
......................................................................
Bug ASTERISK-25154. Dialog fromtag not updated by request with auth
If an INVITE is rejected with a 401 unathorised, and then the second
INVITE comes through with a different fromtag, the dialog will be
matched properly in find_call(), but will continue to save the old
(now incorrect) fromtag. This gives problems later on with matching
future dialog packets. This fix updates the fromtag
Change-Id: I16534adef310303c59dd5989020f580d4305591c
---
M channels/chan_sip.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/16/616/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3637ad7..671c380 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9112,6 +9112,13 @@
switch (found) {
case SIP_REQ_MATCH:
+ if (args.method != SIP_RESPONSE && args.authentication_present) {
+ /* If we have a request that uses athentication, the fromtag may
+ * different from the original call dialog. So update the fromtag */
+ sip_pvt_lock(sip_pvt_ptr);
+ ast_string_field_set(sip_pvt_ptr, theirtag, args.fromtag);
+ sip_pvt_unlock(sip_pvt_ptr);
+ }
ao2_iterator_destroy(iterator);
dialog_unref(fork_pvt, "unref fork_pvt");
free_via(via);
--
To view, visit https://gerrit.asterisk.org/616
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I16534adef310303c59dd5989020f580d4305591c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Damian Ivereigh <damo at launtel.net.au>
More information about the asterisk-code-review
mailing list