ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class PhoneCall.PhoneCall(system, config)

Provide the API for a user making a phone call.

Parameters:

  • system: a <no title> object to communicate with the target system

  • config: a <no title> object holding all our configuration

call(dest)

Make a call to the given destination. For many phones the destination could be a phone number, but for some it might be a SIP address or whatever makes sense for the phone being used.

converse(dest, phrases)

Have a full conversation, as given by the list of things to say in the phrases list.

If a phrase starts with DTMF the rest of that phrase is treated as DTMF characters to send.

hangup()

Hang up the phone, ending any call that was in progress.

play(path)

Play a sound file that exists on the controlled system.

say(text)

Send the given text through the current call.

wait(length=3)

Wait until there is a strech of silence at least length seconds long