SIP trunk load

Discussion in 'General' started by Aner, Apr 8, 2010.

  1. Aner

    Joined:
    Nov 19, 2009
    Messages:
    6
    Likes Received:
    0
    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
     
  2. DaveD

    Joined:
    Nov 12, 2007
    Messages:
    597
    Likes Received:
    0
    From asterisk cli " sip show channels "
     
  3. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    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.
     
  4. Aner

    Joined:
    Nov 19, 2009
    Messages:
    6
    Likes Received:
    0
    Thanks guys. This realy helps!
     
  5. ramoncio

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

Share This Page