You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
970 B

  1. # Copyright (C) 2019 Open Source Integrators
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. # Simple message
  4. import voicent
  5. v = voicent.Voicent()
  6. phoneno = "6024275632"
  7. reqid = v.callText(phoneno, "Hello, This is a test of the autodialer.", "1")
  8. status = v.callStatus(reqid)
  9. # Using Campaign in 2 steps
  10. v = voicent.Voicent()
  11. filepath = "/home/mchambreuil/odoo/pvm/voicent.csv"
  12. listname = "Test"
  13. leadsrc_id = v.importCampaign(listname, filepath)
  14. res = v.runCampaign(listname)
  15. v.checkStatus(res['leadsrc_id'])
  16. # Using Campaign in 1 step with TTS
  17. v = voicent.Voicent()
  18. filepath = "/home/mchambreuil/odoo/pvm/voicent.csv"
  19. res = v.importAndRunCampaign(filepath, "tts", "Hello, This is a test. Bye")
  20. status = v.checkStatus(res['camp_id'])
  21. # Using Campaign in 1 step with Template
  22. v = voicent.Voicent()
  23. filepath = "/home/mchambreuil/odoo/pvm/voicent.csv"
  24. res = v.importAndRunCampaign(filepath, "template", "Test")
  25. status = v.checkStatus(res['camp_id'])