Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Andrew Kohlsmith
On November 4, 2004 10:56 am, Henry Devito wrote:
 I have a question and I can't seem to find the answer anywhere.  Is there a
 way to limit the amount of digits dialed?  For example I have a * box set
 up for the department of corrections for prisoners to call home.  It has
 the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in to the fxo
 ports and 2 standard 2500 analog sets for the prisoners to use to dial out.
 Everything seems to work great.  We use * to record all the calls.  After
 the prisoner dials the original number and their PIN,  I do not want them
 to be able to send anymore DTMF tones.  The PIN number is not processed by
 *. It is processed by the LEC's switch.  Thanks in advance

I just did something similar:

[recordcall]
exten = s,1,SetVar(CALLFILENAME=/tmp/calls/${CALLERIDNUM}-${TIMESTAMP})
exten = s,2,Monitor(wav,${CALLFILENAME},m)
exten = s,3,Playback(agent-pass)
exten = s,4,DISA(/path/to/asterisk/passwd/file)

and then just make sure that the extension you dump them in to does not allow 
them to dial anything ohter than what you want (i.e. 7-digit #s or whatnot)

I don't know of any way to suppress DTMF if that's what you're talking about.

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Henry Devito
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?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Kohlsmith
Sent: Thursday, November 04, 2004 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [Asterisk-Users] Limit DTMF tones

On November 4, 2004 10:56 am, Henry Devito wrote:
 I have a question and I can't seem to find the answer anywhere.  Is there
a
 way to limit the amount of digits dialed?  For example I have a * box set
 up for the department of corrections for prisoners to call home.  It has
 the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in to the
fxo
 ports and 2 standard 2500 analog sets for the prisoners to use to dial
out.
 Everything seems to work great.  We use * to record all the calls.  After
 the prisoner dials the original number and their PIN,  I do not want them
 to be able to send anymore DTMF tones.  The PIN number is not processed by
 *. It is processed by the LEC's switch.  Thanks in advance

I just did something similar:

[recordcall]
exten = s,1,SetVar(CALLFILENAME=/tmp/calls/${CALLERIDNUM}-${TIMESTAMP})
exten = s,2,Monitor(wav,${CALLFILENAME},m)
exten = s,3,Playback(agent-pass)
exten = s,4,DISA(/path/to/asterisk/passwd/file)

and then just make sure that the extension you dump them in to does not
allow 
them to dial anything ohter than what you want (i.e. 7-digit #s or whatnot)

I don't know of any way to suppress DTMF if that's what you're talking
about.

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Steven Critchfield
On Thu, 2004-11-04 at 11:30 -0600, Henry Devito 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?

look at the code for # transfer, Asterisk is finding the DTMF while a
call is in progress. You could probably do something along the way of
checking the call timer and once it exceeds a certain point, all DTMFs
are just ignored. It doesn't seem like it would be difficult, but I
haven't looked at the code, nor thought about how that could be merged
back into the codebase as a configurable option.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Andrew
 Kohlsmith
 Sent: Thursday, November 04, 2004 10:13 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [Asterisk-Users] Limit DTMF tones
 
 On November 4, 2004 10:56 am, Henry Devito wrote:
  I have a question and I can't seem to find the answer anywhere.  Is there
 a
  way to limit the amount of digits dialed?  For example I have a * box set
  up for the department of corrections for prisoners to call home.  It has
  the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in to the
 fxo
  ports and 2 standard 2500 analog sets for the prisoners to use to dial
 out.
  Everything seems to work great.  We use * to record all the calls.  After
  the prisoner dials the original number and their PIN,  I do not want them
  to be able to send anymore DTMF tones.  The PIN number is not processed by
  *. It is processed by the LEC's switch.  Thanks in advance
 
 I just did something similar:
 
 [recordcall]
 exten = s,1,SetVar(CALLFILENAME=/tmp/calls/${CALLERIDNUM}-${TIMESTAMP})
 exten = s,2,Monitor(wav,${CALLFILENAME},m)
 exten = s,3,Playback(agent-pass)
 exten = s,4,DISA(/path/to/asterisk/passwd/file)
 
 and then just make sure that the extension you dump them in to does not
 allow 
 them to dial anything ohter than what you want (i.e. 7-digit #s or whatnot)
 
 I don't know of any way to suppress DTMF if that's what you're talking
 about.
 
 -A.
 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Steven Critchfield [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Andrew Kohlsmith
On November 4, 2004 12:30 pm, Henry Devito 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?

Without hacking the source... no.  

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Flynn
On 11/4/2004, Henry Devito [EMAIL PROTECTED] 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
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Andrew Thompson
Andrew Kohlsmith wrote:
On November 4, 2004 12:30 pm, Henry Devito 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?
If you configured a SIP phone to not transmit inband DTMF, would 
asterisk translate that to inband DTMF when bridged to an inband DTMF 
only connection, ie your POTS line?

Note: Just talking out of my head here, I've not actually tested this...
In any case, chan_sip would be much more likely to be hackable to make 
DTMF quit working.

--
Andrew Thompson
http://aktzero.com/
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Steven Critchfield
On Thu, 2004-11-04 at 13:59 -0500, Andrew Thompson wrote:
 Andrew Kohlsmith wrote:
  On November 4, 2004 12:30 pm, Henry Devito 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?
 
 If you configured a SIP phone to not transmit inband DTMF, would 
 asterisk translate that to inband DTMF when bridged to an inband DTMF 
 only connection, ie your POTS line?

Depends on the codec if it would be able to detect and therefore
squelch.

 Note: Just talking out of my head here, I've not actually tested this...
 
 In any case, chan_sip would be much more likely to be hackable to make 
 DTMF quit working.

As long as asterisk is looking for DTMF, and it is connected, the best
place would be in the bridging where it is looking at the frames. As has
been posted before, when you are reading the frames as they come in, you
could just look at the frame type and decide whether it needed to be
sent or acted upon. In this case, acted upon could be dropping it to the
floor and replacing it with a silence frame of the proper duration.
-- 
Steven Critchfield [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Flynn
On 11/4/2004, Andrew Thompson [EMAIL PROTECTED] wrote:


In any case, chan_sip would be much more likely to be hackable to make
DTMF quit working.


Possibly, but his working configuration most likely doesn't use SIP (I
would presume):

It has the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in
to the fxo ports and 2 standard 2500 analog sets for the prisoners to
use to dial out.

Flynn
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Andrew Thompson
Flynn wrote:
  Possibly, but his working configuration most likely doesn't use SIP (I
would presume):
It has the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in
to the fxo ports and 2 standard 2500 analog sets for the prisoners to
use to dial out.
Yeah, I saw that, but the replies I'd seen so far were not looking real 
promising, so I thought I'd throw out another idea.

Even if the handsets were ruggedized, a Sipura could sit in between them 
and asterisk.

Critchfield's response about the bridge code seems the place to look, 
but that's going to require coding and testing.

If a SIP adapter could be dropped in and as a side effect of the 
configuration it broke sending DTMF out, only a few changes to the 
dialplan would be required to get things back in order.

Anyway, it was just an idea, and he did say he was looking for ideas.
--
Andrew Thompson
http://aktzero.com/
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread dean collins
Hi Flynn,
Feel free to contact me offline if you feel this isn't suitable
conversation for online but I read an article about this a few weeks ago
about how you were freezing out other carriers for offering cheaper
calls to inmates than the inflated prices you charged. And I don't
understand how you are legally allowed to do this.

It must be profit driven because surely I could call one of my approved
numbers eg sister and then have her pass along the information to a
third party. 

Surely if you were looking to solve this 'isolation' issue and were
serious about it you would be tackling this problem another way.


Cheers,
Dean


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Flynn
Sent: Thursday, November 04, 2004 1:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] Limit DTMF tones

On 11/4/2004, Henry Devito [EMAIL PROTECTED] 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
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Andrew Kohlsmith
 It has the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in
 to the fxo ports and 2 standard 2500 analog sets for the prisoners to
 use to dial out.

What about simply putting a lock over the buttons after they've dialled the 
phone number and entered the password?

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Limit DTMF tones

2004-11-04 Thread Steven Critchfield
On Thu, 2004-11-04 at 14:51 -0500, Andrew Kohlsmith wrote:
  It has the Digium 2 FXO/ 2 FXS card in it.  I have two Lines brought in
  to the fxo ports and 2 standard 2500 analog sets for the prisoners to
  use to dial out.
 
 What about simply putting a lock over the buttons after they've dialled the 
 phone number and entered the password?

That doesn't stop pulse dialing, It also would require someone to do the
work. Might as well create an operator who did all the dialing.
-- 
Steven Critchfield [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users