Skip to content

Commit 17b0823

Browse files
authored
monofon-health :added another grep to trunks_list
1 parent 968af19 commit 17b0823

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/monofon/monofon-health.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ function check_trunks() {
250250
# Check if PJSIP is being used by trying to run a PJSIP command
251251
if asterisk -rx "module show like pjsip" 2>/dev/null | grep -q "res_pjsip.so"; then
252252
# PJSIP mode - use pjsip show contacts for a cleaner output
253-
trunk_list=$(asterisk -rx "pjsip show contacts" | grep -E '^[[:space:]]*Contact:' | grep -v "Objects found" | sed '1d' | sed 's/^[[:space:]]*Contact:[[:space:]]*//' | grep -v 'rinstance')
253+
trunk_list=$(asterisk -rx "pjsip show contacts" | grep -E '^[[:space:]]*Contact:' | grep -v "Objects found" | sed '1d' | sed 's/^[[:space:]]*Contact:[[:space:]]*//' | grep -v 'rinstance' | grep -E '^[A-Za-z]')
254+
254255

255256
OLDIFS=$IFS
256257
IFS=$'\n'

0 commit comments

Comments
 (0)