For each run of the script I calculate the cost of each call and a total of
all the current calls for a prepaid account. I then disconnect all the
calls for any account which has no credit left. I update the credit left
when a call ends.
Stuart
-----Original Message-----
From: Iqbal [mailto:iqbal@gigo.co.uk]
Sent: 09 July 2005 16:12
To: stuart(a)jubileeconsultancy.com; jan(a)iptel.org
Cc: serusers(a)lists.iptel.org
Subject: RE: [Serusers] Session-Timers for Prepaid
Do u recalculate the credit left for each user at every cron and update,
or do you just have a base figure for each account, which gets updates
when the customers himself hangs up
EG when I start a call I have £2.00 left (assuming call is to UK),
obviously the amount left depends upon the destination left (or are you
doing something diff)
Now after 5 mins, lets say ur cron runs, and he is left with £2.00 -
5*0.01 (assuming 1p cost) = 1.95, now do u update the credit left with
1.95, or leave it at 2.00, and then 5 mins later again do £2.00 -
10*0.01 and keep doing this until the user hangs up, at that point the
£2.00 is deducted from.
Iqbal
On 7/9/2005, "Stuart Kirkwood - Jubilee Consultancy Limited"
<stuart(a)jubileeconsultancy.com> wrote:
Hi Iqbal,
My script runs every few minutes. I don't use a disconnect time for each
call because there may be simultaneous calls using the credit from one
prepaid account.
I too have looked at session timers but the gateways I'm using have the
minimum timer value set to 30 minutes which is too long for that to be my
primary method for disconnection but it is OK as a backup.
Regards
Stuart
-----Original Message-----
From: Iqbal [mailto:iqbal@gigo.co.uk]
Sent: 09 July 2005 15:00
To: stuart(a)jubileeconsultancy.com; jan(a)iptel.org
Cc: serusers(a)lists.iptel.org
Subject: RE: [Serusers] Session-Timers for Prepaid
Stuart, doing something similar here, wanted to know your cron setup if
possible, because each user would have a diff disconnect time, depending
on their credit left and destination dialed.
I looked at having variable session timers per user also, but havent had
the time to implement it as yet.
Iqbal
On 7/8/2005, "Stuart Kirkwood - Jubilee Consultancy Limited"
<stuart(a)jubileeconsultancy.com> wrote:
Hi Jan,
My solution for disconnecting calls where the customer has run out of
credit
is to use SER to generate a BYE to the gateway. I
use exec_dset and
exec_msg
from ser.cfg to store in a MySQL table some fields
from the INVITE and ACK
messages that setup the call. Then I have a process which runs
periodically
on my server that queries the table to find calls
that need to be
disconnected and generates, using the SER fifo, a BYE message to the Cisco
gateway which disconnects the call. Not very elegant solution but it
appears to work and I don't have to handle the media stream. I could also
send a BYE to the phone but I don't do that at the moment.
Please could you tell us about how you are solving this problem in
production systems? I expect you have a more elegant and professional
solution.
Regards
Stuart
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Jan Janak
Sent: 08 July 2005 19:28
To: Daryl Sanders
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] Session-Timers for Prepaid
I tried this a long time ago with a Cisco gateway. It worked, SER
did not let re-INVITEs through and the gateway terminated the call. We
are not using it anywhere in production.
Jan.
On 02-07-2005 06:48, Daryl Sanders wrote:
I know there was some discussion in the recently
about using
session-timers as a method for doing prepaid. I'm just wondering if
anyone has actually played around with this, and what your experiences
were? My PSTN Gateways support session-timers, so I was thinking about
trying this.
- Daryl
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers