diff -urN phone-dev/phone.au.inc phone-dev_au/phone.au.inc
--- phone-dev/phone.au.inc	1970-01-01 10:00:00.000000000 +1000
+++ phone-dev_au/phone.au.inc	2008-04-15 12:06:06.000000000 +1000
@@ -0,0 +1,251 @@
+<?php
+// $Id: phone.au.inc,v 1.2 2007/05/11 13:39:58 thierrygd Exp $
+
+/**
+ * Verification for Australian Phone Numbers.  
+ * According to http://www.itu.int/itudoc/itu-t/number/a/aus/70772.html
+ *    (Released 2005/10/03, retrieved 2008/04/14)
+ *
+ * @param string $phonenumber
+ * @return boolean Returns boolean FALSE if the phone number is not valid. 
+ */
+function valid_au_phone_number($phonenumber) {
+
+  //$phonenumber = trim($phonenumber);
+
+  // strip formatting chars
+  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
+  // strip optional '+61' or '0' prefixes
+  $phonenumber = preg_replace('/^(\+61|0)/', '', $phonenumber);
+
+  //$rules[] = array("Prefix","Minimum length","Maximum length");
+  $rules[] = array("10", 5, 15);
+  $rules[] = array("12", 5, 15);
+  $rules[] = array("13", 6, 10);
+  $rules[] = array("1451", 9, 9);
+  $rules[] = array("1452", 9, 9);
+  $rules[] = array("1453", 9, 9);
+  $rules[] = array("1471", 9, 9);
+  $rules[] = array("16", 5, 9);
+  $rules[] = array("1800", 10, 10);
+  $rules[] = array("1801", 8, 8);
+  $rules[] = array("1900", 10, 10);
+  $rules[] = array("1901", 10, 10);
+  $rules[] = array("1902", 10, 10);
+  $rules[] = array("1906", 10, 10);
+  $rules[] = array("1983", 9, 9);
+  $rules[] = array("2001", 4, 4);
+  $rules[] = array("2002", 4, 4);
+  $rules[] = array("2003", 4, 4);
+  //$rules[] = array("2", 9, 9); // More specific rules follow
+  $rules[] = array("240", 9, 9);
+  $rules[] = array("242", 9, 9);
+  $rules[] = array("243", 9, 9);
+  $rules[] = array("244", 9, 9);
+  $rules[] = array("245", 9, 9);
+  $rules[] = array("246", 9, 9);
+  $rules[] = array("247", 9, 9);
+  $rules[] = array("248", 9, 9);
+  $rules[] = array("249", 9, 9);
+  $rules[] = array("260", 9, 9);
+  $rules[] = array("261", 9, 9);
+  $rules[] = array("262", 9, 9);
+  $rules[] = array("263", 9, 9);
+  $rules[] = array("264", 9, 9);
+  $rules[] = array("265", 9, 9);
+  $rules[] = array("266", 9, 9);
+  $rules[] = array("267", 9, 9);
+  $rules[] = array("268", 9, 9);
+  $rules[] = array("269", 9, 9);
+  $rules[] = array("28", 9, 9);
+  $rules[] = array("29", 9, 9);
+  //$rules[] = array("3", 9, 9); // More specific rules follow
+  $rules[] = array("350", 9, 9);
+  $rules[] = array("351", 9, 9);
+  $rules[] = array("352", 9, 9);
+  $rules[] = array("353", 9, 9);
+  $rules[] = array("354", 9, 9);
+  $rules[] = array("355", 9, 9);
+  $rules[] = array("356", 9, 9);
+  $rules[] = array("357", 9, 9);
+  $rules[] = array("358", 9, 9);
+  $rules[] = array("359", 9, 9);
+  $rules[] = array("362", 9, 9);
+  $rules[] = array("363", 9, 9);
+  $rules[] = array("364", 9, 9);
+  $rules[] = array("38", 9, 9);
+  $rules[] = array("39", 9, 9);
+  $rules[] = array("400", 9, 9);
+  $rules[] = array("401", 9, 9);
+  $rules[] = array("402", 9, 9);
+  $rules[] = array("403", 9, 9);
+  $rules[] = array("404", 9, 9);
+  $rules[] = array("405", 9, 9);
+  $rules[] = array("406", 9, 9);
+  $rules[] = array("407", 9, 9);
+  $rules[] = array("408", 9, 9);
+  $rules[] = array("409", 9, 9);
+  $rules[] = array("410", 9, 9);
+  $rules[] = array("411", 9, 9);
+  $rules[] = array("412", 9, 9);
+  $rules[] = array("413", 9, 9);
+  $rules[] = array("414", 9, 9);
+  $rules[] = array("415", 9, 9);
+  $rules[] = array("416", 9, 9);
+  $rules[] = array("417", 9, 9);
+  $rules[] = array("418", 9, 9);
+  $rules[] = array("419", 9, 9);
+  $rules[] = array("4200", 9, 9);
+  $rules[] = array("42010", 9, 9);
+  $rules[] = array("421", 9, 9);
+  $rules[] = array("422", 9, 9);
+  $rules[] = array("423", 9, 9);
+  $rules[] = array("424", 9, 9);
+  $rules[] = array("4251", 9, 9);
+  $rules[] = array("4252", 9, 9);
+  $rules[] = array("4253", 9, 9);
+  $rules[] = array("4256", 9, 9);
+  $rules[] = array("4257", 9, 9);
+  $rules[] = array("4258", 9, 9);
+  $rules[] = array("427", 9, 9);
+  $rules[] = array("428", 9, 9);
+  $rules[] = array("429", 9, 9);
+  $rules[] = array("430", 9, 9);
+  $rules[] = array("431", 9, 9);
+  $rules[] = array("432", 9, 9);
+  $rules[] = array("433", 9, 9);
+  $rules[] = array("434", 9, 9);
+  $rules[] = array("437", 9, 9);
+  $rules[] = array("438", 9, 9);
+  $rules[] = array("439", 9, 9);
+  $rules[] = array("448", 9, 9);
+  $rules[] = array("449", 9, 9);
+  $rules[] = array("50", 9, 9);
+  $rules[] = array("51", 9, 9);
+  $rules[] = array("52", 9, 9);
+  $rules[] = array("53", 9, 9);
+  $rules[] = array("54", 9, 9);
+  $rules[] = array("55", 9, 9);
+  $rules[] = array("56", 9, 9);
+  $rules[] = array("57", 9, 9);
+  $rules[] = array("58", 9, 9);
+  //$rules[] = array("59", 9, 9); //Not for use after 31 December 2005
+  //$rules[] = array("7", 9, 9); // More specific rules follow
+  $rules[] = array("73", 9, 9);
+  $rules[] = array("740", 9, 9);
+  $rules[] = array("741", 9, 9);
+  $rules[] = array("745", 9, 9);
+  $rules[] = array("746", 9, 9);
+  $rules[] = array("747", 9, 9);
+  $rules[] = array("749", 9, 9);
+  $rules[] = array("754", 9, 9);
+  $rules[] = array("755", 9, 9);
+  $rules[] = array("756", 9, 9);
+  //$rules[] = array("8", 9, 9); // More specific rules follow
+  $rules[] = array("86", 9, 9);
+  $rules[] = array("871", 9, 9);
+  $rules[] = array("872", 9, 9);
+  $rules[] = array("873", 9, 9);
+  $rules[] = array("874", 9, 9);
+  $rules[] = array("880", 9, 9);
+  $rules[] = array("881", 9, 9);
+  $rules[] = array("882", 9, 9);
+  $rules[] = array("883", 9, 9);
+  $rules[] = array("884", 9, 9);
+  $rules[] = array("885", 9, 9);
+  $rules[] = array("886", 9, 9);
+  $rules[] = array("887", 9, 9);
+  $rules[] = array("888", 9, 9);
+  $rules[] = array("889", 9, 9);
+  $rules[] = array("890", 9, 9);
+  $rules[] = array("891", 9, 9);
+  $rules[] = array("892", 9, 9);
+  $rules[] = array("893", 9, 9);
+  $rules[] = array("894", 9, 9);
+  $rules[] = array("895", 9, 9);
+  $rules[] = array("896", 9, 9);
+  $rules[] = array("897", 9, 9);
+  $rules[] = array("898", 9, 9);
+  $rules[] = array("899", 9, 9);
+
+  foreach ($rules as $rule) {
+    if (preg_match('/^'.$rule[0].'/', $phonenumber) && strlen($phonenumber) >= $rule[1] && strlen($phonenumber) <= $rule[2]) {
+      return TRUE;
+    }
+  }
+  return FALSE;
+}  
+
+/**
+ * Formatting for Australian Phone Numbers. Based upon ITU-T E.123 (but let's not get too crazy)
+ *
+ * @param string $phonenumber
+ * @return string Returns a string containing the phone number with some formatting.
+ */
+function format_au_phone_number($phonenumber) {
+  $prefix = '';
+  $extension = '';
+  // strip old formatting chars
+  $phonenumber = preg_replace('/[\-() ]/', '', $phonenumber);
+
+  /*
+   * strip and save the +61 prefix if found
+   */
+  if (preg_match('/^\+61/', $phonenumber, $match)) {
+    $prefix = '+61 ';
+    $phonenumber = str_replace('+61', '', $phonenumber);
+  }
+
+  /*
+   * strip and save the extension (x9999) postfix if found
+   */
+  if (preg_match('/ (x[0-9]+)$/', $phonenumber, $match)) {
+    $extension = ' ('.$match[1].')';
+    $phonenumber = preg_replace('/ x[0-9]+$/', '', $phonenumber);
+  }
+
+  /*
+   * geographic numbers and UPT
+   * Eg. (02) 9999 9999 or +61 (2) 9999 9999
+   */
+  if (preg_match('/^(0{0,1}[23578])([0-9]{4})([0-9]{4})$/', $phonenumber, $match)) {
+    return $prefix . '(' . $match[1] . ') ' . $match[2] . ' ' . $match[3] . $extension;
+  }
+
+  /*
+   * mobile numbers
+   * Eg. 0423 999 999 or +61 423 999 999
+   */
+  if (preg_match('/^(0{0,1}4[0-9]{2})([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
+    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
+  }
+
+  /*
+   * 10 digit numbers
+   * Eg. 1800 999 999
+   */
+  if (preg_match('/^([0-9]{4})([0-9]{3})([0-9]{3})$/', $phonenumber, $match)) {
+    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
+  }
+
+  /*
+   * 9 digit satellite or dialup data numbers
+   * Eg. 1471 99999
+   */
+  if (preg_match('/^(14[0-9]{2}|1983)([0-9]{5})$/', $phonenumber, $match)) {
+    return $prefix . $match[1] . ' ' . $match[2] . $extension;
+  }
+
+  /*
+   * 6 digit numbers
+   * Eg. 13 99 99
+   */
+  if (preg_match('/^([0-9]{2})([0-9]{2})([0-9]{2})$/', $phonenumber, $match)) {
+    return $prefix . $match[1] . ' ' . $match[2] . ' ' . $match[3] . $extension;
+  }
+
+  // default
+  return $prefix . $phonenumber . $extension;
+}
+
+// vim: set et sw=2 ts=2:
diff -urN phone-dev/phone.module phone-dev_au/phone.module
--- phone-dev/phone.module	2007-12-24 02:31:07.000000000 +1100
+++ phone-dev_au/phone.module	2008-04-15 15:21:52.000000000 +1000
@@ -20,6 +20,7 @@
     'ca_phone' => array('label' => t('US & Canadian Phone Numbers')),
     'uk_phone' => array('label' => t('British (UK) Phone Numbers')),
     'ru_phone' => array('label' => t('Russian Phone Numbers')),
+    'au_phone' => array('label' => t('Australian Phone Numbers')),
    );
 }
 
@@ -45,7 +46,8 @@
        || $field['type'] == 'it_phone'
        || $field['type'] == 'ca_phone'
        || $field['type'] == 'uk_phone'
-       || $field['type'] == 'ru_phone'){ 
+       || $field['type'] == 'ru_phone' 
+       || $field['type'] == 'au_phone'){ 
       	$columns = array(
         	'value' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
       	);
@@ -85,7 +87,7 @@
   return array(
     'default' => array(
       'label' => 'Default',
-      'field types' => array('fr_phone', 'it_phone', 'ca_phone', 'uk_phone', 'ru_phone'),
+      'field types' => array('fr_phone', 'it_phone', 'ca_phone', 'uk_phone', 'ru_phone', 'au_phone'),
     ),
   );
  } 
@@ -117,7 +119,7 @@
   return array(
     'phone' => array(
       'label' => t('Textfield'),
-      'field types' => array('fr_phone', 'it_phone', 'ca_phone', 'uk_phone', 'ru_phone'),
+      'field types' => array('fr_phone', 'it_phone', 'ca_phone', 'uk_phone', 'ru_phone', 'au_phone'),
     ),
   );
 }
@@ -185,20 +187,24 @@
     	      if ($item['value'] != '') 
 	      { 
     	        if ($field['type'] == 'fr_phone') { 
-	  	  $node_field[0]['value'] = format_phone_number('fr', $node_field[0]['value'], $field);
+	  	  $node_field[$delta]['value'] = format_phone_number('fr', $node_field[$delta]['value'], $field);
 	        }
     	        if ($field['type'] == 'it_phone') { 
-	  	  $node_field[0]['value'] = format_phone_number('it', $node_field[0]['value'], $field);
+	  	  $node_field[$delta]['value'] = format_phone_number('it', $node_field[$delta]['value'], $field);
 	        }	        
     	        if ($field['type'] == 'ca_phone') { 
-	          $node_field[0]['value'] = format_phone_number('ca', $node_field[0]['value'], $field);
+	          $node_field[$delta]['value'] = format_phone_number('ca', $node_field[$delta]['value'], $field);
 	        }
     	        if ($field['type'] == 'uk_phone') { 
-	          $node_field[0]['value'] = format_phone_number('uk', $node_field[0]['value'], $field);
+	          $node_field[$delta]['value'] = format_phone_number('uk', $node_field[$delta]['value'], $field);
 	        }
     	        if ($field['type'] == 'ru_phone') { 
-	          $node_field[0]['value'] = format_phone_number('ru', $node_field[0]['value'], $field);
-	        }	      }
+	          $node_field[$delta]['value'] = format_phone_number('ru', $node_field[$delta]['value'], $field);
+		}
+    	        if ($field['type'] == 'au_phone') { 
+	          $node_field[$delta]['value'] = format_phone_number('au', $node_field[$delta]['value'], $field);
+		}
+	      }
 	    }
 	  }
     break;
@@ -222,8 +228,12 @@
                 form_set_error($field['field_name'],t('"%value" is not a valid British phone number<br>British Phone numbers should .... ', array('%value' => $item['value'])));
               }    
               if ($field['type'] == 'ru_phone' && !valid_phone_number('ru', $item['value'])) {
-                form_set_error($field['field_name'],t('"%value" is not a valid Russian phone number<br>British Phone numbers should .... ', array('%value' => $item['value'])));
-              }                 }
+                form_set_error($field['field_name'],t('"%value" is not a valid Russian phone number<br>Russian Phone numbers should .... ', array('%value' => $item['value'])));
+	      }
+              if ($field['type'] == 'au_phone' && !valid_phone_number('au', $item['value'])) {
+                form_set_error($field['field_name'],t('"%value" is not a valid Australian phone number.', array('%value' => $item['value'])));
+	      }
+	    }
           }
       }      
       break;
@@ -246,7 +256,8 @@
   	|| $countrycode == 'it'  
   	|| $countrycode == 'ca'
   	|| $countrycode == 'uk'
-  	|| $countrycode == 'ru') { 
+  	|| $countrycode == 'ru'
+  	|| $countrycode == 'au') { 
 	
         //drupal_set_message('langue = ' . $countrycode, 'error');
 
@@ -282,7 +293,8 @@
   	|| $countrycode == 'it'
   	|| $countrycode == 'ca'
   	|| $countrycode == 'uk'
-  	|| $countrycode == 'ru') { 
+  	|| $countrycode == 'ru'
+  	|| $countrycode == 'au') { 
 	
         //drupal_set_message('langue = ' . $countrycode, 'error');       
 
