diff --git a/lxst_relay.py b/lxst_relay.py index 421974d..5700f7b 100644 --- a/lxst_relay.py +++ b/lxst_relay.py @@ -24,7 +24,7 @@ from LXST import Pipeline from LXST.Network import SignallingReceiver, Packetizer, LinkSource from LXST.Sinks import LocalSink from LXST.Sources import LocalSource -from LXST.Codecs import Opus +from LXST.Codecs import Codec2 from LXST.Codecs.Codec import Codec, CodecError from LXST.Primitives.Telephony import Signalling @@ -158,7 +158,7 @@ class VoiceChannel: ) participant.link_source = link_source - outgoing_codec = Opus(profile=Opus.PROFILE_VOICE_MEDIUM) + outgoing_codec = Codec2(mode=Codec2.CODEC2_1600) packetizer = Packetizer(destination=participant.link) participant.packetizer = packetizer @@ -539,6 +539,7 @@ class LXSTRelay(SignallingReceiver): self.identity, display_name="LXST Channel Bot", ) + self.lxmf_router.register_delivery_callback( self._lxmf_delivery_callback ) @@ -548,9 +549,7 @@ class LXSTRelay(SignallingReceiver): self.channel_manager.load_all() # ---- Startup announce ---- - self.destination.announce() - self.bot_destination.announce() - self.channel_manager.announce_all() + self.announce() RNS.log( f"Relay lobby: {RNS.prettyhexrep(self.destination.hash)}", @@ -689,7 +688,7 @@ class LXSTRelay(SignallingReceiver): self._bot_reply(message, "No channels created yet.") return - channels = [RNS.hexrep(node.destination.hash, delimit=False) for node in self.channel_manager.channels.values()] + channels = [[name, RNS.hexrep(node.destination.hash, delimit=False)] for name, node in self.channel_manager.channels.items()] self._bot_reply(message, json.dumps(channels)) # -- Send reply ----------------------------------------------------