DTMF/get_data/Directory problem

Hi,

I am very new to Asterisk but have spent some considerable time looking at the various issues with DTMF etc. but still couldn’t find anything about my issue.

I have a problem with the $agi->get_data function, as used in the directory. If I use DTMF to break the intro stream, the stream is stopped (as you’d expect) and the digit stored but then subsequent digits are not captured.

If however, I wait for the announcement to finish before entering any digits, all digits are recognised .

$r = $agi->get_data($intro, 4000, NUM_DIGITS);

In debug I do see message from rtp.c saying that DTMF was sent and see the digits coming in but they don’t seem to get into this function. Any thoughts?

BTW, if I use SIPINFO as the DTMF mode I also see the digits reported by rtp.c but none of them get read.

Thanks,
Chris.

It would seem that this problem only occurs when I connect using my PSTN -> VoiP number, if I do Voip->VoiP it works ok.

It’s weird because all other DTMF seems to get through fine from PSTN, call screening for example… help! :frowning:

OK - so, could someone tell me if this is ‘normal’

I turned on RTP debug to see my DTMF coming in and everything runs just fine, all digits seen etc. until the get_data call is made where RTP packets just stop for the duration of the timeout waiting for DTMF - note, this is only when the out stream (directory intro) is still playing - the RTP packets stop as soon as I hit a digit!? Then after the timeout they resume again…

Got RTP packet from 217.14.138.48:14576 (type 8, seq 37035, ts 175128, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43526, ts 168400, len 160)
Got RTP packet from 217.14.138.48:14576 (type 8, seq 37036, ts 175288, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43527, ts 168560, len 160)
Got RTP packet from 217.14.138.48:14576 (type 8, seq 37037, ts 175448, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43528, ts 168720, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43529, ts 168880, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43530, ts 169040, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43531, ts 169200, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43532, ts 169360, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43533, ts 169520, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43534, ts 169680, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43535, ts 169840, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43536, ts 170000, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43537, ts 170160, len 160)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37038, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37038, ts 175448, len 4, mark 1, event 00000002, end 0, duration 0)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37039, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37039, ts 175448, len 4, mark 0, event 00000002, end 0, duration 0)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37040, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37040, ts 175448, len 4, mark 0, event 00000002, end 0, duration 0)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4, mark 0, event 00000002, end 1, duration 800)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4, mark 0, event 00000002, end 1, duration 800)
Got RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4)
Got rfc2833 RTP packet from 217.14.138.48:14576 (type 101, seq 37041, ts 175448, len 4, mark 0, event 00000002, end 1, duration 800)
Got RTP packet from 217.14.138.48:14576 (type 8, seq 37042, ts 177080, len 160)
AGI Tx >> 200 result=2 (timeout)
AGI Rx << VERBOSE “!!! Done get data - result=2” 1
directory||from-did-direct|f: !!! Done get data - result=2
AGI Tx >> 200 result=1
AGI Rx << STREAM FILE dir-nomatch “” 0
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43538, ts 202336, len 160)
Got RTP packet from 217.14.138.48:14576 (type 8, seq 37043, ts 209248, len 160)
Sent RTP packet to 217.14.138.48:14576 (type 8, seq 43539, ts 202496, len 160)
Got RTP packet from 217.14.138.48:14576 (type 8, seq 37044, ts 209408, len 160)

OK - looks like the problem is with Draytel. I tried using sipgate and this works fine! Just FYI. Sorry to waste bandwidth.