mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
Only try to use the invite_branch on outgoing INVITEs with auth credentials.
I have added a comment to the code to help ease understanding of the logic here as well. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+5
-1
@@ -8967,7 +8967,11 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
|
||||
seqno = p->ocseq;
|
||||
}
|
||||
|
||||
if (sipmethod == SIP_CANCEL || sipmethod == SIP_INVITE) {
|
||||
/* A CANCEL must have the same branch as the INVITE that it is canceling.
|
||||
* Similarly, if we need to re-send an INVITE with auth credentials, then we
|
||||
* need to use the same branch as we did the first time we sent the INVITE.
|
||||
*/
|
||||
if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) {
|
||||
p->branch = p->invite_branch;
|
||||
build_via(p);
|
||||
} else if (newbranch) {
|
||||
|
||||
Reference in New Issue
Block a user