[Asterisk-Users] Limit DTMF tones

Flynn el_flynn at lanvik-icu.com
Thu Nov 4 11:52:02 MST 2004


On 11/4/2004, "Henry Devito" <hdevito at qwest.net> wrote:

>The issue is the inmates have figured out a way to dial long distance
>numbers by calling different private phone numbers and using that companies
>DISA to complete calls. So in order to stop that I have to suppress dtmf
>after so many digits are dialed.  Any idea's?
>

My, prisoners are getting devious :)

Anyways, you'd only be able to do this by hacking the code, as others
have pointed out. What you want is in res_features.c (if I understand
the code correctly), in the function called "ast_bridge_call". On *
release 1.0.1 it's somewhere on line 520:

            if (f && (f->frametype == AST_FRAME_DTMF)) {
                  if (who == peer)
                        ast_write(chan, f);
                  else
                        ast_write(peer, f);
            }

So you'd have to hack it by disabling commenting out that section. I
think this bit of code is only executed once the two legs of the call
are bridged, so it probably wouldn't affect anything else.

I also think that if you were at some point required to be able to send
DTMF after the initial dial pattern, you could programmatically via the
dialplan use the "D" option in the Dial application to send dtmf
digits.

Hope you do test this out before putting it live ;) Free advice, so
don't knock me out if it breaks something else!!

Flynn



More information about the asterisk-users mailing list