[Home]

Summary:ASTERISK-02193: call limit L(...) reset to initial value everytime something is dialed.
Reporter:Dmytro Mishchenko (arkadia)Labels:
Date Opened:2004-08-05 10:33:32Date Closed:2008-01-15 15:04:45.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:my dial plan:

exten => 1380,1,SetVar(LIMIT_CONNECT_FILE=timeleft)
exten => 1380,2,SetVar(LIMIT_TIMEOUT_FILE=timeleft)
exten => 1380,3,dial(iax2/dm:d@123.123.143.122/playback||HgL(20000:10000))
exten => 1380,4,hangup

Here is console output:


CLI> dial 1380
*CLI>     -- Executing SetVar("OSS/dsp", "LIMIT_CONNECT_FILE=timeleft") in new stack
   -- Executing NoOp("OSS/dsp", "") in new stack
   -- Executing Dial("OSS/dsp", "iax2/dm:d@123.123.143.122/playback||HgL(20000:10000)") in new stack
   -- Limit Data:
   -- timelimit=20000
   -- play_warning=10000
   -- play_to_caller=yes
   -- play_to_callee=no
   -- warning_freq=0
   -- start_sound=timeleft
   -- warning_sound=timeleft
   -- end_sound=UNDEF
   -- Called dm:d@123.123.143.122/playback
   -- Call accepted by 123.123.143.122 (format GSM)
   -- Format for call is GSM
   -- IAX2/123.123.143.122:4569/1 answered OSS/dsp
<< Console call has been answered >>
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/20' (language 'en')
   -- Playing 'seconds' (language 'en')
dial 2
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/20' (language 'en')
   -- Playing 'seconds' (language 'en')

   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/20' (language 'en')
   -- Playing 'seconds' (language 'en')
dial 21
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/20' (language 'en')
   -- Playing 'seconds' (language 'en')
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/10' (language 'en')
   -- Playing 'seconds' (language 'en')
1
   -- Playing 'vm-youhave' (language 'en')
   -- Playing 'digits/20' (language 'en')
   -- Playing 'seconds' (language 'en')
hangup
   -- Hungup 'IAX2/123.123.143.122:4569/1'
 == Spawn extension (local, 1380, 3) exited non-zero on 'OSS/dsp'
<< Hangup on console >>

*CLI>


As you see everytime as I dial something call limit timer reset to initial value.

Asterisk version: 5 Aug 04, Linux: suse 9.0.
Comments:By: zoa (zoa) 2004-08-05 11:47:09

i'd think this is expected behaviour, i wouldnt want it any other way.
The dial limit is an option to make a prepay application easier, its not meant to be a complete app_prepay.

(If i'm missing something, please correct me.)

edited on: 08-05-04 11:34

By: Dmytro Mishchenko (arkadia) 2004-08-06 02:12:54

As I understand S() and L() options allow to control the maximum duration of the call.
If I say: dial(iax2/user@host/ext||S(20) the call duration can't be more then 20 second. 20 - may be the value returned by billing system depending from money user has on his account and we can't allow him to talk more.

L() gives more control with possibility to notify user about his limit but it should behave in the same way as S() for limiting call.

So the statement dial(iax2/user@host/ext||L(20000:10000)) should not allow user to make more then 20 seconds call. Or I'm missing something?

Right now when construction dial(iax2/user@host/ext||L(20000:10000)) is used I CAN prolong the call duration simply typing digits on console. And instead of 20 seconds I can talk 1 hour, 2 hours... as much as I want.
Thats a bug for sure.

By: zoa (zoa) 2004-08-06 04:19:49

ooooh, oké, i missed that.
(thought you were dialing a second time).

Its a bug, but no one should have axx to your CLI anyway, so i'd say its a minor one ?

unless of course you are using an asterisk -rx to do things...

By: Dmytro Mishchenko (arkadia) 2004-08-06 04:36:34

I belive its a major bug.

Imagine you have system with

exten => _X.,1,SetVar(LIMIT_CONNECT_FILE=timeleft)
exten => _X.,2,SetVar(LIMIT_TIMEOUT_FILE=timeleft)
exten => _X.,3,dial(iax2/user@termination/${EXTEN}||HgL(${MAXCALLDURATION}:60000))
exten => _X.,4,hangup

dial plan.

I can call you and talk any time I want.

By: zoa (zoa) 2004-08-06 06:59:54

can you also reproduce this without using the CLI ?

By: Dmytro Mishchenko (arkadia) 2004-08-06 07:17:43

yes I can.

By: Mark Spencer (markster) 2004-08-06 10:08:30

Should be fixed in CVS.  If you continue to have trouble please find me on IRC, as I'll need to login to your machine.

By: Digium Subversion (svnbot) 2008-01-15 15:04:45.000-0600

Repository: asterisk
Revision: 3582

U   trunk/res/res_features.c

------------------------------------------------------------------------
r3582 | markster | 2008-01-15 15:04:45 -0600 (Tue, 15 Jan 2008) | 2 lines

Keep track of timelimit across entries to ast_channel_bridge (bug ASTERISK-2193)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=3582