Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 11:24 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Max Call Duration
PostPosted: Sun Nov 30, 2008 10:06 pm 
Offline

Joined: Wed Aug 27, 2008 11:30 am
Posts: 108
Dear Sir,
I'm trying to limit the max call duration to 1h...I defined the following variable for this purpose, but I'm still getting much more than 1h calls...

dialcommand_param_sipiax_friend = "|60|HRgiL(3600000:61000:30000)"

Can you still let me know what could be done in that case?

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2008 11:30 am 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
this setting is for internal sip/iax calls, not for "normal" calls.

you should read the a2billing.conf!!!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 11:32 pm 
Offline

Joined: Wed Aug 27, 2008 11:30 am
Posts: 108
Dear Sir,

I checked the a2billing.conf...The only variable related to max call duration is:

; When a call is made we need to limit the call duration : amount in seconds
predictivedialer_maxtime_tocall = 5400

This is for local calls...I did not see any other variable that talks about normal calls(PSTN calls)

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 12:23 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
michofr wrote:
I checked the a2billing.conf...The only variable related to max call duration is:
You can limit all calls to a maximum of 1 hour by changing dialcommand_param (rather than dialcommand_param_sipiax_friend as you previously modified). Be aware though that this will allow up to 1 hour call time to every card, regardless of whether or not their balance can fund a 1 hour call.
A better way would be to modify the rate-engine to cap calls at 3600s, but permit shorter timeouts too.


Last edited by stavros on Thu Dec 04, 2008 2:47 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 8:02 am 
Offline

Joined: Wed Aug 27, 2008 11:30 am
Posts: 108
Dear Stavros,

I need to limit the max call duration for each call and not for all card call, which mean if I limit the max call duration to 30 min, a user cannot make a call with a duration more that 30 minutes but he can do 2 or 3 or whatever with duration 29 minutes for example

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 9:24 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

I was looking at the dial commands on VoIP info, and spotted this which may be useful to you.

S(n): Hangup the call n seconds AFTER called party picks up.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 11:16 am 
Offline

Joined: Wed Aug 27, 2008 11:30 am
Posts: 108
Dear jroper,

Thanks for your reply...As you know, when using billing with asterisk the a2billing context used when making a call has the following format:


[a2billing]

exten => _X.,1,DeadAGI,a2billing.php
exten => _X.,2,Wait,10
exten => _X.,3,Hangup

No Dial function is used here, that's why I'm asking if we can do that from the a2billing configuration

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 11:21 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
michofr wrote:
I need to limit the max call duration for each call and not for all card call, which mean if I limit the max call duration to 30 min, a user cannot make a call with a duration more that 30 minutes but he can do 2 or 3 or whatever with duration 29 minutes for example
The advice in my previous reply describes how to do this.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 11:54 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Stavros

Almost describes it, a slight copy paste error - he should modify dialcommand_param not dialcommand_param_sipiax_friend

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 2:48 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Oh yes. My post makes a lot more sense after applying that correction. Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 3:02 pm 
Offline

Joined: Wed Aug 27, 2008 11:30 am
Posts: 108
Dear Sir,

Thanks a lot for the reply,

If I use the below:

dialcommand_param = "|60|HRgL(7200000:61000:30000)"

This will give a max duration of 2 hours(7200s) per call and not per account?
Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 3:20 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
NOOOOO

We are trying to help here, try and meet us halfway by reading what we have written.

That will give a call duration of 7200000 - irrespective of balance, not something you want to do.

As explained above - try using the switch.


dialcommand_param = "|60|giLs(3600)(%timeout%:61000:30000)"

Although I have not tested it, that should give you a maximum duration of 3600 seconds, and hang the call up before ,if your customer runs out of credit.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 3:41 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
jroper wrote:
dialcommand_param = "|60|giLs(3600)(%timeout%:61000:30000)"


I can see 2 problems with that:
first, you have inserted the s() in the middle of the L() syntax. The correct would be s(...)L(...)

Second, it may simply not work, either. As far as I remember from the Asterisk code, it can only respect one of L,S, not both of them.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 4:02 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Yes, you are right, I got the syntax in the wrong place. It's probably worth a try to see if they are mutually exclusive.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2008 4:21 pm 
Offline

Joined: Mon Sep 01, 2008 3:22 pm
Posts: 21
Location: Dominican Republic
This can be done with a little modification on the rate-engine as Stavros already posts says.

You can add a new column to the cc_card table like 'maxseconds' and compare the value from that column with the timout past to the Class.RateEngine.php perform call function. If the timeout calculated is greater than the maxseconds defined for the card then the timeout is going to be overwritten by the maxseconds.

This way you can define a maximum call duration for each customer individually.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group