The channel is now trying to send the tones through the reserved circuit

git-svn-id: http://voip.null.ro/svn/yate@1420 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2007-08-07 08:02:24 +00:00
parent 1b84479be6
commit ddf5417b0e

View file

@ -669,12 +669,21 @@ bool SigChannel::msgAnswered(Message& msg)
bool SigChannel::msgTone(Message& msg, const char* tone)
{
if (!(tone && *tone))
return true;
Lock lock(m_callMutex);
DDebug(this,DebugCall,"Tone. '%s' %s[%p]",tone,(m_call ? "" : ". No call "),this);
// Try to send: through the circuit, in band or through the signalling protocol
SignallingCircuit* cic = getCircuit();
if (cic) {
NamedList params("");
params.addParam("tone",tone);
if (cic->sendEvent(SignallingCircuitEvent::Dtmf,&params))
return true;
}
if (m_inband && dtmfInband(tone))
return true;
// If we failed try to send as signalling anyway
if (!m_call || !(tone && *tone))
if (!m_call)
return true;
SignallingMessage* sm = new SignallingMessage;
sm->params().addParam("tone",tone);