ensure that peer-level RTP settings are actually used (bug #4313)
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 19 May 2005 04:49:12 +0000 (04:49 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 19 May 2005 04:49:12 +0000 (04:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5734 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index aa52adf..32fe935 100755 (executable)
@@ -1546,6 +1546,12 @@ static int create_addr(struct sip_pvt *r, char *opeer)
                else
                        r->noncodeccapability &= ~AST_RTP_DTMF;
                ast_copy_string(r->context, p->context,sizeof(r->context));
+               if (!p->rtptimeout)
+                       r->rtptimeout = p->rtptimeout;
+               if (!p->rtpholdtimeout)
+                       r->rtpholdtimeout = p->rtpholdtimeout;
+               if (!p->rtpkeepalive)
+                       r->rtpkeepalive = p->rtpkeepalive;
                if ((p->addr.sin_addr.s_addr || p->defaddr.sin_addr.s_addr) &&
                    (!p->maxms || ((p->lastms >= 0)  && (p->lastms <= p->maxms)))) {
                        if (p->addr.sin_addr.s_addr) {