mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-14 21:10:11 +01:00
voice-client: voice status supports up to 4 sip accounts
This commit is contained in:
parent
70339816f7
commit
7b08997009
1 changed files with 3 additions and 2 deletions
|
|
@ -43,8 +43,9 @@ case "$1" in
|
|||
json_init
|
||||
|
||||
json_add_object "sip"
|
||||
for peer in sip0 sip1; do
|
||||
asterisk -x 'sip show registry' | grep $peer: > /tmp/sip_reg.status || continue
|
||||
for peer in sip0 sip1 sip2 sip3; do
|
||||
uci -q get voice_client.$peer >/dev/null || continue
|
||||
asterisk -x 'sip show registry' | grep $peer: > /tmp/sip_reg.status
|
||||
asterisk -x "sip show peer $peer" > /tmp/sip_peer.status
|
||||
json_add_object "$peer"
|
||||
json_add_boolean registered $(cat /tmp/sip_reg.status | grep -q Registered && echo 1 || echo 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue