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