Ejemplo n.º 1
0
def updatePhone():
    global ringBell, hookStatus, calling
    if sim800.isringing():
        ringBell = True
        if hookStatus:
            sim800.answer()
    else:
        ringBell = False
        # status == 4 means call in progress
        if ((not hookStatus) and (sim800.getstatus() == 4)):
            sim800.hangup()
            calling = False
Ejemplo n.º 2
0
def answercall():
    if sim800.isringing():
        sim800.answer()
    else:
        notice("No call to answer.", title="TiLDA Phone")