From: Mark Spencer Date: Tue, 6 Apr 2004 14:02:47 +0000 (+0000) Subject: Bump branch id on INVITE with auth (bug #1313) X-Git-Tag: 1.0.0-rc1~785 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bbf0d2cf6144c608c2c982bd48299bb7ff1e2c3;p=thirdparty%2Fasterisk.git Bump branch id on INVITE with auth (bug #1313) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2636 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bf7d3bbd31..3119bb1301 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3015,9 +3015,12 @@ static int transmit_invite(struct sip_pvt *p, char *cmd, int sdp, char *auth, ch { struct sip_request req; - if (init) + if (init) { + /* Bump branch even on initial requests */ + p->branch ^= rand(); + snprintf(p->via, sizeof(p->via), "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x", inet_ntoa(p->ourip), ourport, p->branch); initreqprep(&req, p, cmd, vxml_url); - else + } else reqprep(&req, p, cmd, 0, 1); if (auth)