|
|
@ -168,6 +168,9 @@ class ConnectingState(AbstractState): |
|
|
|
# TODO: play sound |
|
|
|
# TODO: play sound |
|
|
|
return BusyBeepingState |
|
|
|
return BusyBeepingState |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def on_call_ended(self): |
|
|
|
|
|
|
|
return BusyBeepingState |
|
|
|
|
|
|
|
|
|
|
|
class DialingState(AbstractState): |
|
|
|
class DialingState(AbstractState): |
|
|
|
def __init__(self, controller): |
|
|
|
def __init__(self, controller): |
|
|
|
super(DialingState, self).__init__(controller) |
|
|
|
super(DialingState, self).__init__(controller) |
|
|
@ -291,6 +294,8 @@ def phone_cb(event): |
|
|
|
c.queue_event('call_ended') |
|
|
|
c.queue_event('call_ended') |
|
|
|
elif event == PhoneEvent.CallRinging: |
|
|
|
elif event == PhoneEvent.CallRinging: |
|
|
|
c.queue_event('call_ringing') |
|
|
|
c.queue_event('call_ringing') |
|
|
|
|
|
|
|
elif event == PhoneEvent.CallBusy: |
|
|
|
|
|
|
|
c.queue_event('call_ended') |
|
|
|
elif event == PhoneEvent.CallInvalidNumber: |
|
|
|
elif event == PhoneEvent.CallInvalidNumber: |
|
|
|
c.queue_event('invalid_number') |
|
|
|
c.queue_event('invalid_number') |
|
|
|
|
|
|
|
|
|
|
|