Make RTP session ID and session version generation random. (issue #9456 reported...
authorJoshua Colp <jcolp@digium.com>
Mon, 9 Apr 2007 12:33:49 +0000 (12:33 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 9 Apr 2007 12:33:49 +0000 (12:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a954ba3..9f68059 100644 (file)
@@ -6481,7 +6481,7 @@ static int add_t38_sdp(struct sip_request *resp, struct sip_pvt *p)
        }
        
        if (!p->sessionid) {
-               p->sessionid = getpid();
+               p->sessionid = (int)ast_random();
                p->sessionversion = p->sessionid;
        } else
                p->sessionversion++;
@@ -6668,7 +6668,7 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p)
 
        /* Set RTP Session ID and version */
        if (!p->sessionid) {
-               p->sessionid = getpid();
+               p->sessionid = (int)ast_random();
                p->sessionversion = p->sessionid;
        } else
                p->sessionversion++;