asalles / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
0 stars 0 forks source link

received short dtmf result in endless dtmf to sip #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. call gsm number of dongle sim
2. send short dtmf signal
3. receiving side (sip phone, in my case) hears start of dtmf but tone continues
4. only after sending another, long, dtmf signal, the sending of dtmf to sip 
phone stops

What is the expected output? What do you see instead?
expected: stop dtmf tone at receiving side when sender stops sending dtmf tone

What version of the product are you using? On what operating system?
1.1r10 from tgz
linux 2.6.32 with asterisk 1.8.4.4

Please provide any additional information below.
It seems as if the logic in channel_read is flawed: it just skips the call to 
pvt->dtmf_end_time = ast_tvnow()
upon receiving an AST_FRAME_DTMF_END outside the mindtmfgap/duration/interval 
boundaries.
This approach might work when doing SIP_INFO dtmf, but not when using RFC dtmf. 
In that case, the tone is started and the end is skipped, so the tone continues 
to be sent...

The way I understand the logic, is that you don't want to detect 'short' dtmf 
tones, and that you want to prevent gsm-distortion due to some packet loss to 
generate repeated dtmf digits instead of one, but the current implementation 
does not seem to be the right way to do that. The only way I could get it to 
work properly was to set all mindtmf* stuff to 0 to make sure every start/end 
detected by Asterisk core dsp is handled the way Asterisk thinks is right...

See also attached file with debug output and description of actions and 
reactions.
Settings in dongle.conf:
dtmf=relax
mindtmfgap=45
mindtmfduration=80
mindtmfinterval=200

Original issue reported on code.google.com by mcbchand...@robuust.nl on 8 Aug 2011 at 12:50

Attachments:

GoogleCodeExporter commented 9 years ago
if you want just pass DTMF directly to other leg of channel just say dtmf=off.
this mean inband DTMF still, but no detection DTMF by asterisk at all.

logic for cut short DTMF not perfect, but can your offer other solution?
cut DTMF begin and wait for DTMF end ? Whan passing DTMF up from chan_dongle?

the major problems for asterisk DTMF detection is duplicated DTMF and
asterisk do actions (for AVR ) on END edge of DTMF 

Original comment by bg_...@mail.ru on 8 Aug 2011 at 9:13

GoogleCodeExporter commented 9 years ago
With dtmf=off you can't run a menu system in asterisk, so that wouldn't help 
much. (Not that I'm planning on using that, but chan_dongle should support it.)

Properly detecting and handling inband DTMF is one of the worst things to do 
right, especially with GSM channels that can randomly drop a few frames...
For some applications, length of DTMF digits is not relevant but inter-digit 
time is. For some other applications, the length is relevant, but inter-digit 
time is not. Trying to get both right is almost a mission impossible. 
(Heisenberg compensator, anyone? :-) )

I'll try to dig through asterisk sources and see if I can think of something. 
This is a very promising project (potentially saving our customers lots of 
money spent on expensive simboxes) and I'd be happy to help and improve it!

Original comment by mcbchand...@robuust.nl on 8 Aug 2011 at 9:38