The RTCP socket can be disabled from the config file.

git-svn-id: http://voip.null.ro/svn/yate@1059 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-09-26 18:34:48 +00:00
parent f9d8a9c8bf
commit 1e1b6c6ba0
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,9 @@
; autoaddr: bool: Auto change outgoing RTP address:port to match incoming
;autoaddr=enabled
; rtcp: bool: Allocate socket for the RTCP protocol by default
;rtcp=enabled
; defsleep: int: Default in-loop sleep time for new RTP sessions in milliseconds
;defsleep=5

View File

@ -78,6 +78,7 @@ static int s_maxport = MAX_PORT;
static int s_bufsize = BUF_SIZE;
static String s_tos;
static bool s_autoaddr = true;
static bool s_rtcp = true;
static int s_sleep = 5;
static int s_minjitter = 0;
@ -638,7 +639,7 @@ bool AttachHandler::received(Message &msg)
if (!w)
w = YRTPWrapper::find(msg.getValue("rtpid"));
if (!w) {
w = new YRTPWrapper(lip,ch,media);
w = new YRTPWrapper(lip,ch,media,RTPSession::SendRecv,msg.getBoolValue("rtcp",s_rtcp));
w->setMaster(msg.getValue("id"));
if (!src.null()) {
@ -724,7 +725,7 @@ bool RtpHandler::received(Message &msg)
}
msg.setParam("localip",lip);
w = new YRTPWrapper(lip,ch,media,direction,msg.getBoolValue("rtcp",true));
w = new YRTPWrapper(lip,ch,media,direction,msg.getBoolValue("rtcp",s_rtcp));
w->setMaster(msg.getValue("id"));
}
else {
@ -815,6 +816,7 @@ void YRTPPlugin::initialize()
s_maxjitter = cfg.getIntValue("general","maxjitter");
s_tos = cfg.getValue("general","tos");
s_autoaddr = cfg.getBoolValue("general","autoaddr",true);
s_rtcp = cfg.getBoolValue("general","rtcp",true);
s_sleep = cfg.getIntValue("general","defsleep",5);
RTPGroup::setMinSleep(cfg.getIntValue("general","minsleep"));
setup();