|
|
@ -11,12 +11,13 @@ RINGBACK_TONE = 'weckzeichen.wav' |
|
|
|
class PhoneEvent(object): |
|
|
|
class PhoneEvent(object): |
|
|
|
RegInProgress,\ |
|
|
|
RegInProgress,\ |
|
|
|
RegSuccessfull,\ |
|
|
|
RegSuccessfull,\ |
|
|
|
|
|
|
|
RegReset,\ |
|
|
|
CallIncoming,\ |
|
|
|
CallIncoming,\ |
|
|
|
CallRinging,\ |
|
|
|
CallRinging,\ |
|
|
|
CallAccepted,\ |
|
|
|
CallAccepted,\ |
|
|
|
CallEnded,\ |
|
|
|
CallEnded,\ |
|
|
|
CallBusy,\ |
|
|
|
CallBusy,\ |
|
|
|
CallInvalidNumber = range(8) |
|
|
|
CallInvalidNumber = range(9) |
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
@classmethod |
|
|
|
def string(cls, val): |
|
|
|
def string(cls, val): |
|
|
@ -58,6 +59,8 @@ class PhoneInterface(object): |
|
|
|
evt = PhoneEvent.RegInProgress |
|
|
|
evt = PhoneEvent.RegInProgress |
|
|
|
elif state == linphone.RegistrationState.Ok: |
|
|
|
elif state == linphone.RegistrationState.Ok: |
|
|
|
evt = PhoneEvent.RegSuccessfull |
|
|
|
evt = PhoneEvent.RegSuccessfull |
|
|
|
|
|
|
|
elif state == linphone.RegistrationState.None: |
|
|
|
|
|
|
|
evt = PhoneEvent.RegReset |
|
|
|
|
|
|
|
|
|
|
|
if evt is not None: |
|
|
|
if evt is not None: |
|
|
|
for cb in self.__event_cbs: |
|
|
|
for cb in self.__event_cbs: |
|
|
|