Index: channels/chan_iax2.c =================================================================== --- channels/chan_iax2.c (revision 177975) +++ channels/chan_iax2.c (working copy) @@ -2791,6 +2791,8 @@ ast_cli(a->fd, " Parking lot : %s\n", peer->parkinglot); ast_cli(a->fd, " Mailbox : %s\n", peer->mailbox); ast_cli(a->fd, " Dynamic : %s\n", ast_test_flag(peer, IAX_DYNAMIC) ? "Yes" : "No"); + ast_cli(a->fd, " Trunk : %s\n", ast_test_flag(peer, IAX_TRUNK) ? "Yes" : "No"); + ast_cli(a->fd, " Encryption : %s\n", peer->encmethods ? "Yes" : "No"); ast_cli(a->fd, " Callerid : %s\n", ast_callerid_merge(cbuf, sizeof(cbuf), peer->cid_name, peer->cid_num, "")); ast_cli(a->fd, " Expire : %d\n", peer->expire); ast_cli(a->fd, " ACL : %s\n", (peer->ha ? "Yes" : "No")); @@ -5288,7 +5290,6 @@ peer_unref(peer), peer = ao2_iterator_next(&i)) { char nm[20]; char status[20]; - char srch[2000]; int retstatus; if (registeredonly && !peer->addr.sin_addr.s_addr) @@ -5311,14 +5312,7 @@ ast_copy_string(nm, ast_inet_ntoa(peer->mask), sizeof(nm)); - snprintf(srch, sizeof(srch), FORMAT, name, - peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "(Unspecified)", - ast_test_flag(peer, IAX_DYNAMIC) ? "(D)" : "(S)", - nm, - ntohs(peer->addr.sin_port), ast_test_flag(peer, IAX_TRUNK) ? "(T)" : " ", - peer->encmethods ? "(E)" : " ", status, term); - - if (s) + if (s) { astman_append(s, "Event: PeerEntry\r\n%s" "Channeltype: IAX2\r\n" @@ -5327,21 +5321,28 @@ "IPaddress: %s\r\n" "IPport: %d\r\n" "Dynamic: %s\r\n" + "Trunk: %s\r\n" + "Encryption: %s\r\n" "Status: %s\r\n\r\n", idtext, name, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "-none-", ntohs(peer->addr.sin_port), ast_test_flag(peer, IAX_DYNAMIC) ? "yes" : "no", + ast_test_flag(peer, IAX_TRUNK) ? "yes" : "no", + peer->encmethods ? "yes" : "no", status); - - else + } else { ast_cli(fd, FORMAT, name, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "(Unspecified)", ast_test_flag(peer, IAX_DYNAMIC) ? "(D)" : "(S)", nm, - ntohs(peer->addr.sin_port), ast_test_flag(peer, IAX_TRUNK) ? "(T)" : " ", - peer->encmethods ? "(E)" : " ", status, term); + ntohs(peer->addr.sin_port), + ast_test_flag(peer, IAX_TRUNK) ? "(T)" : " ", + peer->encmethods ? "(E)" : " ", + status, + term); + } total_peers++; } @@ -5600,6 +5601,8 @@ astman_append(s, "Mask: %s\r\n", nm); astman_append(s, "Port: %d\r\n", ntohs(peer->addr.sin_port)); astman_append(s, "Dynamic: %s\r\n", ast_test_flag(peer, IAX_DYNAMIC) ? "Yes" : "No"); + astman_append(s, "Trunk: %s\r\n", ast_test_flag(peer, IAX_TRUNK) ? "Yes" : "No"); + astman_append(s, "Encryption: %s\r\n", peer->encmethods ? "Yes" : "No"); peer_status(peer, status, sizeof(status)); astman_append(s, "Status: %s\r\n\r\n", status); peer_count++;