mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Merge "chan_sip.c: Update dialog fromtag after request with auth"
This commit is contained in:
@@ -9234,6 +9234,15 @@ static struct sip_pvt *__find_call(struct sip_request *req, struct ast_sockaddr
|
|||||||
|
|
||||||
switch (found) {
|
switch (found) {
|
||||||
case SIP_REQ_MATCH:
|
case SIP_REQ_MATCH:
|
||||||
|
sip_pvt_lock(sip_pvt_ptr);
|
||||||
|
if (args.method != SIP_RESPONSE && args.authentication_present
|
||||||
|
&& strcmp(args.fromtag, sip_pvt_ptr->theirtag)) {
|
||||||
|
/* If we have a request that uses athentication and the fromtag is
|
||||||
|
* different from that in the original call dialog, update the
|
||||||
|
* fromtag in the saved call dialog */
|
||||||
|
ast_string_field_set(sip_pvt_ptr, theirtag, args.fromtag);
|
||||||
|
}
|
||||||
|
sip_pvt_unlock(sip_pvt_ptr);
|
||||||
ao2_iterator_destroy(iterator);
|
ao2_iterator_destroy(iterator);
|
||||||
dialog_unref(fork_pvt, "unref fork_pvt");
|
dialog_unref(fork_pvt, "unref fork_pvt");
|
||||||
free_via(via);
|
free_via(via);
|
||||||
|
Reference in New Issue
Block a user