Menu

rates for peak and off-peak

2012-11-08
2012-11-16
  • Andrew Claassen

    Andrew Claassen - 2012-11-08

    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.

     
    • Matthew Lemens

      Matthew Lemens - 2012-11-08

      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:

      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.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/easyitsp/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

      --
      =\ ==== Matthew G. Lemens ==\=
      Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
      Lemens Automotive, L.L.C. http://www.lemens-automotive.com

       
  • Andrew Claassen

    Andrew Claassen - 2012-11-09

    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

     
    • Matthew Lemens

      Matthew Lemens - 2012-11-09

      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:

      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

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/easyitsp/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

      --
      =\ ==== Matthew G. Lemens ==\=
      Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
      Lemens Automotive, L.L.C. http://www.lemens-automotive.com

       
      • Andrew Claassen

        Andrew Claassen - 2012-11-10

        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.

         
  • Andrew Claassen

    Andrew Claassen - 2012-11-16

    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

    Thanks
    Andrew

     
    • Matthew Lemens

      Matthew Lemens - 2012-11-16

      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:

      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

      Thanks
      Andrew


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/easyitsp/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

      --
      =\ ==== Matthew G. Lemens ==\=
      Lemens Telephone Systems, L.L.C. http://www.lemens-ts.com
      Lemens Automotive, L.L.C. http://www.lemens-automotive.com

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.