fix(proxy-engine): improve inbound SIP routing diagnostics and enrich leg media state reporting

This commit is contained in:
2026-04-14 20:19:34 +00:00
parent 0d82a626b5
commit 88768f0586
46 changed files with 555689 additions and 107 deletions

View File

@@ -213,6 +213,10 @@ export class StatusStore {
legs: [...call.legs.values()].map((leg) => ({
id: leg.id,
type: leg.type,
state: leg.state,
codec: leg.codec,
rtpPort: leg.rtpPort,
remoteMedia: leg.remoteMedia,
metadata: leg.metadata || {},
})),
});
@@ -255,6 +259,15 @@ export class StatusStore {
const existingLeg = call.legs.get(data.leg_id);
if (existingLeg) {
existingLeg.state = data.state;
if (data.codec !== undefined) {
existingLeg.codec = data.codec;
}
if (data.rtpPort !== undefined) {
existingLeg.rtpPort = data.rtpPort;
}
if (data.remoteMedia !== undefined) {
existingLeg.remoteMedia = data.remoteMedia;
}
if (data.metadata) {
existingLeg.metadata = data.metadata;
}
@@ -265,9 +278,9 @@ export class StatusStore {
id: data.leg_id,
type: this.inferLegType(data.leg_id),
state: data.state,
codec: null,
rtpPort: null,
remoteMedia: null,
codec: data.codec ?? null,
rtpPort: data.rtpPort ?? null,
remoteMedia: data.remoteMedia ?? null,
metadata: data.metadata || {},
});
}