From fdafbb2132ec55a5784037b35705039a39b34009 Mon Sep 17 00:00:00 2001 From: paulc Date: Fri, 4 Nov 2011 21:25:20 +0000 Subject: [PATCH] Assume chan.dtmf=peerid in the [messages] relay list of callfork.conf Commented out the [messages] section in the sample file. To debugging of relay messages set level INFO and added display of priority. git-svn-id: http://yate.null.ro/svn/yate/trunk@4680 acf43c95-373e-0410-b603-e72c3f656dc1 --- conf.d/callfork.conf.sample | 4 +++- modules/callfork.cpp | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/conf.d/callfork.conf.sample b/conf.d/callfork.conf.sample index 7dae6375..26cec820 100644 --- a/conf.d/callfork.conf.sample +++ b/conf.d/callfork.conf.sample @@ -16,8 +16,9 @@ ; messagename=priority -[messages] +;[messages] ; Custom messages that should be forked to each running slave +; If this section is missing a default chan.dtmf=peerid is assumed ; Each parameter is of the format: ; messagename=parameter @@ -25,3 +26,4 @@ ; Examples: ; chan.dtmf=peerid ; xsip.generate=id + diff --git a/modules/callfork.cpp b/modules/callfork.cpp index 9d4f3d9b..2c14fd6c 100644 --- a/modules/callfork.cpp +++ b/modules/callfork.cpp @@ -656,14 +656,20 @@ void ForkModule::initialize() Debug(this,DebugWarn,"Refusing to fork message '%s'",item->name().c_str()); continue; } - ForkRelay* r = new ForkRelay(item->name(),*item, - cfg.getIntValue(s_prio,item->name(),prio)); - Debug(this,DebugAll,"Will fork messages '%s' matching '%s'", - item->name().c_str(),item->c_str()); + int p = cfg.getIntValue(s_prio,item->name(),prio); + ForkRelay* r = new ForkRelay(item->name(),*item,p); + Debug(this,DebugInfo,"Will fork messages '%s' matching '%s' priority %d", + item->name().c_str(),item->c_str(),p); Engine::install(r); m_hasRelays = true; } } + else { + int p = cfg.getIntValue(s_prio,"chan.dtmf",prio); + Debug(this,DebugInfo,"Default fork for 'chan.dtmf' matching 'peerid' priority %d",p); + Engine::install(new ForkRelay("chan.dtmf","peerid",p)); + m_hasRelays = true; + } } }