Added extra config and message parameter used to start CDR ring timer when processing a call.progress message.

git-svn-id: http://voip.null.ro/svn/yate@5662 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2013-10-10 12:03:38 +00:00
parent 4fc6666d9a
commit fe3c451069
2 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,10 @@
; If set to false the first cdr status is sent after status_interval
;status_answer=true
; ring_on_progress: bool: Start ring timer when processing call.progress
; This parameter can be overridden in call.progress message by a 'ringing' parameter
;ring_on_progress=no
[parameters]
; Each line consists of name=bool where name is the name of the parameter being

View File

@ -197,6 +197,7 @@ static String s_runId;
static bool s_cdrUpdates = true;
static bool s_cdrStatus = false;
static bool s_statusAnswer = true;
static bool s_ringOnProgress = false;
static unsigned int s_statusUpdate = 60000;
static StatusThread* s_updaterThread = 0;
@ -532,7 +533,9 @@ bool CdrHandler::received(Message &msg)
s_updaterThread->exit();
return false;
}
if ((m_type == CdrProgress) && !msg.getBoolValue(YSTRING("earlymedia"),false))
if ((m_type == CdrProgress) &&
!(msg.getBoolValue(YSTRING("earlymedia"),false) ||
msg.getBoolValue(YSTRING("ringing"),s_ringOnProgress)))
return false;
bool track = true;
if (m_type == CdrUpdate) {
@ -883,6 +886,7 @@ void CdrBuildPlugin::initialize()
s_statusUpdate = 600000;
else
s_statusUpdate = sUpdate * 1000;
s_ringOnProgress = cfg.getBoolValue("general","ring_on_progress",false);;
if (s_cdrStatus && !s_updaterThread) {
s_updaterThread = new StatusThread();