Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] The most efficient way to know SIP phones IP addresses ?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
simon at simonelliston...
Guest





PostPosted: Mon Mar 31, 2008 4:43 am    Post subject: [asterisk-users] The most efficient way to know SIP phones I Reply with quote

You could try:

asterisk -rx "database get SIP/Registry 101" | cut -f 2 -d ':'

Which is not much shorter, but probably more efficient

Simon Elliston Ball
simon at simonellistonball.com
http://www.simonellistonball.com/


On 31 Mar 2008, at 10:02, Olivier wrote:
Quote:
Hi,

Sometimes, you need to send requests to SIP phones either from Linux
command line or from Asterisk dialplan.
Which is the most efficient way to know a SIP phone IP address ?

Today, I think I would use :
asterisk -rx "sip show peer 692" | grep "Addr->IP" | awk '{print $3}'

I'm wondering if anything more concise and efficient exists ?

Regards
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
oza-4h07 at myamail.com
Guest





PostPosted: Mon Mar 31, 2008 4:56 am    Post subject: [asterisk-users] The most efficient way to know SIP phones I Reply with quote

2008/3/31, Simon Elliston Ball <simon at simonellistonball.com>:
Quote:

You could try:

asterisk -rx "database get SIP/Registry 101" | cut -f 2 -d ':'

Which is not much shorter, but probably more efficient
That's fine !
Too bad one cannot input more specific database queries such as "database
get SIP/Registry/Addr->IP 101".

Simon Elliston Ball
Quote:
simon at simonellistonball.com
http://www.simonellistonball.com/





On 31 Mar 2008, at 10:02, Olivier wrote:
Quote:
Hi,

Sometimes, you need to send requests to SIP phones either from Linux
command line or from Asterisk dialplan.
Which is the most efficient way to know a SIP phone IP address ?

Today, I think I would use :
asterisk -rx "sip show peer 692" | grep "Addr->IP" | awk '{print $3}'

I'm wondering if anything more concise and efficient exists ?

Regards

Quote:
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080331/32213f11/attachment.htm
Back to top
simon at simonelliston...
Guest





PostPosted: Mon Mar 31, 2008 5:18 am    Post subject: [asterisk-users] The most efficient way to know SIP phones I Reply with quote

The asterisk database system is really more of a hash table than a
full database, so it's unlikely to happen. It's actually berkeley db
underneath.

Of course you could always create your own table on calls by using
something like Set(DB(ips/692)=${SIPPEER(692|ip)}) in the dialplan,
but it's probably a lot easier to just use the registry database, just
depends on how often you're going to be doing the lookups.

simon

Simon Elliston Ball
simon at simonellistonball.com
http://www.simonellistonball.com/


On 31 Mar 2008, at 10:56, Olivier wrote:
Quote:


2008/3/31, Simon Elliston Ball <simon at simonellistonball.com>: You
could try:

asterisk -rx "database get SIP/Registry 101" | cut -f 2 -d ':'

Which is not much shorter, but probably more efficient

That's fine !
Too bad one cannot input more specific database queries such as
"database get SIP/Registry/Addr->IP 101".

Simon Elliston Ball
simon at simonellistonball.com
http://www.simonellistonball.com/





On 31 Mar 2008, at 10:02, Olivier wrote:
Quote:
Hi,

Sometimes, you need to send requests to SIP phones either from Linux
command line or from Asterisk dialplan.
Which is the most efficient way to know a SIP phone IP address ?

Today, I think I would use :
asterisk -rx "sip show peer 692" | grep "Addr->IP" | awk '{print
$3}'
Quote:

I'm wondering if anything more concise and efficient exists ?

Regards

Quote:
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com
--
Quote:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services