Put a semicolon after the AT command when dialing the destination
number. Without this, some modems won't accept the ATH command and won't
be able to terminate a call before the receiver has answered.
for i in range(5):
print()
print("Attempt: %s" % (i + 1))
- outgoing_modem.send_command("ATDT" + destination_number)
+ outgoing_modem.send_command("ATDT" + destination_number + ";")
dial_time = time.time()
# Wait for the receiver to get a ring before terminating the call
ingoing_modem.register_callback("RING", on_ring)
outgoing_modem = Modem(outgoing_port)
- outgoing_modem.send_command("ATDT" + destination_number)
+ outgoing_modem.send_command("ATDT" + destination_number + ";")
try:
ingoing_modem.get_response_loop()
time_difference = time2 - time1
print("time difference: %.2f" % time_difference)
time1 = time.time()
- modem.send_command("ATDT" + number)
+ modem.send_command("ATDT" + number + ";")
call_setup_time = 9
inter_call_sleep = 5