While building up a new install to test chan_motif, I ran into a failure
due to icesupport being disabled. This was due to me not having an
rtp.conf. It was intended in the code for it to be enabled by default,
but it was only applied if rtp.conf existed.
This patch updates res_rtp_asterisk to be consistent in how it handles
defaults. A few options didn't have their default values set globally,
including icesupport. They are now set and icesupport is enabled by
default, even if you do not have an rtp.conf.
........
Merged revisions 371425 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
STRICT_RTP_OPEN=0,/*! No RTP packets should be dropped, all sources accepted */
STRICT_RTP_LEARN,/*! Accept next packet as source */
STRICT_RTP_CLOSED,/*! Drop all RTP packets not coming from source that was learned */
};
#define DEFAULT_STRICT_RTP STRICT_RTP_CLOSED
#define DEFAULT_ICESUPPORT 1
externstructast_srtp_res*res_srtp;
staticintdtmftimeout=DEFAULT_DTMF_TIMEOUT;
@ -110,12 +119,12 @@ static int rtcpdebugport; /*< Debug only RTCP packets from IP or IP+Port if por
#ifdef SO_NO_CHECK
staticintnochecksums;
#endif
staticintstrictrtp;/*< Only accept RTP frames from a defined source. If we receive an indication of a changing source, enter learning mode. */
staticintlearning_min_sequential;/*< Number of sequential RTP frames needed from a single source during learning mode to accept new source. */
staticinticesupport;
staticintstrictrtp=DEFAULT_STRICT_RTP;/*< Only accept RTP frames from a defined source. If we receive an indication of a changing source, enter learning mode. */
staticintlearning_min_sequential=DEFAULT_LEARNING_MIN_SEQUENTIAL;/*< Number of sequential RTP frames needed from a single source during learning mode to accept new source. */
staticinticesupport=DEFAULT_ICESUPPORT;
staticstructsockaddr_instunaddr;
staticpj_str_tturnaddr;
staticintturnport;
staticintturnport=DEFAULT_TURN_PORT;
staticpj_str_tturnusername;
staticpj_str_tturnpassword;
@ -137,12 +146,6 @@ static pj_thread_t *thread;
/*! \brief Notification that the ICE/TURN worker thread should stop */
staticintworker_terminate;
enumstrict_rtp_state{
STRICT_RTP_OPEN=0,/*! No RTP packets should be dropped, all sources accepted */
STRICT_RTP_LEARN,/*! Accept next packet as source */
STRICT_RTP_CLOSED,/*! Drop all RTP packets not coming from source that was learned */
};
#define FLAG_3389_WARNING (1 << 0)
#define FLAG_NAT_ACTIVE (3 << 1)
#define FLAG_NAT_INACTIVE (0 << 1)
@ -3702,9 +3705,9 @@ static int rtp_reload(int reload)