Skip to content

Commit

Permalink
Command to manage unhandled output (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-traeger authored Nov 14, 2023
1 parent 7635b88 commit f7feeb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions baresipy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ def handle_error(self, error):
LOG.error(error)
if error == "failed to set audio-source (No such device)":
self.handle_audio_stream_failure()

def handle_unhandled_output(self, output):
LOG.info("Received unhandled output: '{0}'".format(output))

# event loop
def run(self):
Expand Down Expand Up @@ -429,6 +432,8 @@ def run(self):
match = re.search('received DTMF: \'(.)\' \(duration=(\d+)\)', out)
if match:
self.handle_dtmf_received(match.group(1), int(match.group(2)))
else:
self.handle_unhandled_output(out)
self._prev_output = out
except pexpect.exceptions.EOF:
# baresip exited
Expand Down

0 comments on commit f7feeb2

Please sign in to comment.