SIP trunk load

Aner

Joined
Nov 19, 2009
Messages
6
Likes
0
Points
0
#1
I have 7 SIP trunks from the same provider and I use them as a group. How can I tell how many of these trunks are loaded at the same time? The purpose is to know if there are times when the 7 lines are not enough.

Thanks,
Aner
 

DaveD

Joined
Nov 12, 2007
Messages
597
Likes
0
Points
16
#2
From asterisk cli " sip show channels "
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#3
Or to expand DaveD's idea a little, perhaps from bash run:-

Code:
while [ 1 ] ; do if [ `rasterisk -x 'show channels'|grep -E ^SIP/<put your trunk name here>|wc -l` -eq 7 ] ;then echo "Captain, we ran low of di-lithium crystals at `date`";fi    ;  sleep 30;done |tee lithiumcrystals.txt
which will check every thirty seconds and let Captain Kirk know when the limit was reached and write it to the log book. (That's a one liner)

dicko

p.s. It might make more sense to replace 7 with 6 in that or you might get critical before you know it, but I hope you get the idea.
 

Aner

Joined
Nov 19, 2009
Messages
6
Likes
0
Points
0
#4
Thanks guys. This realy helps!
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#5
Nice trick dicko!!
I didn't know about the di-lithium crystals...
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,898
Messages
130,879
Members
17,560
Latest member
manuelc
Top