Hi all,
 
I've started looking at the code stipus provided to detect inband DTMF 
(http://list.sipfoundry.org/archive/sipxtapi-dev/msg01507.html). His version is 
based on an older version of sipxmedialib, i.e. where MpConnection is still in 
one piece. In the meantime, MpConnection has been split up into at least two 
classes, and several other changes have been made to the design. A few 
questions have arisen when figuring out what would be the best way to 
accomplish this:

Who should handle the detection of inband dtmf? In Stipus' version, a separate 
class (MprDecodeInBandDtmf) takes care of it, it is instantiated inside 
MpConnection and added to the resource chain after MprDecode (res = 
pParent->addLink(*mpDecode, 0, *mpDecodeInBandDtmf, 0); in the old version). I 
would assume that in the new version, the correct place would now be 
MpRtpInputAudioConnection, am I correct?
When should the detection take place? As stated above, in the old version the 
inband detection was added to the resource chain inside MpConnection, but the 
internals of MpRtpInputAudioConnection are no longer added to the resource 
chain - MpRtpInputAudioConnection is itself added to the resource chain in 
MpCallFlowGraph, but that's as far as it goes. Therefore the next question 
becomes: where should the detection take place? should 
MpRtpInputAudioConnection call MprDecodeInBandDtmf::doProcessFrame inside 
MpRtpInputAudioConnection::processFrame, should perhaps MprDecode handle this, 
or should some entirely other mechanism be used?
A notification about the DTMF code must be passed upwards when detected, and in 
Stipus version he uses the mpFlowGraph variable defined inside MpResource - but 
that variable isn't necessarily initialized, and MpRtpInputAudioConnection 
doesn't seem to know about the flow graph, hence it probably won't be able to 
tell MprDecodeInBandDtmf about the flowgraph etc. So the third question is: 
what is the preferred way to accomplish this? As I understood then some rewrite 
of the messaging framework was in the pipeline, but I simply don't remember 
what the status on that is.
I think that would be all for now, I do hope that I will succeed in 
incorporating this functionality into the codebase, in which case I would 
provide a patch for others interested.
 
Regards,
DanĂ­el
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to