I have been playing with this for a few days now and its working great, thanks. One feature I am missing is the ability to have different rates for peak and off-peak times, is this planned for the future or would this be a custom request ?
I am prepared to pay for the development to get this working, let me know if you are interested.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been playing with this for a few days now and its working great,
thanks. One feature I am missing is the ability to have different rates for
peak and off-peak times, is this planned for the future or would this be a
custom request ?
I am prepared to pay for the development to get this working, let me know
if you are interested.
Something like from 7am to 7pm weekdays call will cost 0.50/min ie peak and off peak will be lets say 0.40/min from 7:01pm to 6:59am and during weekends.
-Andrew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Something like from 7am to 7pm weekdays call will cost 0.50/min ie peak
and off peak will be lets say 0.40/min from 7:01pm to 6:59am and during
weekends.
I hacked together something to get this working, here is what I did:
create 2 ratecards, peak and off-peak, do this in the gui, I am showing the mysql cli here.
mysql> select id,trunkid,name from ratecards;
+----+---------+--------------+
| id | trunkid | name |
+----+---------+--------------+
| 1 | 1 | Peak |
| 2 | 1 | OffPeak |
+----+---------+--------------+
2 rows in set (0.00 sec)
now add your rates, I use the upload rates with a csv file. I am showing only 1 prefix here, there are many more. ( note the ratecard id is different )
mysql> select ratecardid,dialprefix,destname,buyrate from rates where dialprefix ='00';
+------------+------------+----------+---------+
| ratecardid | dialprefix | destname | buyrate |
+------------+------------+----------+---------+
| 1 | 00 | Intl | 0.35 |
| 2 | 00 | Intl | 0.35 |
+------------+------------+----------+---------+
2 rows in set (0.00 sec)
now I made 2 files under /usr/src/easyitsp/CRON - rates-peak.sh and rates-offpeak.sh
rates-peak.sh:
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid = '1'"
and
rates-offpeak.sh
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid = '2'"
Now add these to run out of easyitsp_cron at the times you want. For me Mon-Fri 7am to 19:59 is peak the rest is offpeak so this is my crontab:
00 07 * Mon-Fri root /usr/src/easyitsp/CRON/rate-peak.sh
00 20 * Mon-Fri root /usr/src/easyitsp/CRON/rate-offpeak.sh
Thanks
Andrew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I hacked together something to get this working, here is what I did:
1.
create 2 ratecards, peak and off-peak, do this in the gui, I am
showing the mysql cli here.
mysql> select id,trunkid,name from ratecards;
+----+---------+--------------+
| id | trunkid | name |
+----+---------+--------------+
| 1 | 1 | Peak |
| 2 | 1 | OffPeak |
+----+---------+--------------+
2 rows in set (0.00 sec)
2.
now add your rates, I use the upload rates with a csv file. I am
showing only 1 prefix here, there are many more. ( note the ratecard id is
different )
mysql> select ratecardid,dialprefix,destname,buyrate from rates where
dialprefix ='00';
+------------+------------+----------+---------+
| ratecardid | dialprefix | destname | buyrate |
+------------+------------+----------+---------+
| 1 | 00 | Intl | 0.35 |
| 2 | 00 | Intl | 0.35 |
+------------+------------+----------+---------+
2 rows in set (0.00 sec)
3.
now I made 2 files under /usr/src/easyitsp/CRON - rates-peak.sh and
rates-offpeak.sh
rates-peak.sh:
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid
= '1'"
and
rates-offpeak.sh
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid
= '2'"
Now add these to run out of easyitsp_cron at the times you want. For me
Mon-Fri 7am to 19:59 is peak the rest is offpeak so this is my crontab:
00 07 * Mon-Fri root /usr/src/easyitsp/CRON/rate-peak.sh
00 20 * Mon-Fri root /usr/src/easyitsp/CRON/rate-offpeak.sh
I have been playing with this for a few days now and its working great, thanks. One feature I am missing is the ability to have different rates for peak and off-peak times, is this planned for the future or would this be a custom request ?
I am prepared to pay for the development to get this working, let me know if you are interested.
I have not had a request for that before. I am assuming you would like it
be something like 11am -3pm make all calls cost the customer 20% more?
On Thu, Nov 8, 2012 at 1:52 AM, Andrew andrew76@users.sf.net wrote:
--
=\ ==== Matthew G. Lemens ==\=
Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
Lemens Automotive, L.L.C. http://www.lemens-automotive.com
Something like from 7am to 7pm weekdays call will cost 0.50/min ie peak and off peak will be lets say 0.40/min from 7:01pm to 6:59am and during weekends.
-Andrew
So during that time, all calls will cost $0.50 minimum, but if it has a
rate of $0.60 it will cost $0.60
And same for off peak.
Do you have a list of rates and destinations from your voip provider? Or
are you going to just use those as universal rates?
On Fri, Nov 9, 2012 at 6:36 AM, Andrew andrew76@users.sf.net wrote:
--
=\ ==== Matthew G. Lemens ==\=
Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
Lemens Automotive, L.L.C. http://www.lemens-automotive.com
Yes I have rates for different destinations, my example was just to explain that a destination can have 2 rates depending on the time of day.
I hacked together something to get this working, here is what I did:
create 2 ratecards, peak and off-peak, do this in the gui, I am showing the mysql cli here.
mysql> select id,trunkid,name from ratecards;
+----+---------+--------------+
| id | trunkid | name |
+----+---------+--------------+
| 1 | 1 | Peak |
| 2 | 1 | OffPeak |
+----+---------+--------------+
2 rows in set (0.00 sec)
now add your rates, I use the upload rates with a csv file. I am showing only 1 prefix here, there are many more. ( note the ratecard id is different )
mysql> select ratecardid,dialprefix,destname,buyrate from rates where dialprefix ='00';
+------------+------------+----------+---------+
| ratecardid | dialprefix | destname | buyrate |
+------------+------------+----------+---------+
| 1 | 00 | Intl | 0.35 |
| 2 | 00 | Intl | 0.35 |
+------------+------------+----------+---------+
2 rows in set (0.00 sec)
now I made 2 files under /usr/src/easyitsp/CRON - rates-peak.sh and rates-offpeak.sh
rates-peak.sh:
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid = '1'"
and
rates-offpeak.sh
!/bin/sh
mysql -uXXXX -pXXXX easyitsp -e "update callplansratecards set ratecardsid = '2'"
Now add these to run out of easyitsp_cron at the times you want. For me Mon-Fri 7am to 19:59 is peak the rest is offpeak so this is my crontab:
00 07 * Mon-Fri root /usr/src/easyitsp/CRON/rate-peak.sh
00 20 * Mon-Fri root /usr/src/easyitsp/CRON/rate-offpeak.sh
Thanks
Andrew
Nice, looks good. I haven't forgotten about you, been busy with existing
clients.
I'll get something along the lines of this put into the code.
On Fri, Nov 16, 2012 at 4:21 AM, Andrew andrew76@users.sf.net wrote:
--
=\ ==== Matthew G. Lemens ==\=
Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
Lemens Automotive, L.L.C. http://www.lemens-automotive.com