diff --git a/meshchat.py b/meshchat.py index d15c471..df56948 100644 --- a/meshchat.py +++ b/meshchat.py @@ -427,6 +427,7 @@ class ReticulumMeshChat: "is_outgoing": telephone_active_call.is_outgoing, "remote_identity_hash": remote_identity_hash, "remote_identity_name": remote_identity_name, + "audio_profile_id": self.telephone.active_profile, "is_receive_muted": is_receive_muted, "is_transmit_muted": is_transmit_muted, "tx_packets": telephone_active_call.tx, @@ -464,6 +465,15 @@ class ReticulumMeshChat: "message": "Hanging up call...", }) + # switch outbound audio profile + @routes.get("/api/v1/telephone/switch-audio-profile/{audio_profile_id}") + async def index(request): + audio_profile_id = int(request.match_info.get("audio_profile_id")) + AsyncUtils.run_async(asyncio.to_thread(self.telephone.switch_profile, audio_profile_id)) + return web.json_response({ + "message": "ok", + }) + # mute received audio @routes.get("/api/v1/telephone/mute-receive") async def index(request): diff --git a/src/frontend/components/telephone/TelephonePage.vue b/src/frontend/components/telephone/TelephonePage.vue index a38afd9..3c6b94f 100644 --- a/src/frontend/components/telephone/TelephonePage.vue +++ b/src/frontend/components/telephone/TelephonePage.vue @@ -43,6 +43,15 @@ + +