Skip to content

Commit 7bc8ef2

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
chan_iax2: Fix perceived showing host address.
ASTERISK_22025 introduced a regression that shows the host IP and port as the perceived IP and port again, as opposed to showing the actual perceived address. This fixes this by showing the correct information. ASTERISK-29048 #close Change-Id: I0ad3e25bc6b449e83ce72ea5d1a1cdba72aa304a
1 parent 6624e34 commit 7bc8ef2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

channels/chan_iax2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7375,7 +7375,7 @@ static char *handle_cli_iax2_show_registry(struct ast_cli_entry *e, int cmd, str
73757375
AST_LIST_TRAVERSE(&registrations, reg, entry) {
73767376
snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(&reg->addr));
73777377

7378-
snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(&reg->addr) ? "<Unregistered>" : ast_sockaddr_stringify(&reg->addr));
7378+
snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(&reg->us) ? "<Unregistered>" : ast_sockaddr_stringify(&reg->us));
73797379

73807380
ast_cli(a->fd, FORMAT, host,
73817381
(reg->dnsmgr) ? "Y" : "N",
@@ -7407,7 +7407,7 @@ static int manager_iax2_show_registry(struct mansession *s, const struct message
74077407
AST_LIST_TRAVERSE(&registrations, reg, entry) {
74087408
snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(&reg->addr));
74097409

7410-
snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(&reg->addr) ? "<Unregistered>" : ast_sockaddr_stringify(&reg->addr));
7410+
snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(&reg->us) ? "<Unregistered>" : ast_sockaddr_stringify(&reg->us));
74117411

74127412
astman_append(s,
74137413
"Event: RegistryEntry\r\n"

0 commit comments

Comments
 (0)