CallDistanceTransceiver.py: resume command mode after dialing
authorAntonio Ospite <ao2@ao2.it>
Thu, 17 Dec 2015 11:59:41 +0000 (12:59 +0100)
committerAntonio Ospite <ao2@ao2.it>
Thu, 17 Dec 2015 11:59:41 +0000 (12:59 +0100)
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.

src/savemysugar/CallDistanceTransceiver.py

index c251673..0ee4169 100755 (executable)
@@ -228,7 +228,7 @@ class CallDistanceTransceiver(object):
 
         # Dial, then wait self.call_setup_time to make sure the receiver gets
         # at least one RING, and then hangup and sleep the remaining time
-        self.modem.send_command("ATDT" + self.destination_number)
+        self.modem.send_command("ATDT" + self.destination_number + ";")
         time.sleep(self.call_setup_time)
         self.modem.send_command("ATH")
         self.modem.get_response()