• Home
  • Sangoma Solutions
    • PBXact IPPBX
    • FreePBX IPPBX
      • The FreePBX Appliance
      • FreeHMS Hotel PMS
    • Sangoma Phones
    • Vega gateways
    • Zulu UC
    • Asterisk
  • Hardware & Phones
    • IPPBXs
      • Sangoma PBXact
      • FreePBX
        • Freepbx 60
        • Freepbx 100
        • Freepbx 300
        • Freepbx 1000
        • Sangoma Phones
      • Building FreePBX CallCenters
    • Voip Handsets
      • Sangoma System Handsets
      • Gigaset Pro
        • Gigaset Maxwell C DECT Desk Phone
        • Gigaset Pro R650H
        • Gigaset A540
        • Gigaset N720 IP PRO
      • Conference Phones
        • CP920 Conference Phone
        • CP960 Conference Phone
    • Headsets
    • Peripherals
    • Vega VoIP digital gateways
  • Lines & Support
    • Connectivity
      • Calls and Lines
        • Call charges and Bundles.
      • Fibre
      • EFM
      • FTTC
    • Support Contracts
      • Maintenance Terms & Conditions
    • System Monitoring
    • Submit Ticket
    • My Tickets
    • Number Porting
      • Porting Help
    • Case Studies
    • Major Fault Reports
  • Knowledge Base
    • Asterisk Support
    • Security
    • Knowledge Base
  • Contact
    • Invoice Payments
    • Your Rights under GDPR
    • Privacy Policy
  • Submit Support Ticket
  • Offers

Checking registered SIP peers



We got a call recently from a customer who uses skype trunks for some international incoming numbers. We have found that these lose registration on a regular basis, We could let them be set try and register indefinitely but this can have performance effects on the server.

This is not our only customer with this problem, We have also of late noticed a similar problem with Voip-unlimited where registration times out every day at 8pm, we have noted this on ours and other dealers servers.

So what to do?

Well we have written a quick script to check registration details and reload if not correct.

#!/bin/bash

HITS=`asterisk -r -x “sip show registry” | grep Registered |grep $1| wc -l`

if [ $HITS != $2 ]; then

echo “Incorrect number of $1 trunks are registered, we wanted $2  ”

echo “We will now reload asterisk ”

asterisk -r -x “reload chan_sip.so”

exit 0

else

echo “$HITS $1 trunks are registered, we wanted $2  ALL OK”

exit 0

fi

 

the syntax for running the script is

 

script_name.sh hostname 2

with hostname being part of the string you get when doing a sip show registry.

and the number is the number of registered trunks you expect with that name.

if all is well:”2 sipgate trunks are registered, we wanted 2 :-) ALL OK”and nothing happens

if not correct number then:

“Incorrect number of sipgate trunks are registered, we wanted 2

“We will now reload asterisk”

we only relaod the sip channel driver as this is enough to sort the problem normally

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Google+ (Opens in new window)
Knowledge Base
← Reloading Aastra firmware
Asterisk pickup groups →
Sangoma

Links

  • Gradwell Account
  • Asterisk Forum
  • FreePBX Forum
  • FreePBX WIKI
  • IT Store
  • Blog
TunnelBear
Remote Access with TeamViewer choose "TeamViewer QuickSupport" when page loads
Yealink Reseller

Top Posts & Pages

  • Gigaset Maxwell C DECT Desk Phone  The DECT cordle…
  • Fortigate issues such as one way audio on Call Pickup With Hosted Asterisk and other problems.
  • IAX2 Peers going unreachable.
  • ISDN alarms and what they mean.
  • Converting recordings to MP3 in Elastix and updating mysql CDR records
  • Mitel SNMP Alarm monitoring
  • IAX2 Cause code
  • Asterisk pickup groups
  • Voice recognition and Asterisk.
  • Sip debugging with wireshark
2018 Cyber-Cottage.co.uk

EvoLve Pro theme by Theme4Press  •  Powered by WordPress
Sangoma, FreePBX and VoIP sales and support

Back to Top
This website uses cookies
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More