Find IP of phone by Extension

Discussion in 'General' started by Tackfire, Nov 19, 2010.

  1. Tackfire

    Joined:
    Nov 15, 2010
    Messages:
    7
    Likes Received:
    0
    Is there a way to find the IP of a phone in elastix by extension? We are starting to get a lot of execs that don't really like to be bothered (What a suprise)so I was wondering if there was a way I can find out this info remotely because the endpoint configuration pulls up random IPs and sometimes it will find a couple IPs and sometimes it will pull maybe like 15 or so but never the complete list in that subnet.

    THanks
     
  2. Lee Sharp

    Joined:
    Sep 28, 2010
    Messages:
    332
    Likes Received:
    0
    This has a lot to do with network congestion and how your switches are configured. Depending on your environment, looking in the gateway arp table of dhcp leases may at least give you a list of phone IP addresses. You can also leave "asterisk -r" up and it will give you the IP when the phone registers.
     
  3. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    A list of all your extension and their current status can be gotten with:-

    rasterisk -x 'sip show peers'

    for a spreadsheet maybe

    rasterisk -x 'sip show peers'|awk '{print $1 "," $2}'|cut -d '/' -f2

    nmap -sU -p 5060 192.168.0.0/24 (example)

    will discover all devices answering on udp 5060 (sip by default)
     
  4. Lee Sharp

    Joined:
    Sep 28, 2010
    Messages:
    332
    Likes Received:
    0
    Very cool tool! What is the difference between "asterisk -r" and "rasterisk" and is there some list of cool things to do with them?
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    rasterisk is now just a symlink in /usr/sbin to asterisk (originally it wasn't and was for getting a "clean", i.e. no escape characters terminal on a running asterisk) , it's just way easier for a lazy old bastard like me to tab complete in the shell.

    rasterisk -x "help" and recurse the returned commands word by word , will give you a complete list .
     

Share This Page