Providers with limited free time

Catalog of dial plans
Post Reply
maxihatop
Posts: 14
Joined: Tue Apr 28, 2009 1:57 am

Providers with limited free time

Post by maxihatop » Thu Apr 30, 2009 2:11 am

Some providers have limits for free time -- for example,
voipdiscount.com has only 300 minutes per week free
for call to US and other states.

I wrote easy solution for this problem:
1. I created bundle of account at voipdiscount
(in the following example, 4).
2. I wrote call balancer in the Ruby dialplan, which pass current call
through randomly selected provider from the list.

Balancer code is following:

Code: Select all

if sys.In then
  # Do your incoming call processing customisations here.
  sys.Dial("#{sys.Username}@local") # Forwards all incoming calls to your registered contacts.
else
  # Do your outgoing call processing customisations here.

  rnd_prov_list = ['voipdiscount1', 'voipdiscount2', 'voipdiscount3', 'voipdiscount4']
  ndx = Time.now.to_i & 3
  cur_prov = rnd_prov_list[ndx]

 case req.URI.User
   when /^303$/ then sys.Dial("303@sip.blueface.ie")  # Blueface speaking clock.
   when /^612$/ then sys.Dial("612@fwd.pulver.com")   # FWD speaking clock.
  
   #Otherwise
   else sys.Dial(cur_prov)
  end
end
Take & enjoy!

gbonnet
Site Admin
Posts: 680
Joined: Wed Jul 11, 2007 2:58 pm
Location: Bologna
Contact:

Post by gbonnet » Thu Apr 30, 2009 8:24 am

Moved to Use Cases forum.
Thanks for sharing maxihatop
Blueface [url=http://www.blueface.ie/]Phone[/url] Service

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Thu Apr 30, 2009 9:19 am

Hi

I don't think that this is working for betamax clones

because betamax is using your ip address to check how much minutes you have called

So if you have more accounts you still can't use more than 300 minutes
* Max 300 minutes per week of free calls, measured over the last 7 days and per unique IP address.

maxihatop
Posts: 14
Joined: Tue Apr 28, 2009 1:57 am

Dynamic IP

Post by maxihatop » Thu Apr 30, 2009 12:51 pm

Yes, you added right note.

Fortunately, my current provider, Verizon, give me dynamic IP.

I'm using Wi-Fi router Linksys WRT54GS with alternative firmware DD-WRT.
My ADSL modem works in the "transparent mode",
and router supports modem protocol PPPoE.

In the configuration section
ADMINISTRATION->KEEP ALIVE->SCHEDULE REBOOT
I have option "Reboot daily, 3:30AM".

During reboot, router obtains new IP address daily, and everything is OK.

sirmikey1
Posts: 157
Joined: Mon May 25, 2009 11:19 pm

Post by sirmikey1 » Sat Jul 04, 2009 2:26 am

For the record, my internet service provider also hands out dynamic IP addresses, which means that I can disconnect the modem overnight and the next morning I'll normally have a new IP address. It's tricky, because modem reset just hands out any available IP; which means that you sometimes get the old one again. May need to do reset a couple of times to get what you need. I just opened another new betamax account today, matter of fact.
sM

sirmikey1
Posts: 157
Joined: Mon May 25, 2009 11:19 pm

Post by sirmikey1 » Wed Aug 12, 2009 5:02 am

Google voice through Gizmo gives FREE USA Calls.
Sipgate is also giving out free 200 minutes.
SM

Post Reply