def handle_status_ok(self, message): if message['State'] != 'LinphoneCallIncomingReceived': raise LinphoneException('Not ringing') if self._caller_id not in message['From']: raise LinphoneException('Do not ringing showing {}'.format( self._caller_id)) return True
def handle_status_ok(self, message): if message['State'] != 'LinphoneCallStreamsRunning': raise LinphoneException('Not in conversation') if self._caller_id not in message['From']: raise LinphoneException('Do not talking to {}'.format( self._caller_id)) return True
def handle_status_error(self, message): if message['Reason'] == 'No current call available.': raise NoActiveCallException() raise LinphoneException(message['Reason'])
def handle_status_error(self, message): if message['Reason'] == 'No active call.': raise NoActiveCallException() raise LinphoneException(message['Reason'])
def handle_status_error(self, message): if message['Reason'] == 'Call creation failed.': raise ExtensionNotFoundException() raise LinphoneException(message['Reason'])
def command(self): if self._call_id is None: raise LinphoneException('Invalid call ID') return 'call-resume {}'.format(self._call_id)
def handle_status_error(self, message): raise LinphoneException(message['Reason'])