<br><br><div><span class="gmail_quote">2008/3/31, Simon Elliston Ball <<a href="mailto:simon@simonellistonball.com">simon@simonellistonball.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You could try:<br> <br> asterisk -rx "database get SIP/Registry 101" | cut -f 2 -d ':'<br> <br> Which is not much shorter, but probably more efficient</blockquote><div><br>That's fine !<br>Too bad one cannot input more specific database queries such as "database get SIP/Registry/Addr->IP 101".</div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Simon Elliston Ball<br> <a href="mailto:simon@simonellistonball.com">simon@simonellistonball.com</a><br>
<a href="http://www.simonellistonball.com/">http://www.simonellistonball.com/</a><br> <br><br> <br> <br> <br> On 31 Mar 2008, at 10:02, Olivier wrote:<br> > Hi,<br> ><br> > Sometimes, you need to send requests to SIP phones either from Linux<br>
> command line or from Asterisk dialplan.<br> > Which is the most efficient way to know a SIP phone IP address ?<br> ><br> > Today, I think I would use :<br> > asterisk -rx "sip show peer 692" | grep "Addr->IP" | awk '{print $3}'<br>
><br> > I'm wondering if anything more concise and efficient exists ?<br> ><br> > Regards<br> <br>> _______________________________________________<br> > -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
><br> > asterisk-users mailing list<br> > To UNSUBSCRIBE or update options visit:<br> > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br> <br> _______________________________________________<br> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br> <br> asterisk-users mailing list<br> To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br> </blockquote></div><br>