Asterisk DTMF decode

This is a general question on the underlying basic functionality within Asterisk I have been unable to answer.

Assuming:

  1. An installation of Asterisk with no additional plug-in cards performing any analogue or digital functions, i.e just asterisk on a PC (say a portable).
  2. LAN based SIP phones
  3. LAN ATA supporting one analog PSTN line and one analog POT
  4. All device CODECs set to G711u or G711a
  5. All devices and asterisk set to DTMF in-band

Question:
Does (can) Asterisk in the above scenario provide DTMF decode of in-band DTMF digits prior to AND after a call is established?

To do this would surely require asterisk to be running SOFTWARE G711a/u codecs on all ‘speech packets’ and further a SOFTWARE DTMF decoder on all speech packets for the duration of all calls.

If indeed this is possible and implemented, it would seem to place a high demand on the PC and limit the number of concurrent calls.

Many thanks

inband detection prior to call establishment is not valid for SIP, it doesn’t work that way. It’s valid for DAHDI, MGCP, SCCP, etc. though. Yes, Asterisk can do inband DTMF detection. Most people do out of band transmission though (RFC2833) since it’s more reliable and survives compression.

Hi many thanks for quick reply. I am interested to understand the firm underlying methods when building complete systems to avoid problems with DTMF. I am not saying that one would actually set up a system like this. Its just an example to help clarify my question.

  1. So a ‘software only’ asterisk is able to run audio codecs and DTMF decoding on all speech paths (calls) in progress all the time during established calls? This must surely take some processing power and limit the number of concurrent calls?

  2. Its just that say the digits ** are used to initiate a transfer, if all devices are set to in-band, then since this can occur at any time after a call is established (and by either party on internal calls) THEN asterisk must be able to detect in-band DTMF at any time and without hardware, it must be using software codecs and DTMF receivers.

  3. Sorry, I realise DTMF is not used by SIP phones (or POTS on an ATA) for call setup but would DTMF detectors be applied by asterisk during call setup? If they are, I assume their ‘output’ is ignored until a call is established?

many thanks

[quote=“tessellation”]Hi many thanks for quick reply. I am interested to understand the firm underlying methods when building complete systems to avoid problems with DTMF.
[/quote]
Do what you can to get rid of inband DTMF. Use out of band methods, preferably the RFC2833 option, they’re more reliable. It should be supported by everything. If you have equipment that doesn’t support it, you should look for new equipment.

Yes.

Yes, but DTMF decoders are nothing compared to codec translators or resamplers or denoisers, etc.

Even if the DTMF is out of band, Asterisk still has to detect the DTMF during the call if it’s told to. Asterisk is a B2BUA, it’s built to detect DTMF - it’s necessary for all kinds of things.

Asterisk only applies DTMF detectors on call setup for channel types that require it, e.g. DAHDI-attached FXS devices.

Thanks for the reply, that has clarified quite a bit. But subsequent question:

Say all devices set to use RFC method but any analog POT on an ATA will also send DTMF to line and unless the ATA opens its outgoing audio path, DTMF will ‘go to line’, been seen by asterisk but I assume because its set to RFC it will use the out of band, ignore the in-band. Will it now instruct - say an ATA PSTN port - to generate DTMF but if the audio path is present, we will get the in-band audio and the re-generated DTMF caused by the out-of-band message.

Would you mind clarifying the above scenario? what is supposed to happen? (and what can happen?)!

Many thanks

It’s the ATA’s job to relay outofband RFC2833 DTMF events to inband DTMF out to the PSTN.