DTMF detection after Dial

Hi,

I have a simple set-up where after asterisk receives a SIP call, it dials out using DIAL application and gets connected.

Call is successfully established but DTMF detection is not happening in either of the legs.

In sip.conf , against the peer I have

directmedia = no
directrtpsetup = no
dtmfmode = inband

DTMF methond in the SIP phones are inband and RFC 2833 ( tried both ).

Please help me in detecting DTMF.

Thanks,
Rawat

Please use something like Wireshark and confirm that, in RFC 2833 both sides are specifying telephony events in their SDP and that telephony events are actually being sent in the RTP, and that for inband, the codec is capable of DTMF (the only commonly used ones are G.711 (i.e. ulaw and alaw)) and the tones are actually present in the audio.

Hi david55,

Thanks for the prompt reply.

Wireshark traces confirms that asterisk is the audio media path and RTP is flowing between calling and called parties via asterisk but on pressing any DTMF I can’t see it coming in asterisk logs like

Detected DTMF 5…6…7 or Calling or Called leg received DTMF 6 etc.

On the contrary when DTMF mode is SIP INFO in the SIP phones, DTMF detection comes in asterisk logs.

I am sorry I wasn’t able to explain the issue properly.

Thanks,
Rawat

You are sending DTMF in band over a codec that cannot reliably transmit it;

You are sending telephony events when Asterisk isn’t configured to detect them;

You are not sending telephony events when Asterisk is configured to detect them (for the last two, you need to look at what happens to the RTP stream at the point of the DTMF sending - for RFC 2833, the codec should change for the duration of the digit, to the telephony events codec);

The DTMF digits arriving at Asterisk are two short;

You haven’t enabled any features that would require DTMF digits to be detected (note that even without directmedia enabled, SIP can be bridged packet to packet and thus not requires RFC 2833 to be detected and regenerated).