#!/usr/bin/env ruby

def snom_phone_info(info_page_html)
Hash[*info_page_html.scan(%r{<TD class="normalText">(.*?):</TD><td class="normalText">(.*?)</td>}).flatten]
end

if __FILE__ == $0
puts snom_phone_info(DATA.read).inspect
end

__END__
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>snom 360</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META http-equiv=Pragma content=no-cache>
<LINK href="normal.css" type=text/css rel=stylesheet>
<LINK href="fox.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="common.js"></SCRIPT>
</HEAD>
<BODY style="BACKGROUND-IMAGE: url(img/banner1.jpg); BACKGROUND-REPEAT: no-repeat; BACKGROUND-COLOR: #0062aa; margin: 0">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>

<TR>
<td height="68" valign="bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16"><img src="img/clr.gif" width="16" height="16"></td>
<td class="headerText" width="705">System Information</td>
</tr>
<tr>

<td height="16" width="16"><img src="img/clr.gif" width="16" height="16"></td>
<td height="16" width="600"><img src="img/clr.gif" width="16" height="16"></td>
<td height="16">&nbsp;</td>
</tr>
</table>
</td>
</TR>
<TR>
<TD>

<TABLE cellSpacing=0 cellPadding=0 border=0><!-- main -->
<TBODY>
<TR vAlign=top>
<TD vAlign=top width=175 bgColor=#fde080>
<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>

<TBODY>
<TR>
<TD vAlign=top><table class="flyoutMenu" width="181" cellpadding="2" cellspacing="0" border="0" style="border-right-width: 0px">
<tr>
<td>
<table width="176" cellpadding="0" cellspacing="0" border="0">
<tr><td class="flyoutLink" handle="base" colspan="2"><b>Operation</b></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="index.htm">Home</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="adr.htm">Address Book</a></td></tr>
<tr><td class="flyoutLink" colspan="2"><b>Setup</b></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="prefs.htm">Preferences</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="speed.htm">Speed Dial</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="fkeys.htm">Function Keys</a></td></tr>



<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=1">Identity 1</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=2">Identity 2</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=3">Identity 3</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=4">Identity 4</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=5">Identity 5</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=6">Identity 6</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=7">Identity 7</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=8">Identity 8</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=9">Identity 9</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=10">Identity 10</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=11">Identity 11</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="line_login.htm?l=12">Identity 12</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="action.htm">Action URL Settings</a></td></tr>


<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="advanced.htm">Advanced</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="trusted.htm">Trusted Certificates</a></td></tr>



<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="update.htm">Software Update</a></td></tr>


<tr><td class="flyoutLink" colspan="2"><b>Status</b></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="info.htm">System Information</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="log.htm">Log</a></td></tr>


<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="trace.htm">SIP Trace</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="dnscache.htm">DNS Cache</a></td></tr>


<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="pcap.htm">PCAP Trace</a></td></tr>
<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="memstat.htm">Memory</a></td></tr>

<tr><td width="20">&nbsp;</td><td class="flyoutLink"><a href="settings.htm">Settings</a></td></tr>

<tr><td class="flyoutLink" colspan="2"><b><a href=http://www.snom.com/wiki/index.php/snom360>Manual</a>
</b></td></tr>
</table>
</td>
</tr>
</table>
<br>

<center class="normalText"><img src="img/logo2.gif" alt=""><br><br>
&copy; 2000-2007 <a href="http://snom.com">snom AG</a><br></center>

</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width=1 bgColor=#999999><IMG height=1
src="img/clr.gif" width=1 border=0></TD>
<TD class=background width="100%" height="1000">
<TABLE cellSpacing=0 cellPadding=0 width=588 border=0>
<TBODY>
<TR>

<TD width=16><IMG height=16 src="img/clr.gif" width=16></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>

<TR><TD vAlign="top" height="16"><IMG height="16" src="img/clr.gif" width="16"></TD></TR>
<TR>
<TD vAlign="top">
<FORM method="post">

<TABLE class="bubbleTable" cellSpacing="0" cellPadding="0" width="100%" border="0">
<TBODY>
<TR>
<TD class="background" width="12" height="5"><IMG height="12" src="img/corul.gif" width="12"></TD>
<TD width="12" height="5"><IMG height="5" src="img/clr.gif" width="12"></TD>
<TD width="12" height="5"><IMG height="5" src="img/clr.gif" width="12"></TD>
<TD class="background" width="12" height="5"><IMG height="12" src="img/corur.gif" width="12"></TD>
</TR>
<TR><TD></TD><TD class="normalText"><B>System Information:</B></TD></TR>
<TR><TD></TD><TD class="normalText">Phone Type:</TD><td class="normalText">snom360-SIP</td></TR>

<TR><TD></TD><TD class="normalText">MAC-Address:</TD><td class="normalText">00041323176F</td></TR>
<TR><TD></TD><TD class="normalText">IP-Address:</TD><td class="normalText">192.168.0.189</td></TR>
<TR><TD></TD><TD class="normalText">Kernel Version:</TD><td class="normalText">snom360 linux 3.25</td></TR>
<TR><TD></TD><TD class="normalText">Application-Version:</TD><td class="normalText">snom360-SIP 6.5.10</td></TR>
<TR><TD></TD><TD class="normalText">Rootfs-Version:</TD><td class="normalText">snom360 jffs2 v3.36</td></TR>
<TR><TD></TD><TD class="normalText">Firmware-URL:</TD><td class="normalText">http://provisioning.snom.com/download/snom360-6.5.10-SIP-j.bin</td></TR>

<TR><TD></TD><TD class="normalText">Production Information:</TD><td class="normalText">Mac:00041323176F;Version:Standard;Hardware:snom360 (Revesion B);Lot:12 (June 2005)</td></TR>
<TR><TD></TD><TD>&nbsp;</TD></TR>

<TR><TD></TD><TD class="normalText"><B>SIP Identity Status:</B></TD></TR>

<TR><TD></TD><td class="normalText">Identity 1&nbsp;Status:</TD><td class="normalText">100@192.168.0.142: OK</td></TR>
<TR><TD></TD><td class="normalText">Identity 2&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 3&nbsp;Status:</TD><td class="normalText"></td></TR>

<TR><TD></TD><td class="normalText">Identity 4&nbsp;Status:</TD><td class="normalText"></td></TR>

<TR><TD></TD><td class="normalText">Identity 5&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 6&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 7&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 8&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 9&nbsp;Status:</TD><td class="normalText"></td></TR>

<TR><TD></TD><td class="normalText">Identity 10&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 11&nbsp;Status:</TD><td class="normalText"></td></TR>
<TR><TD></TD><td class="normalText">Identity 12&nbsp;Status:</TD><td class="normalText"></td></TR>


<TR><TD></TD><TD>&nbsp;</TD></TR>

<TR><TD></TD><TD class="normalText"><B>Ethernet Status:</B></TD></TR>

<TR><TD></TD><td class="normalText">Net Port:</TD><td class="normalText">Connection Type:&nbsp;100 Mbit Full Duplex</td></TR>

<tr><TD></TD><td></TD><td class="normalText">Status:&nbsp;connected</td></TR>

<TR><TD></TD><TD>&nbsp;</TD></TR>

<TR><TD></TD><td class="normalText">PC Port:</TD><td class="normalText">Connection Type:&nbsp;</td></tr>
<tr><TD></TD><td></TD><td class="normalText">Status:&nbsp;not connected</td></tr>

<TR>
<TD class="background" vAlign="bottom" align="left" width="12" height="5"><IMG height="12" src="img/corll.gif" width="12"></TD>
<TD width="12" height="5"><IMG height="5" src="img/clr.gif" width="12"></TD>

<TD width="12" height="5"><IMG height="5" src="img/clr.gif" width="12"></TD>
<TD class="background" vAlign="bottom" align="right" width="12" height="5"><IMG height="12" src="img/corlr.gif" width="12"></TD>
</TR>
</TBODY></TABLE>
</FORM>
</TD>
</TR>
<TR><TD vAlign=top height=12><IMG height=12 src="img/clr.gif" width=12></TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY>

</HTML>