You are on page 1of 4

5/8/2018 Watch active calls on an Asterisk PBX | commandlinefu.

com

What's this? Hide

commandlinefu.com is the place to record those


command-line gems that you return to again and again.
Random | Hot this week | All-time greats •
FAQ | API | Widget Delete that bloated snippets file you've been using and
share your personal repository with the world. That way
type here to grep the archive... others can gain from your CLI wisdom and you from
theirs too. All commands can be commented on,
Watch active calls on an discussed and voted up or down.

Asterisk PBX
Terminal - Watch active calls on an Asterisk
PBX
Get involved!
You can sign-in using OpenID credentials, or register a
watch -n 1 "sudo asterisk traditional username and password.
-vvvvvrx 'core show
channels' | grep call" OpenID or Sign in Register
Watch Up 2010-03- First-time OpenID users will be automatically assigned a
active calls
on an
7 Down
26
15:42:13
User:
username which can be changed after signing in.

Asterisk PBX mheadd


Show active calls as the happen on Functions
watch
an Asterisk server. Note that the
Asterisk command (in single quotes) is
formatted for Asterisk 1.6. Use the -n flag on
the watch command to modify the refresh
period (in seconds - default is 2 seconds).
Show sample output | Add to favourites | Report as
malicious

Alternatives
There are 3 alternatives - vote for the best!
Terminal - Alternatives

watch "asterisk -vvvvvrx


'core show channels' |
egrep \"(call|channel)\""
Watch Up 2012-08-

active calls 2 Down


User:
29
13:40:45

on an Asterisk PBX rowshi


Functions
This handles when you have a
watch
single call or channel. Other Tags:
commands will strip out the result if Ubuntu
there is a single channel or call watch
asterisk
active because the output changes
the noun to be singular instead of plural.
Show sample output | Comments (0) | Add to favourites |
Report as malicious

Stay in the loop… Hide

Follow the Tweets.


http://www.commandlinefu.com/commands/view/5179/watch-active-calls-on-an-asterisk-pbx 1/4
5/8/2018 Watch active calls on an Asterisk PBX | commandlinefu.com

/usr/sbin/asterisk -rx Every new command is wrapped in a tweet and


posted to Twitter. Following the stream is a
'core show channels' | great way of staying abreast of the latest
grep -m1 "call" | cut -d' commands. For the more discerning, there are
' -f1 Twitter accounts for commands that get a minimum of 3
and 10 votes - that way only the great commands get
Watch Up 2012-02-

active calls 1 Down


01
17:55:17
User:
tweeted.
»http://twitter.com/commandlinefu
on an Asterisk PBX stackover »http://twitter.com/commandlinefu3
Only the number of calls nothing
Functions »http://twitter.com/commandlinefu10
cut
else. grep Subscribe to the feeds.
Show sample output | Comments (0) | Add to Tags:
favourites | Report as malicious Ubuntu Use your favourite RSS aggregator to stay in
watch touch with the latest commands. There are
asterisk feeds mirroring the 3 Twitter streams as well as
for virtually every other subset (users, tags,
functions,…):
Subscribe to the feed for:
asterisk -rx "core show
» all commands
calls" | grep "active" | » commands with 3 up-votes (commandlinefu3)
cut -d' ' -f1 » commands with 10 up-votes (commandlinefu10)
Watch Up 2012-08-

active calls 1 Down


15
19:42:30
User: News Hide
on an Asterisk PBX Kouri
Functions
May 19, 2015 - A Look At The New Commandlinefu
Works on asterisk 1.8.
cut I've put together a short writeup on what kind of newness you
Comments (1) | Add to favourites | Report as grep can expect from the next iteration of clfu. Check it out here.
malicious Tags:
asterisk March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David
for building such a great resource!

Know a better way? Top Tags Hide

If you can do better, submit your command


here. awk, bash, curl, find, grep, Linux, sed

What others think


Functions Hide
Likely Spam Filtered
One or more comments in this thread have access acpi admin alias amixer aplay
been hidden from view. To view them apropos apt ar arch arecord arp as at atq atrm
anyway, click here.
aumix
Your point of view awk badblocks banner basename bash
You must be signed in to comment. batch bc bg bison break bzgrep bzip2

c++ cal cat cc cd cdparanoia cdrdao


cdrecord cflow chage chattr
chgrp chkconfig chmod chown chsh chvt clear
cmp col column comm command compress
continue cp

cpio cpp crontab csplit ctags cut cvs date


dd debugfs
delta

http://www.commandlinefu.com/commands/view/5179/watch-active-calls-on-an-asterisk-pbx 2/4
5/8/2018 Watch active calls on an Asterisk PBX | commandlinefu.com

df diff diff3 dig dir dirname disable dmesg


dot du dump dumpe2fs e2fsck e2label
echo
ed egrep eject emacs enable env etags
eval ex exec exit expand export expr
factor false fc fc-cache fc-list fdisk
fetchmail fg fgrep file find finger fmt fold
formail free fsck

ftp fuser g++ gawk gcc gdb get getconf


getent gpasswd gpg grep groff
groups gs
gunzip gzexe gzip halt hash hdparm head
hexdump host hostname hwclock iconv id
ifconfig info init install ipcrm ipcs iptables
iptables-restore iptables-save isoinfo ispell jobs
join kill killall kudzu last lastb ldconfig ldd
less lftp link ln loadkeys locale locate lockfile
logger
login logname look losetup lp lpadmin lpr lpstat
ls
lsattrlsmod lspci lsusb m4 mail mailq mailx
make man manpath mcd md5sum merge
mformat mkdir mkdosfs mke2fs mkfifo mkfs
mkfs.ext3 mkisofs mknod mkswap mktemp
modinfo modprobe more mount mpg123
mpg321 mt mv named namei nameif netstat newgrp
nice
nl nm nohup nslookup objdump od
passwd paste patch pax perl pidof ping
pinky pmap pr printenv printf ps pwd python

qdel qstat quota rdate read readelf readlink readonly

reboot

rename renice reset resize2fs restore


return rev rm rmdir rmmod rndc route rpm
rsync scanimage scp screen script sdiff
sed sendmail sensors seq set setleds
setterm
sftp sh sha1sum shift showkey shred
shutdown size skill sleep slocate sort split
ssh
ssh-add ssh-keygen sshd stat strace strings

http://www.commandlinefu.com/commands/view/5179/watch-active-calls-on-an-asterisk-pbx 3/4
5/8/2018 Watch active calls on an Asterisk PBX | commandlinefu.com

strip stty su sudo


sum swapoff swapon sync
sysctl tabs tac tail tailf tar
taskset tcpdump tee telnet test time times
tload

top touch tput tr traceroute trap true tty


tune2fs type ulimit umask umount unalias
uname uniq unlink unset uptime useradd
userdel usermod users usleep uudecode uuencode

val vi vim vmstat wait wall watch wc wget

what whatis whereis which who whoami whois


write xargs yes zcat zdump zgrep zless

http://www.commandlinefu.com/commands/view/5179/watch-active-calls-on-an-asterisk-pbx 4/4

You might also like