forked from OpenSIPS/opensips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopensipsctl.ctlbase
74 lines (66 loc) · 1.87 KB
/
opensipsctl.ctlbase
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# $Id: opensipsctl.ctlbase 3511 2008-01-08 10:20:46Z henningw $
#
# sc: opensips control; tool for maintaining opensips
#
#===================================================================
##### ----------------------------------------------- #####
### common variables and functions for CTL engines
#
# period in which stats are reprinted
if [ -z "$WATCH_PERIOD" ] ; then
WATCH_PERIOD=2
fi
#
##### ------------------------------------------------ #####
### usage functions
#
usage_cisco_restart() {
echo
mecho " -- command 'cisco_restart' - restart CISCO phone (NOTIFY)"
echo
cat <<EOF
cisco_restart <uri> ................ restart phone configured for <uri>
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_cisco_restart"
usage_online() {
echo
mecho " -- command 'online' - dump online users from memory"
echo
cat <<EOF
online ............................. display online users
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_online"
usage_opensips_monitor() {
echo
mecho " -- command 'monitor' - show internal status"
echo
cat <<EOF
monitor ............................ show server's internal status
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_opensips_monitor"
usage_ping() {
echo
mecho " -- command 'ping' - ping a SIP URI (OPTIONS)"
echo
cat <<EOF
ping <uri> ......................... ping <uri> with SIP OPTIONS
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_ping"
usage_usrloc() {
echo
mecho " -- command 'ul|alias' - manage user location or aliases"
echo
cat <<EOF
ul show [<username>]................ show in-RAM online users
ul show --brief..................... show in-RAM online users in short format
ul rm <username> [<contact URI>].... delete user's usrloc entries
ul add <username> <uri> ............ introduce a permanent usrloc entry
ul add <username> <uri> <expires> .. introduce a temporary usrloc entry
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_usrloc"