diff --git a/library/Ivoz/Provider/Domain/Model/Terminal/TerminalDto.php b/library/Ivoz/Provider/Domain/Model/Terminal/TerminalDto.php index d2efde484b2..9eec255d0da 100644 --- a/library/Ivoz/Provider/Domain/Model/Terminal/TerminalDto.php +++ b/library/Ivoz/Provider/Domain/Model/Terminal/TerminalDto.php @@ -57,6 +57,7 @@ public static function getPropertyMap(string $context = '', string $role = null) 'publicReceived', 'expires', 'userAgent', + 'publicContact' ]] ]; @@ -94,6 +95,7 @@ public static function getPropertyMap(string $context = '', string $role = null) 'publicReceived', 'expires', 'userAgent', + 'publicContact' ]]; } diff --git a/web/portal/client/src/entities/RetailAccount/Field/Status.tsx b/web/portal/client/src/entities/RetailAccount/Field/Status.tsx index 2b5d7ea7dc8..33e7a7944ef 100644 --- a/web/portal/client/src/entities/RetailAccount/Field/Status.tsx +++ b/web/portal/client/src/entities/RetailAccount/Field/Status.tsx @@ -80,7 +80,7 @@ const Status: StatusIconProps = (props): JSX.Element | null => { const publicReceived = row.publicReceived; const expires = row.expires; const userAgent = row.userAgent; - const contact = row.contact.match(/sips?:([^@]+@)?(.+)/)?.pop(); + const contact = row.contact.match(/sips?:([^@]+@)?([^;]+)/)?.pop(); const publicContact = row.publicContact; let hintMsg: string | React.ReactElement = ''; @@ -88,8 +88,6 @@ const Status: StatusIconProps = (props): JSX.Element | null => { hintMsg = publicContact ? _('No NAT with public Contact (hint: SIP ALG / STUN)') : _('No NAT with private Contact (hint: internal routing)'); - } else if (contact === received) { - hintMsg = _('Regular NAT detected'); } else if (publicReceived && !publicContact) { hintMsg = _('Regular NAT detected'); } else { @@ -134,6 +132,7 @@ const Status: StatusIconProps = (props): JSX.Element | null => { {hintMsg} + {status.length - 1 !== key &&
} ); })} diff --git a/web/rest/brand/features/provider/terminal/getTerminalStatus.feature b/web/rest/brand/features/provider/terminal/getTerminalStatus.feature index 8c7a564a1e5..12a6acbacf9 100644 --- a/web/rest/brand/features/provider/terminal/getTerminalStatus.feature +++ b/web/rest/brand/features/provider/terminal/getTerminalStatus.feature @@ -22,6 +22,7 @@ Feature: Retrieve terminals status "status": [ { "contact": "sip:yealinktest@10.10.1.106:5060", + "publicContact": false, "received": "sip:212.64.172.23:5060", "publicReceived": true, "expires": "2031-01-01 00:59:59", diff --git a/web/rest/client/features/provider/terminal/getTerminal.feature b/web/rest/client/features/provider/terminal/getTerminal.feature index a5b49901d63..5f705e7243f 100644 --- a/web/rest/client/features/provider/terminal/getTerminal.feature +++ b/web/rest/client/features/provider/terminal/getTerminal.feature @@ -91,6 +91,7 @@ Feature: Retrieve terminals "status": [ { "contact": "sip:yealinktest@10.10.1.106:5060", + "publicContact": false, "received": "sip:212.64.172.23:5060", "publicReceived": true, "expires": "2031-01-01 00:59:59", diff --git a/web/rest/client/features/provider/terminal/getTerminalStatus.feature b/web/rest/client/features/provider/terminal/getTerminalStatus.feature index ffc1deb7bba..82e58707612 100644 --- a/web/rest/client/features/provider/terminal/getTerminalStatus.feature +++ b/web/rest/client/features/provider/terminal/getTerminalStatus.feature @@ -21,6 +21,7 @@ Feature: Retrieve terminals status "status": [ { "contact": "sip:yealinktest@10.10.1.106:5060", + "publicContact": false, "received": "sip:212.64.172.23:5060", "publicReceived": true, "expires": "2031-01-01 00:59:59",