diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 14:02:47 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 14:02:47 +0000 |
commit | a93d14316ce295733d8fb4d69614304e2a545f33 (patch) | |
tree | 3cdc49ef9d28cd230c3f84fa300ce8401ce327c8 /channels | |
parent | c5b266afba6887c5f0f631dbf29b5d4c3683edcf (diff) |
Bump branch id on INVITE with auth (bug #1313)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2636 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bf7d3bbd3..3119bb130 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) |