[asterisk-users] Phone Inventory

2012-02-22 Thread Muro, Sam
Hi there I have just took a support of a customer with hundreds of IP phones, mostly Polycom with mixed models. Is there a way to query asterisk or any other command to retrieve the inventory of all connected phones. i.e. Phone Type and Phone Model, say Polycom SPIP331 or so Thanks Sam -- _

Re: [asterisk-users] Phone Inventory

2012-02-22 Thread Leandro Dardini
Usually phones transmit all these informations as "User Agent", so you can just write in asterisk cli: sip show peer and you'll get something like : Useragent: Yealink SIP-T28P 2.60.0.40 Reg. Contact : sip:@192.168.25.102:5062 Qualify Freq : 6 ms Leandro 2012/2/23 Muro,

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Eric Wieling
Sent: Thursday, February 23, 2012 2:46 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Phone Inventory Usually phones transmit all these informations as "User Agent", so you can just write in asterisk cli: sip show peer and you'll get

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Danny Nicholas
---Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Eric Wieling Sent: Thursday, February 23, 2012 8:32 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Phone Inventory P

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Ishfaq Malik
4f2233929 > > -Original Message- > From: asterisk-users-boun...@lists.digium.com > [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Leandro Dardini > Sent: Thursday, February 23, 2012 2:46 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [a

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Dale Noll
On 02/23/2012 08:49 AM, Danny Nicholas wrote: Here is a snippet that somebody smarter than I am can improve upon for a in `asterisk -rx "sip show peers"|cut -f1 -d/` ;do asterisk -rx "sip show peer $a";done|grep Useragent for a in `asterisk -rx "sip show peers"|cut -f1 -d/` ;do asterisk -rx "sip

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Muro, Sam
Thank you all You are a life saver Sam Dale Noll wrote: > On 02/23/2012 08:49 AM, Danny Nicholas wrote: >> Here is a snippet that somebody smarter than I am can improve upon >> for a in `asterisk -rx "sip show peers"|cut -f1 -d/` ;do asterisk -rx >> "sip >> show peer $a";done|grep Useragent >> f

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Danny Nicholas
Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Phone Inventory On 02/23/2012 08:49 AM, Danny Nicholas wrote: > Here is a snippet that somebody smarter than I am can improve upon for > a in `asterisk -rx "sip show peers"|cut -f1 -d/` ;do asterisk -rx "sip &g

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Dale Noll
On 02/23/2012 09:39 AM, Danny Nicholas wrote: +1 Dale - p.s. the grep -P '\d\d\d\d' killed the output on my 1.4 box. P.P.S if you change grep -P "(Useragent|Contact)" to grep -P "(Username|Contact|Username)" it produces a "nice" 4 line report like this: Def. Username: Danny Nicholas Userage

Re: [asterisk-users] Phone Inventory

2012-02-23 Thread Danny Nicholas
2012 9:00 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Phone Inventory Does anyone know if Snom phones can be set to do this as well? Thanks Ish On Thu, 2012-02-23 at 09:31 -0500, Eric Wieling wrote: > Polycom phones can be set to include thei

Re: [asterisk-users] Phone Inventory

2012-06-06 Thread Ing CIP. Alejandro Celi
Perhaps another idea (works with extensions with 3 or more digits) #!/bin/sh asterisk -rx "sip show peers"| grep -vP '(UNKNOWN|Unmonitored)' | cut -f1 -d/ | grep -P '\d\d\d.*' | while read PEER do echo " "$PEER asterisk -rx