Browse code

ping added

Jiri Kuthan authored on 01/06/2003 17:49:26
Showing 1 changed files
... ...
@@ -112,39 +112,33 @@ if [ "0$VERIFY_ACL" -eq 1 ] ; then
112 112
 fi
113 113
 cat <<EOF
114 114
 $0 $VERSION
115
-usage: 
115
+parameter usage: 
116 116
            * subscribers *
117
- $CMD add <username> <password> <email> .. add a new subscriber (*)
118
- $CMD passwd <username> <passwd> ......... change user's password (*)
119
- $CMD rm <username> ...................... delete a user (*)
120
- $CMD mail <username> .................... send an email to a user
121
- $CMD alias show [<alias>] ............... show aliases
122
- $CMD alias rm <alias> ................... remove an alias
123
- $CMD alias add <alias> <uri> ............ add an aliases 
117
+ add <username> <password> <email> .. add a new subscriber (*)
118
+ passwd <username> <passwd> ......... change user's password (*)
119
+ rm <username> ...................... delete a user (*)
120
+ mail <username> .................... send an email to a user
121
+ alias show [<alias>] ............... show aliases
122
+ alias rm <alias> ................... remove an alias
123
+ alias add <alias> <uri> ............ add an aliases 
124 124
 
125 125
            * access control lists *
126
- $CMD acl show [<username>] .............. show user membership
127
- $CMD acl grant <username> <group> ....... grant user membership (*)
128
- $CMD acl revoke <username> [<group>] .... grant user membership(s) (*)
126
+ acl show [<username>] .............. show user membership
127
+ acl grant <username> <group> ....... grant user membership (*)
128
+ acl revoke <username> [<group>] .... grant user membership(s) (*)
129 129
 
130 130
            * usrloc *
131
- $CMD ul show [<username>]................ show in-RAM online users
132
- $CMD ul rm <username> ................... delete user's UsrLoc entries
133
- $CMD ul add <username> <uri> ............ introduce a permanent UrLoc entry
134
- $CMD showdb [<username>] ................ show online users flushed in DB
131
+ ul show [<username>]................ show in-RAM online users
132
+ ul rm <username> ................... delete user's UsrLoc entries
133
+ ul add <username> <uri> ............ introduce a permanent UrLoc entry
134
+ showdb [<username>] ................ show online users flushed in DB
135 135
 
136
-           * server health *
137
- $CMD monitor ............................ show internal status
138
- $CMD ps ................................. show runnig processes 
139
- $CMD fifo ............................... send raw commands to FIFO
140
-
141
-           * server control *
142
- $CMD start .............................. start ser
143
- $CMD stop ............................... stop ser
144
- $CMD restart ............................ restart ser
145
-
146
-           * miscellaneous *
147
- $CMD cisco_restart <uri> ................ restart a Cisco phone
136
+           * control and diagnostics *
137
+ moni ... show internal status      start .... start ser
138
+ ps ..... show runnig processes 	stop ..... stop ser
139
+ fifo ... send raw FIFO commands    restart .. restart ser
140
+ ping <uri> .. ping a URI (OPTIONS)
141
+ cisco_restart <uri> .. restart a Cisco phone (NOTIFY(
148 142
 
149 143
 
150 144
    Commands labeled with (*) will prompt for a MySQL password.
... ...
@@ -755,6 +749,16 @@ case $1 in
755 749
 		fifo_cmd "$@"
756 750
 		;;
757 751
 
752
+	ping)
753
+		if [ "$#" -ne 2 ] ; then	
754
+			usage
755
+			exit 1
756
+		fi
757
+		fifo_cmd t_uac_dlg OPTIONS "$2" "." "From: sip:daemon@$SIP_DOMAIN" \
758
+			"To: <$2>" "Contact: <sip:daemon@!!>" "." "." |
759
+			head -1
760
+		;;
761
+
758 762
 	cisco_restart)
759 763
 		if [ "$#" -ne 2 ] ; then	
760 764
 			usage