summaryrefslogtreecommitdiff
path: root/lib/tasks/originate.rake
blob: 5e7dfe3a74dfdea298dad90716716cf7880f1af9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
desc "Originate call"

task :originate, [
    :sip_account_id,
    :extension,
  ] => :environment do |t, a|

  extension = a.extension.to_s
  sip_account = SipAccount.where(:id => a.sip_account_id.to_i).first

  print "Originate #{sip_account} -> #{extension} ... "
  puts sip_account.call(extension)
end