<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Sipdroid&#039;s Blog</title>
	<atom:link href="http://sipdroid.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sipdroid.wordpress.com</link>
	<description>concentrated in VoIP</description>
	<lastBuildDate>Wed, 07 Jul 2010 04:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sipdroid.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Sipdroid&#039;s Blog</title>
		<link>http://sipdroid.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sipdroid.wordpress.com/osd.xml" title="Sipdroid&#039;s Blog" />
	<atom:link rel='hub' href='http://sipdroid.wordpress.com/?pushpress=hub'/>
		<item>
		<title>interesting things about virtual function</title>
		<link>http://sipdroid.wordpress.com/2010/04/25/interesting-things-about-virtual-function/</link>
		<comments>http://sipdroid.wordpress.com/2010/04/25/interesting-things-about-virtual-function/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 05:14:43 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/?p=38</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=38&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: cpp;">

class Base{

virtual void test1()
 {
printf(&quot;test1()in Base \n&quot;);
 }

virtual void test2(int x=5)
 {
 printf(&quot;test2(%d)in Base:\n&quot;,x);
 }

}

class Derived: public Base

{

virtual void test1(int x=6) // the virtual keyword is not needed
 {
printf(&quot;test1(%d)in Derived \n&quot;,x);
 }

virtual void test2(int x=6)   //the virtual keyword is not needed
 {
printf(&quot;test2(%d)in Derived\n&quot;,x);
 }

}

Use use;
 Base* base = &amp;use;
 base-&gt;test1();   //print out is : test1() in Base, the reason is test1() in Base and Derived has different signature, no override.

base-&gt;test2(); //print out is : test2(5) in Derived the test2() in override, but default value does not have virtual property.

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=38&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/04/25/interesting-things-about-virtual-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
		<item>
		<title>Synchronized Age Map</title>
		<link>http://sipdroid.wordpress.com/2010/04/19/synchronized-age-map/</link>
		<comments>http://sipdroid.wordpress.com/2010/04/19/synchronized-age-map/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 05:44:38 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/?p=30</guid>
		<description><![CDATA[I often need a synchronized map in multiple threads environment. developed a basic one , if  you have any comments to improve it, please let me know.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=30&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I often need a synchronized map in multiple threads environment. developed a basic one , if  you have any comments to improve it, please let me know.</p>
<p><pre class="brush: cpp;">

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the &quot;License&quot;); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
 pthread_mutexattr_t mutex_attr;
 pthread_mutexattr_init(&amp;mutex_attr);
 pthread_mutexattr_settype(&amp;mutex_attr, PTHREAD_MUTEX_RECURSIVE);
 pthread_mutex_init(&amp;mutex_, &amp;mutex_attr);
 // pthread_mutex_init(&amp;mutex_, NULL);

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=30&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/04/19/synchronized-age-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
		<item>
		<title>dyndns  python script auto update</title>
		<link>http://sipdroid.wordpress.com/2010/02/05/dyndns-python-script-auto-update/</link>
		<comments>http://sipdroid.wordpress.com/2010/02/05/dyndns-python-script-auto-update/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 01:31:15 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2010/02/05/dyndns-python-script-auto-update/</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=29&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: python;">

#!/usr/bin/python

import sys,re,base64,string,cookielib, urllib, urllib2,httplib

login = 'xxx'
password = 'xxx'

hostlist='xxx.xxx.xxx'  &lt;--- your host name

m=urllib.urlopen('&lt;a href=&quot;http://checkip.dyndns.org/')&quot;&gt;http://checkip.dyndns.org/')&lt;/a&gt;
if m :
content = m.read()
else :
print ' could not connect to external network '
sys.exit(1)

match = re.search(r'&lt;body&gt;Current IP Address: (\S)+&lt;/body&gt;',content)
if not match :
print ' could not get my external ip address'
sys.exit(2)

ipaddress = match.group(0)
print 'our external IP address is :'+ ipaddress

updatehost = &quot;members.dyndns.org&quot;
fakeagent = &quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)&quot;
updatepage = &quot;/nic/update&quot;
updateprefix = updatepage + &quot;?system=custom&amp;hostname=&quot;
updatesuffix = '&amp;myip='+ipaddress

h2 = httplib.HTTPS(updatehost)
h2.putrequest(&quot;GET&quot;, updateprefix + hostlist + updatesuffix)
h2.putheader(&quot;HOST&quot;, updatehost)
h2.putheader(&quot;USER-AGENT&quot;, fakeagent)
authstring = base64.encodestring(login + &quot;:&quot; + password)
authstring = string.replace(authstring, &quot;12&quot;, &quot;&quot;)
h2.putheader(&quot;AUTHORIZATION&quot;, &quot;Basic &quot; + authstring)
h2.endheaders()

errcode, errmsg, headers = h2.getreply()

# try to get the html text
try:
fp = h2.getfile()
httpdata = fp.read()
fp.close()
except:
httpdata = &quot;No output from http request.&quot;
fp.close()

print httpdata

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=29&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/02/05/dyndns-python-script-auto-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
		<item>
		<title>config voicemail in asterisk</title>
		<link>http://sipdroid.wordpress.com/2010/01/18/config-voicemail-in-asterisk/</link>
		<comments>http://sipdroid.wordpress.com/2010/01/18/config-voicemail-in-asterisk/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 07:39:42 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[asterisk]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2010/01/18/config-voicemail-in-asterisk/</guid>
		<description><![CDATA[1) Config exim4 http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/ 2) Config asterisk http://rblondon.blogspot.com/2008/02/asterisk-voicemail-quick-exim4-notes.html I don’t see a need to define ( mailcmd=/usr/exim/bin/exim –t ) Asterisk Voicemail &#8211; Quick Exim4 notes After installing asterisk I set up the voicemail configuration. First un apt-get install exim4 and then run pkg-reconfigure exim4-config and follow the instructions. After the configuration exim4 should restart itself [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=24&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>1) Config exim4</h3>
<p><a title="http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/" href="http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/">http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/</a></p>
<h3>2) Config asterisk</h3>
<p><a title="http://rblondon.blogspot.com/2008/02/asterisk-voicemail-quick-exim4-notes.html" href="http://rblondon.blogspot.com/2008/02/asterisk-voicemail-quick-exim4-notes.html">http://rblondon.blogspot.com/2008/02/asterisk-voicemail-quick-exim4-notes.html</a></p>
<p>I don’t see a need to define <a href="http://www.voip-info.org/wiki/view/Asterisk+config+voicemail.conf">( mailcmd=/usr/exim/bin/exim –t )</a></p>
<blockquote>
<h5><a href="http://rblondon.blogspot.com/2008/02/asterisk-voicemail-quick-exim4-notes.html">Asterisk Voicemail &#8211; Quick Exim4 notes</a></h5>
<p>After installing asterisk I set up the voicemail configuration. First un apt-get install exim4 and then run pkg-reconfigure exim4-config and follow the instructions.<br />
After the configuration exim4 should restart itself but if not use /etc/init.d/exim4 restart.<br />
Configure the voicemail.conf file as follows:<br />
[general]<br />
format=wav<br />
serveremail=asterisk<br />
attach=yes<br />
skipms=3000<br />
maxsilence=10<br />
silencethreshold=128<br />
maxlogins=3<br />
pbxskip=yes<br />
fromstring=Voicemail<br />
emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}. The message is attached. Thanks!\n\n\t\t\t\t\n<br />
emaildateformat=%A, %B %d, %Y at %r<br />
sendvoicemail=no<br />
delete=yes<br />
[zonemessages]<br />
eastern=America/New_York|&#8217;vm-received&#8217; Q &#8216;digits/at&#8217; IMp<br />
central=America/Chicago|&#8217;vm-received&#8217; Q &#8216;digits/at&#8217; IMp<br />
central24=America/Chicago|&#8217;vm-received&#8217; q &#8216;digits/at&#8217; H N &#8216;hours&#8217;<br />
military=Zulu|&#8217;vm-received&#8217; q &#8216;digits/at&#8217; H N &#8216;hours&#8217; &#8216;phonetic/z_p&#8217;<br />
european=Europe/Copenhagen|&#8217;vm-received&#8217; a d b &#8216;digits/at&#8217; HM<br />
[default]<br />
89300 =&gt; 89300,User1,user1@mailserver.com<br />
Now on Sip.con add the mailbox line (mailbox account and context of voicemail.conf)<br />
[89300]<br />
type=friend<br />
regexten=89300<br />
context=default<br />
mailbox=89300@default<br />
secret=89300<br />
username=89300<br />
callerid=&#8221;User1&#8243; &lt;89300&gt;<br />
host=dynamic<br />
nat=yes<br />
canreinvite=no<br />
disallow=all<br />
allow=alaw<br />
allow=ulaw<br />
dtmfmode=inband<br />
Finally on extensions.conf set each SIP extensions (will use macros later) to wait for 20 seconds and go to Voicemails as follows:<br />
[default]<br />
exten =&gt; 89300,1,Dial(SIP/89300,20)<br />
exten =&gt; 89300,2,VoiceMail(89300@default)<br />
exten =&gt; 89300,3,PlayBack(vm-goodbye)<br />
exten =&gt; 89300,4,HangUp()</p></blockquote>
<h3>3) Multiple recipients</h3>
<p><a title="http://www.voip-info.org/wiki/index.php?page=Asterisk+config+voicemail.conf" href="http://www.voip-info.org/wiki/index.php?page=Asterisk+config+voicemail.conf">http://www.voip-info.org/wiki/index.php?page=Asterisk+config+voicemail.conf</a></p>
<p>- sudo vim /etc/mail/aliases</p>
<blockquote><p>- Example from voicemail.com: 1234 =&gt; 1234,Sample User,<strong>msmith</strong>,,attach=yes</p></blockquote>
<blockquote><p>-  Example from /etc/mail/aliases: <strong>msmith:</strong> &lt;msmith@yourmail.com&gt;, <a href="mailto:msmith@othermail.com">msmith@othermail.com</a></p></blockquote>
<p>- sudo newaliases</p>
<h3>4) More flexible script approach</h3>
<p><a title="http://tonylandis.com/uncategorized/asterisk-voicemail-sending-emailing-custom/" href="http://tonylandis.com/uncategorized/asterisk-voicemail-sending-emailing-custom/">http://tonylandis.com/uncategorized/asterisk-voicemail-sending-emailing-custom/</a></p>
<blockquote>
<pre>#!/usr/bin/php -q
&lt;?php
/**
 * ASTERISK PBX VOICEMAIL MAILER
 *
 * @author Tony Landis
 * @link http://www.tonylandis.com
 * @license Use how you like it, just please don't remove or alter this PHPDoc
 */

#
# config smtp info
#
$mail_lib_path  = "/var/www/inc/phpmailer/";	// path to the phpmailer library
$ast_vm_path	= "/var/spool/asterisk/voicemail/default/{MAILBOX}/INBOX/"; // where asterisk mailboxes are located
$ast_vm_ext	= "wav";	// voicemail recording file extensions to look for
$from		= "asterisk-pbx@domain.com";	// from e-mail address to use
$fromName	= "Asterisk PBX Voicemail";	// from name to use when sending email
$host           = "mail.domainn.com";	// smtp host
$username       = ""; // smtp username
$password       = "";	// smtp password
$port 		= "25";	// smtp port

#
# a few php settings
#
error_reporting(0);
set_time_limit(30);

#
# get args from STDIN
#
$args = array();
for($i=0; $i&lt;5; $i++) add2array(trim(fgets(STDIN)), $args); 

#
# parse out the recipient info
#
if(preg_match('/^\"([a-zA-Z0 ]{1,})\" \&lt;(.+)\&gt;/', $args['To'], $matches)) {
	$toEmail = $matches[2]; # to email
	$toName = $matches[1];	# to name
}

#
# Parse the contents of the subject
#
$subject = explode("|", $args['Subject']);
$mailbox = $subject[0];
$msgnum  = $subject[1];
$callerid= $subject[2];
$duration= $subject[3];

#
# compose the email subject and body
#
$subject = "New voicemail for " . ucfirst($toName);
$body    = "Hello " . ucfirst($toName) . ",\r\n" .
		   "You have a new message in for mailbox # {$mailbox} from {$callerid}, with a duration of {$duration}";

#
# mail class
#
require($mail_lib_path . "class.phpmailer.php");
$mail = new PHPMailer();
$mail-&gt;Subject  = $subject;
$mail-&gt;Body	= $body;
$mail-&gt;AddAddress($toEmail, $toName);
$mail-&gt;From     = $from;
$mail-&gt;FromName = $fromName;
$mail-&gt;Host     = $host;
$mail-&gt;Mailer   = "smtp";
$mail-&gt;SMTPAuth = true;
$mail-&gt;Username = $username;
$mail-&gt;Password = $password;
$mail-&gt;Port 	= $port; 

#
# attempt to attach the voicemail recording
#
if(!empty($mailbox) &amp;&amp; !empty($msgnum))
{
	for($i=0; $i&lt;=(5-strlen($msgnum)); $i++) $msgnum = "0" . $msgnum;
	$attach = str_replace("{MAILBOX}", $mailbox, $ast_vm_path) . "msg" . $msgnum . "." . $ast_vm_ext;
	#$mail-&gt;Body .= "\r\n" . $attach; # uncomment to debug if messages are not attached
	if(is_file($attach))
		$mail-&gt;AddAttachment($attach, "Message-". $mailbox ."-". $msgnum .".". $ast_vm_ext);
}

#
# send the email
#
if($mail-&gt;Send())
{
	echo "\r\nSent Ok! \r\n";
} else {
	echo "\r\nSend Failed... \r\n";
	echo $mail-&gt;ErrorInfo;
}

#
# function add to the args array
#
function add2array($str, &amp;$args)
{
	if(preg_match("/^([a-zA-Z0-9]{1,}): (.+)/", $str, $matches))
	{
		$key = $matches[1];
		$val = $matches[2];
		$args[$key] = $val;
	}
}</pre>
</blockquote>
<h3>5) Voice as mp3 file</h3>
<p><a title="http://www.voip-info.org/wiki/view/Asterisk+Voicemail" href="http://www.voip-info.org/wiki/view/Asterisk+Voicemail">http://www.voip-info.org/wiki/view/Asterisk+Voicemail</a></p>
<p>- voicemail.conf</p>
<blockquote><p>mailcmd=perl /var/lib/asterisk/agi-bin/mp3vm.pl</p></blockquote>
<p>- mp3vm.pl</p>
<blockquote><p>#!/usr/bin/perl</p>
<p>open(VOICEMAIL,&#8221;|/usr/sbin/exim -t&#8221;);</p>
<p>open(LAMEDEC,&#8221;|/usr/bin/dos2unix|/usr/bin/base64 -di|/usr/bin/lame &#8211;quiet &#8211;preset voice &#8211; /var/spool/asterisk/tmp/vmout.$$.mp3&#8243;);</p>
<p>open(VM,&#8221;&gt;/var/spool/asterisk/tmp/vmout.debug.txt&#8221;);</p>
<p>my $inaudio = 0;</p>
<p>loop: while(&lt;&gt;){                        # read from STDIN that is passed from asterisk</p>
<p>if(/^\.$/){                               #process line G that marks the end of email</p>
<p>last loop;</p>
<p>}</p>
<p>if(/^Content-Type: audio\/x-wav/i){<br />
$inaudio = 1;</p>
<p>}</p>
<p>if($inaudio){</p>
<p>while(s/^(Content-.*)wav(.*)$/$1mp3$2/gi){}     # process  line A-D</p>
<p>if(/^\n$/){                                             # process line E that marks the beginning of wav encoded content</p>
<p>iloop: while(&lt;&gt;){                                  # process line with wav encoded content and convert to mp3</p>
<p>print LAMEDEC $_;</p>
<p>if(/^\n$/){                                         #process line F that marks the end of wav encoded content</p>
<p>last iloop;</p>
<p>}</p>
<p>}</p>
<p>close(LAMEDEC);</p>
<p>print VOICEMAIL &#8220;\n&#8221;;</p>
<p>print VM &#8220;\n&#8221;;</p>
<p>open(B64,&#8221;/usr/bin/base64 /var/spool/asterisk/tmp/vmout.$$.mp3|&#8221;);  # $$ stands for process id</p>
<p>while(&lt;B64&gt;){</p>
<p>print VOICEMAIL $_;                       #  dump the while mp3 file<br />
print VM $_;</p>
<p>}</p>
<p>close(B64);</p>
<p>print VOICEMAIL &#8220;\n&#8221;;</p>
<p>print VM &#8220;\n&#8221;;</p>
<p>$inaudio = 0;</p>
<p>}</p>
<p>}                                                    # match the if ($inaudio)</p>
<p>print VOICEMAIL $_;                      # process lines that are not wav encoded related.</p>
<p>print VM $_;</p>
<p>}</p>
<p>print VOICEMAIL &#8220;\.&#8221;;</p>
<p>print VM &#8220;\.&#8221;;</p>
<p>close(VOICEMAIL);</p>
<p>close(VM);</p>
<p>#CLEAN UP THE TEMP FILES CREATED</p>
<p>#This has to be done in a separate cron type job</p>
<p>#because unlinking at the end of this script is too fast,</p>
<p>#the message has not even gotten piped to send mail yet</p></blockquote>
<p>sample file:</p>
<blockquote><p>Date: Mon, 18 Jan 2010 15:01:02 -0800</p>
<p>From: &#8220;Voicemail&#8221; <a href="mailto:asterisk@home">asterisk@home</a></p>
<p>To: &#8220;Mr XYZ&#8221; &lt;homenotify&gt;</p>
<p>Subject: New message 2 in mailbox 2009</p>
<p>Message-ID: &lt;Asterisk-2-1800285858-2009-6826@m9000t&gt;</p>
<p>MIME-Version: 1.0</p>
<p>Content-Type: multipart/mixed; boundary=&#8221;&#8212;-voicemail_2200968261038445079&#8243;</p>
<p>This is a multi-part message in MIME format.</p>
<p>&#8212;&#8212;voicemail_2200968261038445079</p>
<p>Content-Type: text/plain; charset=ISO-8859-1</p>
<p>Content-Transfer-Encoding: 8bit</p>
<p>Dear Mr XYZ:</p>
<p>just wanted to let you know you were just left a 0:23 long message (number 2)</p>
<p>in mailbox 2009 from an unknown caller, on Monday, January 18, 2010 at 03:01:02 PM. The message is attached. Thanks!</p>
<p>&#8212;&#8212;voicemail_2200968261038445079</p>
<p>Content-Type: audio/x-mp3; name=&#8221;msg0002.mp3&#8243;                                &lt;&#8212;&#8211; line A<br />
Content-Transfer-Encoding: base64</p>
<p>Content-Description: Voicemail sound attachment.</p>
<p>Content-Disposition: attachment; filename=&#8221;msg0002.mp3&#8243;                  &lt;&#8212;-  line  D</p>
<p>&lt;&#8212;- line E there is a \n</p>
<p>/+NIxAAAAAAAAAAAAFhpbmcAAAAPAAABRQACZSAAAwUHCg0PEhQXGhweISQmKCsuMDI2ODo9QEJF</p>
<p>R0………………….</p>
<p>…….</p>
<p>xnCmRrWzAqJRmKkhr24QhFQzTTA19b4RBwZfpYbFutHIam45DVDJIaoY5DVDBlVMQU1FMy45N1VV</p>
<p>VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxCIAAANIAcAAAFVVVVVVVVVVVVVVVVVVVVVVVVVV</p>
<p>VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV</p>
<p>&lt;&#8212;&#8211;line F there is a \n</p>
<p>&#8212;&#8212;voicemail_2200968261038445079&#8211;</p>
<p>.                                           &lt;&#8212;&#8212;line G this is the end of e-mail</p></blockquote>
<p>as you can see, it is very easy to manipulate the file and add Bcc or CC</p>
<p>more perl tutorial: <a title="http://aplawrence.com/Unix/perlinput.html" href="http://aplawrence.com/Unix/perlinput.html">http://aplawrence.com/Unix/perlinput.html</a></p>
<h3>6) voice to text</h3>
<p>There are companies that sell such a service</p>
<p><a href="http://www.phonewire.com/cc/voicemail?=/">http://www.phonewire.com/cc/voicemail?=/</a></p>
<p><a href="http://www.tellme.com/business">http://www.tellme.com/business</a></p>
<p><a href="http://www.spinvox.com/how_it_works.html">http://www.spinvox.com/how_it_works.html</a> <a title="http://forge.asterisk.org/gf/project/spintools/" href="http://forge.asterisk.org/gf/project/spintools/">http://forge.asterisk.org/gf/project/spintools/</a></p>
<p><a href="http://www.phonetag.com/">http://www.phonetag.com/</a></p>
<h3>7) Receive Fax and send as e-mail attachment</h3>
<p>in extensions.conf</p>
<blockquote><p>[macro-faxreceive]<br />
exten =&gt; s,1,Set(FAXFILE=/var/spool/asterisk/tmp/${UNIQUEID}.tif)<br />
exten =&gt; s,2,Set(EMAILADDR=abcdefg@gmail.com)<br />
exten =&gt; s,3,rxfax(${FAXFILE})</p>
<p>[fax]<br />
exten =&gt; 2222,1,Macro(faxreceive)<br />
exten =&gt; h,1,system(/var/lib/asterisk/agi-bin/mailfax ${FAXFILE} ${EMAILADDR} &#8220;${CALLERIDNUM} ${CALLERIDNAME}&#8221;)</p>
<p>[default]</p>
<p>; Did we get a fax?<br />
exten =&gt; fax,1,Goto(fax,2222,1)</p></blockquote>
<p>and you have the file /var/lib/asterisk/agi-bin/mailfax</p>
<blockquote><p>#!/bin/sh</p>
<p>FAXFILE=$1<br />
RECIPIENT=$2<br />
FAXSENDER=$3</p>
<p>#tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE | ps2pdf &#8211; | uuencode fax.pdf | mail -s &#8220;Fax sent from $FAXSENDER&#8221; $RECIPIENT<br />
tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE | ps2pdf &#8211; | mime-construct &#8211;to $RECIPIENT &#8211;subject &#8220;Fax from $FAXSENDER&#8221; &#8211;attachment fax.pdf &#8211;type application/pdf &#8211;file -</p></blockquote>
<h3>8)  Send fax  not implemented yet.</h3>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=24&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/01/18/config-voicemail-in-asterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
		<item>
		<title>SIPBroker</title>
		<link>http://sipdroid.wordpress.com/2010/01/12/sipbroker/</link>
		<comments>http://sipdroid.wordpress.com/2010/01/12/sipbroker/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 07:11:40 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[sip]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2010/01/12/sipbroker/</guid>
		<description><![CDATA[1)PSTN Access number listed at:&#160;&#160; SIPBroker &#8211; PSTN Numbers &#160; 2)SIP Service providers&#160; list at SIPBroker &#8211; Provider White Pages &#160; 3)for instance,&#160; you have a SIP&#160; account at iptel.org , that should also has has alias xxxxxx@iptel.org&#160; where xxxxxx is a 6 digits number. According to the list in 2) ,&#160;&#160; *478&#160;&#160;&#160; iptel.org&#160;&#160;&#160;&#160;&#160; Iptel&#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=20&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1)PSTN Access number listed at:&#160;&#160; <a href="http://www.sipbroker.com/sipbroker/action/pstnNumbers">SIPBroker &#8211; PSTN Numbers</a></p>
<p>&#160;</p>
<p>2)SIP Service providers&#160; list at <a href="http://sipbroker.com/sipbroker/action/providerWhitePages">SIPBroker &#8211; Provider White Pages</a> </p>
<p>&#160;</p>
<p>3)for instance,&#160; you have a SIP&#160; account at iptel.org , that should also has has alias <a href="mailto:xxxxxx@iptel.org">xxxxxx@iptel.org</a>&#160; where xxxxxx is a 6 digits number.</p>
<p>According to the list in 2) ,&#160;&#160; <img src="http://sipbroker.com/graphics/TrafGreen.gif" /> *478&#160;&#160;&#160; iptel.org&#160;&#160;&#160;&#160;&#160; Iptel&#160; <img title="United States" alt="United States" src="http://img.nameintel.com/flags/us.gif" width="18" height="12" /> <a href="http://www.iptel.org">[Home]</a></p>
<p>&#160;</p>
<p>suppose you want somebody who only has PSTN phone to reach you,&#160; then you need to look for an access number listed in 1) that is close to he/she so he/she can avoid long distance call.or a phone access number listed in 1) that services your city if long distance charge is not one concern. for example , </p>
<blockquote><p>Boston, MA&#160; +1-617-399-8298&#160; </p>
</blockquote>
<p>&#160;</p>
<p>after he/she dials that number, there is voice prompt he/she should then dial *478xxxxxx, where xxxxxx is got from step 3).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=20&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/01/12/sipbroker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>

		<media:content url="http://sipbroker.com/graphics/TrafGreen.gif" medium="image" />

		<media:content url="http://img.nameintel.com/flags/us.gif" medium="image">
			<media:title type="html">United States</media:title>
		</media:content>
	</item>
		<item>
		<title>IPSec VPN vs. SSL VPN</title>
		<link>http://sipdroid.wordpress.com/2010/01/04/ipsec-vpn-vs-ssl-vpn/</link>
		<comments>http://sipdroid.wordpress.com/2010/01/04/ipsec-vpn-vs-ssl-vpn/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 06:43:45 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2010/01/04/ipsec-vpn-vs-ssl-vpn/</guid>
		<description><![CDATA[&#160; http://technet.microsoft.com/en-us/library/cc759130%28WS.10%29.aspx#w2k3tr_ipsec_how_agut &#160; &#160; http://archive.networknewz.com/networknewz-10-20031201SSLVPNinDetail.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=18&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><a title="http://technet.microsoft.com/en-us/library/cc759130%28WS.10%29.aspx#w2k3tr_ipsec_how_agut" href="http://technet.microsoft.com/en-us/library/cc759130%28WS.10%29.aspx#w2k3tr_ipsec_how_agut">http://technet.microsoft.com/en-us/library/cc759130%28WS.10%29.aspx#w2k3tr_ipsec_how_agut</a></p>
<p><a href="http://sipdroid.files.wordpress.com/2010/01/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://sipdroid.files.wordpress.com/2010/01/image_thumb.png?w=527&#038;h=272" width="527" height="272" /></a> </p>
<p>&#160;</p>
<p>&#160;</p>
<p><a title="http://archive.networknewz.com/networknewz-10-20031201SSLVPNinDetail.html" href="http://archive.networknewz.com/networknewz-10-20031201SSLVPNinDetail.html">http://archive.networknewz.com/networknewz-10-20031201SSLVPNinDetail.html</a></p>
<p><a href="http://sipdroid.files.wordpress.com/2010/01/image1.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://sipdroid.files.wordpress.com/2010/01/image_thumb1.png?w=288&#038;h=393" width="288" height="393" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=18&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2010/01/04/ipsec-vpn-vs-ssl-vpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>

		<media:content url="http://sipdroid.files.wordpress.com/2010/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://sipdroid.files.wordpress.com/2010/01/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>HTC hero CDMA sprint</title>
		<link>http://sipdroid.wordpress.com/2009/12/27/htc-hero-cdma-sprint/</link>
		<comments>http://sipdroid.wordpress.com/2009/12/27/htc-hero-cdma-sprint/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 05:59:25 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2009/12/27/htc-hero-cdma-sprint/</guid>
		<description><![CDATA[&#160; http://forum.xda-developers.com/forumdisplay.php?f=519 &#160;http://www.androidin.net/bbs/viewthread.php?tid=23700&#38;from=favorites http://www.androidin.net/bbs/thread-28142-1-1.html &#160; chapter 1. Radio &#160; 什么是radio，怎么刷radio？&#160;&#160;&#160; 这个Radio指代的是通讯模块，就是手机里面负责信号部分的模块，PDA类型的手机，基本都强调这么个概念。一个是PDA，一个是手机（貌似是句废话- -），举个很简单的例子，以三星的PPC手机为例，比如i718.比如i908，他们在刷机的时候（所谓刷机就是重装系统）一般都是分两部分，第一部分刷手机部分，第二部分刷PDA部分，而且两部分基本不相干。 radio 版本的查看：可以在设置-&#62;关于手机里查看到，baseband版本就是。 比如我的是：1.04.01.09.21 &#160; 刷radio和刷rom的操作基本相同，radio可以在modaco论坛 下载，同样也是zip包，放到sd卡下，用home+挂机键 开机进入recovery，刷入这个zip文件，中间会要你重启一次（第一个选项重启），进入一个中间有一个盒子的界面，耐心等待，直到下方会提示“fomating cache&#8230;&#8230;.”，这个时候才是已经刷完了！ &#160;&#160;&#160;&#160;&#160; &#160; &#160; chapter 2. ROM 2.1&#160; 我怎么知道我手机的rom版本？这个版本是高还是低？ 进入设置-&#62;关于手机-&#62;Build Number(内部版本) 就是你手机的rom版本，格式一般为1.23.456.7或者1.23.456.78，其中1.23为大版本号，目前最新的版本号是2.73，7或者78为小版本号（姑且这么说吧），版本号数字越大越新，456感觉为区域号。比如说目前官方提供的通用rom是 2.73.405.5，而最新的通用rom版本是2.73.405.61，其中405就是通用区域号。 &#160;&#160;&#160;&#160;&#160; 另外也有部分是一些自制版本，比如modaco或者drizzy等，他们会在内部版本或者软件版本那儿把自己的大名写进去，比如modaco 3.0,大家可以去modaco的论坛或者 xda的论坛 或者 本论坛的FLZYUP的rom搜索最新的版本情况。 &#160; 2.2 刷rom之前我要做什么？ 如果选择官方RUU直接升级， 可以参考htc website.&#160; http://www.androidin.net/bbs/viewthread.php?tid=15867 &#160; 如果刷其他rom，你需要有recovery.img，recovery就是你用home键+开机键开机后能进入的一个界面，在这个界面你可以直接用sd卡上的zip的rom升级或者备份你的系统. &#160;&#160;&#160;&#160;&#160;&#160; 老版本的recovery只有三个选项，无法备份系统，只能用update.zip这个文件名的文件升级，不能用任何文件名的zip文件升级。 &#160;&#160;&#160; &#160; Step 1 ) root [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=13&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><a title="http://forum.xda-developers.com/forumdisplay.php?f=519" href="http://forum.xda-developers.com/forumdisplay.php?f=519">http://forum.xda-developers.com/forumdisplay.php?f=519</a></p>
<p>&#160;<a title="http://www.androidin.net/bbs/viewthread.php?tid=23700&amp;from=favorites" href="http://www.androidin.net/bbs/viewthread.php?tid=23700&amp;from=favorites">http://www.androidin.net/bbs/viewthread.php?tid=23700&amp;from=favorites</a></p>
<p><a title="http://www.androidin.net/bbs/thread-28142-1-1.html" href="http://www.androidin.net/bbs/thread-28142-1-1.html">http://www.androidin.net/bbs/thread-28142-1-1.html</a></p>
<h2>&#160;</h2>
<h2>chapter 1. Radio</h2>
<p>&#160;</p>
<p><strong>什么是radio，怎么刷radio？&#160;&#160;&#160; </strong></p>
<blockquote><p>这个Radio指代的是通讯模块，就是手机里面负责信号部分的模块，PDA类型的手机，基本都强调这么个概念。一个是PDA，一个是手机（貌似是句废话- -），举个很简单的例子，以三星的PPC手机为例，比如i718.比如i908，他们在刷机的时候（所谓刷机就是重装系统）一般都是分两部分，第一部分刷手机部分，第二部分刷PDA部分，而且两部分基本不相干。     </p>
<p>radio 版本的查看：可以在设置-&gt;关于手机里查看到，baseband版本就是。 比如我的是：1.04.01.09.21</p>
<p>&#160;</p>
</blockquote>
<p>刷radio和刷rom的操作基本相同，radio可以在<a href="http://android.modaco.com/content/htc-hero-hero-modaco-com/291942/gsm-24-11-hero-roms-radios-in-update-zip-format/">modaco论坛</a> 下载，同样也是zip包，放到sd卡下，用home+挂机键 开机进入recovery，刷入这个zip文件，中间会要你重启一次（第一个选项重启），进入一个中间有一个盒子的界面，耐心等待，直到下方会提示“fomating cache&#8230;&#8230;.”，这个时候才是已经刷完了！    <br />&#160;&#160;&#160;&#160;&#160; </p>
<p>&#160;</p>
<p>&#160;</p>
<h2>chapter 2. <font size="3">ROM</font></h2>
<p><font size="3"></font></p>
<h3>2.1&#160; 我怎么知道我手机的rom版本？这个版本是高还是低？</h3>
<p><strong></strong>    <br />进入设置-&gt;关于手机-&gt;Build Number(内部版本) 就是你手机的rom版本，格式一般为1.23.456.7或者1.23.456.78，其中1.23为大版本号，目前最新的版本号是2.73，7或者78为小版本号（姑且这么说吧），版本号数字越大越新，456感觉为区域号。比如说目前官方提供的通用rom是 2.73.405.5，而最新的通用rom版本是2.73.405.61，其中405就是通用区域号。    <br />&#160;&#160;&#160;&#160;&#160; 另外也有部分是一些自制版本，比如modaco或者drizzy等，他们会在内部版本或者软件版本那儿把自己的大名写进去，比如modaco 3.0,大家可以去<a href="http://android.modaco.com/category/409/htc-hero-hero-modaco-com/">modaco的论坛</a>或者 <a href="http://forum.xda-developers.com/forumdisplay.php?f=508">xda的论坛</a> 或者 本论坛的<a href="http://www.androidin.net/bbs/viewthread.php?tid=35402&amp;highlight=flzyup">FLZYUP的rom</a>搜索最新的版本情况。</p>
<p>&#160;</p>
<h3><strong>2.2 刷rom之前我要做什么？</strong></h3>
<p> 
<p>如果选择官方RUU直接升级， 可以参考htc website.&#160; <a title="http://www.androidin.net/bbs/viewthread.php?tid=15867" href="http://www.androidin.net/bbs/viewthread.php?tid=15867">http://www.androidin.net/bbs/viewthread.php?tid=15867</a></p>
<p>&#160;</p>
<p>如果刷其他rom，你需要有recovery.img，recovery就是你用home键+开机键开机后能进入的一个界面，在这个界面你可以直接用sd卡上的zip的rom升级或者备份你的系统.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 老版本的recovery只有三个选项，无法备份系统，只能用update.zip这个文件名的文件升级，不能用任何文件名的zip文件升级。   <br />&#160;&#160;&#160; </p>
<h3>&#160;</h3>
<h3><font size="3">Step 1 ) root</font> </h3>
<p>什么是root？我需要它做什么？</p>
<p><strong></strong>    <br />root就是你手机的boss，它可以访问和修改你手机几乎所有的文件，这些东西可能是制作手机的人不愿意你修改和触碰的东西，因为他们有可能影响到手机的稳定. </p>
<p>&#160;</p>
<p>- 推荐刷带root权限的rom来实现</p>
<p>- 或者 通过asroot2.</p>
<p><a title="http://theunlockr.com/2009/11/07/how-to-root-your-cdma-htc-hero-sprint-verizon/comment-page-1/" href="http://theunlockr.com/2009/11/07/how-to-root-your-cdma-htc-hero-sprint-verizon/comment-page-1/">http://theunlockr.com/2009/11/07/how-to-root-your-cdma-htc-hero-sprint-verizon/comment-page-1/</a></p>
<p><a title="http://forum.xda-developers.com/showthread.php?t=583291" href="http://forum.xda-developers.com/showthread.php?t=583291">http://forum.xda-developers.com/showthread.php?t=583291</a>&#160;</p>
<h3>&#160;</h3>
<h3>step 2) recovery image installation</h3>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a title="http://forum.xda-developers.com/showthread.php?t=596879" href="http://forum.xda-developers.com/showthread.php?t=596879">http://forum.xda-developers.com/showthread.php?t=596879</a></p>
<p>&#160;</p>
<p>Approach 1)&#160; via fastboot + adb -&gt; In case you don&#8217;t have a custom recovery</p>
<blockquote><pre>adb shell reboot bootloader
fastboot boot recovery-RA-heroc-v1.5.2.img
adb shell mount /sdcard
adb push recovery-RA-heroc-v1.5.2.img /sdcard/recovery-RA-heroc-v1.5.2.img
adb shell flash_image recovery /sdcard/recovery-RA-heroc-v1.5.2.img
adb shell reboot</pre>
</blockquote>
<p>&#160;</p>
<p>Approach 2)</p>
<blockquote>
<pre>Copy recovery-RA-heroc-v1.5.2.img to the root of your sdcard
Boot into your current custom recovery (boot while holding HOME)
Connect your Hero via usb to your pc/mac/...
adb shell
$su (not required if you have root already)
#mount -a
#flash_image recovery /sdcard/recovery-RA-heroc-v1.5.2.img</pre>
</blockquote>
<p>&#160;</p>
<h4>step 3) flash a ROM&#160; that you like</h4>
<p>&#160;</p>
<p><strong></p>
<h3><strong>modaco为什么有那么多rom？什么意思？</strong></h3>
<p>CDMA : <a title="http://android.modaco.com/content/htc-hero-hero-modaco-com/295568/cdma-08-11-1-1-modaco-custom-rom-core-featuring-wavesecure/" href="http://android.modaco.com/content/htc-hero-hero-modaco-com/295568/cdma-08-11-1-1-modaco-custom-rom-core-featuring-wavesecure/">http://android.modaco.com/content/htc-hero-hero-modaco-com/295568/cdma-08-11-1-1-modaco-custom-rom-core-featuring-wavesecure/</a></p>
<p>GSM:&#160; <a title="http://android.modaco.com/content/htc-hero-hero-modaco-com/292018/gsm-02-12-3-0-modaco-custom-rom-core-chinese-with-tck-featuring-wavesecure/" href="http://android.modaco.com/content/htc-hero-hero-modaco-com/292018/gsm-02-12-3-0-modaco-custom-rom-core-chinese-with-tck-featuring-wavesecure/">http://android.modaco.com/content/htc-hero-hero-modaco-com/292018/gsm-02-12-3-0-modaco-custom-rom-core-chinese-with-tck-featuring-wavesecure/</a></p>
<p>
    </p>
<p>  <a href="http://www.romraid.com/paul/hero/3.0-update-hero-modacocustomrom-core-signed.zip">&#8216;Core&#8217;</a>: 这个是基本的rom</p>
<p><a href="http://content.modaco.net/hero/2.8-update-hero-modacocustomrom-core-chinese-signed.zip">&#8216;Core Chinese&#8217;</a>: 这个是加了中文支持的rom，可以直接调出中文</strong></p>
<p>
  <br /><a href="http://www.romraid.com/paul/hero/3.0-update-hero-modacocustomrom-enhanced-signed.zip">&#8216;Enhanced&#8217; add on pack</a>: 这个增加了三个软件的增强版（须先刷前两个rom），三个软件一个是名片扫描，论坛已有，一个是wap浏览器，用处不大，一个是flurk，已经被防火墙，国内用不了</p>
<p><a href="http://www.romraid.com/paul/3.0.0.40-update-wavesecure-signed.zip">&#8216;Wavesecure&#8217; add on pack</a>: 这个把手机保护软件wavesecure加到rom里，不能直接删除它，能更好的保护手机</p>
<p><a href="http://www.romraid.com/paul/hero/3.0-update-hero-modacocustomrom-bootsounds-signed.zip">&#8216;Boot Sounds&#8217; add on pack</a>: modaco的rom现在是无声启动的，刷入这个可以调出声音</p>
<p></p>
<p>首先刷最上面两个rom中任何一个，其他的自行添加，方法和刷rom一样。</p>
<p><font size="3"></font></p>
<h3>fresh rom</h3>
<p>i would recommend this rom</p>
<p><font size="3">- install fresh rom 1.0</font></p>
<p><a title="http://forum.xda-developers.com/showthread.php?t=584032" href="http://forum.xda-developers.com/showthread.php?t=584032">http://forum.xda-developers.com/showthread.php?t=584032</a></p>
<p>&#160;</p>
<h3>chapter 2.3. <strong>刷完的rom我想删除不要的软件可以吗？</strong></h3>
<p></p>
<p><strong></strong>&#160;&#160;&#160;&#160; 其实那些不用的软件很容易删除的，它们都放在system/app文件夹下，如果你有root权限，只要进去文件夹，打开读写，把不要的软件移动出来到就好了。比如，如果你不要youtube，就把system/app文件夹下的youtube.apk移动到sd卡上就好了，它就消失在你的所有程序里了。当然，有些文件放在system/lib下，你找到文件名相同的删除就好了。在adb shell，或terminal里，remount system的写权限，然后rm。</p>
<p><strong>root</strong> <strong>explorer</strong><strong>程序可大大的方便我们的工作，以往的许多敲命令才能实现的操作，通过<strong>root</strong> <strong>explorer</strong>，可以方便的实现。</strong></p>
<p>&#160;</p>
<h3>&#160;</h3>
<p>&#160;</p>
<p>&#160;</p>
<h2>chapter 3. APP2SD</h2>
<p><a title="http://www.androidin.net/bbs/viewthread.php?tid=821" href="http://www.androidin.net/bbs/viewthread.php?tid=821">http://www.androidin.net/bbs/viewthread.php?tid=821</a></p>
<p>&#160;</p>
<p>google手机的软件为了安全性和稳定性都是默认安装到手机内存里，但是手机内存有限，所以我们会做app2sd操作，来让我们安装的软件放到sd卡上，而google的android系统是基于linux的，所以sd卡上本身的fat格式是不会被识别的，所以我们要分区（第二分区）出来，格式成linux认识的ext2或3或4格式，在用链接命令，把这个分区映射成一个系统文件夹system/sd（大概这个意思），把所有的软件装到这个“文件夹”下，这就是app2sd的操作。</p>
<p>
  <br />app2sd的操作其实是牺牲了一部分软件的速度和稳定性来换取更多的手机内存安装更多的软件。另外，app2sd只是把软件放到了sd卡上，运行软件还是需要占用手机的内存的，所以，你装了软件之后，一般手机内存还是会减少一些。你如果安装的软件在70个以内，个人觉得没有必要，呵呵，如果很多游戏软件除外，此外，使用app2sd最大的好处就是，刷一个带app2sd的rom之后，以后升级这个rom（依然带app2sd）的时候，你的软件都会完整保存（个别除外，比如htc input chinese需要重新添加几个文件到system/lib下）。</p>
<p>&#160;</p>
<p>&#160;</p>
<p>1）apptosd發展到現時，很多ROM都是自動進行 APPTOSD 的。主要要求用家自行對SD進行分區操作。modaco的自制rom可以自动app2sd，但需要你自己先将你的sd卡分出一个ext的分区，并且是第二分区，也就是在你以后文件的分区后面，用读卡器操作比较好，可以无损分区。&#160;&#160; 分区之后再刷rom便可以自动app2sd，有朋友在刷完rom之后分区，重启后hero自动变成了app2sd。</p>
<p>
  <br />2）however, 我们可以手动的利用sdk中的adb工具實現apptosd</p>
<p>&#160;</p>
<blockquote>
<p>adb shell<br />
    <br />su</p>
<p>busybox df -h </p>
</blockquote>
<p><a href="http://sipdroid.files.wordpress.com/2009/12/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://sipdroid.files.wordpress.com/2009/12/image_thumb.png?w=640&#038;h=235" width="640" height="235" /></a> </p>
<p>如圖:圖中為我機子的8g卡。留意第十一行 </p>
<p>416.8M&#160;&#160;&#160; 11.0M&#160;&#160;&#160; 385.0M&#160;&#160;&#160; 3%&#160;&#160; /system/sd&#160;&#160;&#160;&#160; </p>
<p>這是我卡中的一個416.8m的EXT2分區。如果你也有這一項。那你可以完成接下來的工作了。</p>
<p>&#160;</p>
<blockquote>
<p>mkdir&#160; /system/sd/app&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />cp -a /data/app /system/sd </p>
<p>rm -r /data/app</p>
<p>ln -s /system/sd/app /data/app</p>
<p>reboot </p>
<p></p>
</blockquote>
<p>如何知道成功沒有:在重啟後裝入一個軟件。<br />
  </p>
<p>利用adb工具輸入以下指令 :&#160;&#160; adb shell ls /system/sd/app/<br />
  <br />如果看到你剛裝入的軟件那你就ok啦!!! </p>
<p>&#160;</p>
<p>以後刷機。只要重新连接，不需要再装软件了。<br />
  </p>
<blockquote>
<p>adb shell<br />
    <br />su </p>
<p>busybox df -h </p>
<p>cd /data </p>
<p>cp -a app /system/sd </p>
<p>rm -r app </p>
<p>ln -s /system/sd/app /data/app </p>
<p>reboot</p>
</blockquote>
<p>
  <br />裝在sd卡的app就能回覆,不用重裝软件了.</p>
<p>&#160;</p>
<h2>&#160;</h2>
<h2>chapter 4. Misc</h2>
<p><font size="3"></font></p>
<h6><font size="3">- How to push a file?</font></h6>
<blockquote>
<pre>adb push recovery-RA-heroc-v1.5.2.img /sdcard</pre>
</blockquote>
<h6><font size="3">- How to enter recovery mode?</font></h6>
<blockquote>
<p>approach 1: </p>
<ul>
<li>adb shell
<pre>reboot recovery</pre>
</li>
</ul>
<pre>approach 2:</pre>
<ul>
<li>powering off the phone and holding Home while you power it on. </li>
</ul>
</blockquote>
<pre>&#160;</pre>
<h6><font size="3">- Mount system in read / write mode</font></h6>
<p><a title="http://karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/" href="http://karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/">http://karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/</a></p>
<p>1. Identifying the /system partition device file:</p>
<blockquote>
<p>C:\android-sdk-windows-1.1_r1\tools&gt;adb shell</p>
<p>$ su</p>
<p># mount<br />
    <br />rootfs / rootfs ro 0 0</p>
<p>tmpfs /dev tmpfs rw,mode=755 0 0</p>
<p>devpts /dev/pts devpts rw,mode=600 0 0</p>
<p>proc /proc proc rw 0 0</p>
<p>sysfs /sys sysfs rw 0 0</p>
<p>tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0</p>
<p><strong>/dev/block/mtdblock3 /system yaffs2 ro 0 0</strong></p>
<p>/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0</p>
<p>/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0</p>
<p>/dev/block/mmcblk0p1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0</p>
</blockquote>
<p><strong>note : /dev/block/mtdblock3 </strong>is the /system partition device file.</p>
<p>2. Remounting the /system in read-write mode:</p>
<blockquote>
<p># mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system</p>
</blockquote>
<p>3. If necessary set read-write permission to any directory under /system. Don’t forget to revert back once you get what you are intended to do.</p>
<blockquote>
<p># chmod 777 /system/fonts</p>
</blockquote>
<p>4. Exit the hacker session</p>
<blockquote>
<p># exit</p>
<p>$ exit</p>
</blockquote>
<pre>&#160;</pre>
<h6><font size="3"> &#8211; Mount /data </font></h6>
<blockquote>
<pre><code>adb shell</code></pre>
<pre><code>mount -o rw /dev/block/mtdblock5 /data</code></pre>
</blockquote>
<p>&#160;</p>
<h6><font size="3">- How to update a file ?</font></h6>
<p>appoach 1 : edit by vi in phone;</p>
<p>approach 2 :&#160; adb pull/push</p>
<blockquote>
<p><code>adb pull /data/data/com.htc.android.htcime/shared_prefs/com.htc.android.htcime_preferences.xml . <strong>(remember the dot!)</strong></p>
<p></code></p>
</blockquote>
<p>Save the file and push it back to the phone and reboot.</p>
<blockquote>
<p><code>adb push com.htc.android.htcime_preferences.xml /data/data/com.htc.android.htcime/shared_prefs/com.htc.android.htcime_preferences.xml</code></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=13&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2009/12/27/htc-hero-cdma-sprint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>

		<media:content url="http://sipdroid.files.wordpress.com/2009/12/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SRV and NAPTR</title>
		<link>http://sipdroid.wordpress.com/2009/11/28/srv-and-naptr/</link>
		<comments>http://sipdroid.wordpress.com/2009/11/28/srv-and-naptr/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 06:40:28 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[sip]]></category>
		<category><![CDATA[SRV]]></category>

		<guid isPermaLink="false">http://sipdroid.wordpress.com/2009/11/28/srv-and-naptr/</guid>
		<description><![CDATA[Sample SRV and NAPTR bigu.edu IN SOA ns.bigu.edu. root.bigu.edu. ( 2003032001 10800 3600 604800 86400 ) bigu.edu. 43200 IN NS ns.bigu.edu. ; ns.bigu.edu. 43200 IN A 10.0.0.20 sipserver1.bigu.edu. 43200 IN A 10.0.0.21 sipserver2.bigu.edu. 43200 IN A 10.0.0.22 ; _sip._udp.bigu.edu. 43200 IN SRV 0 0 5060 sipserver1.bigu.edu. _sip._udp.bigu.edu. 43200 IN SRV 1 0 5060 sipserver2.bigu.edu. _sip._tcp.bigu.edu. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=5&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3></h3>
<h3>Sample SRV and NAPTR</h3>
<pre></pre>
<pre>bigu.edu IN SOA ns.bigu.edu. root.bigu.edu. (
          2003032001
          10800
          3600
          604800
          86400 )

bigu.edu.             43200 IN NS      ns.bigu.edu.
;
ns.bigu.edu.          43200 IN A       10.0.0.20
sipserver1.bigu.edu.  43200 IN A       10.0.0.21
sipserver2.bigu.edu.  43200 IN A       10.0.0.22
;
_sip._udp.bigu.edu.   43200 IN SRV 0 0 5060  sipserver1.bigu.edu.
_sip._udp.bigu.edu.   43200 IN SRV 1 0 5060  sipserver2.bigu.edu.
_sip._tcp.bigu.edu.   43200 IN SRV 0 4 5060  sipserver1.bigu.edu.
_sip._tcp.bigu.edu.   43200 IN SRV 0 2 5060  sipserver2.bigu.edu.
_sips._tcp.bigu.edu.  43200 IN SRV 0 0 5060  sipserver1.bigu.edu.
_sips._tcp.bigu.edu.  43200 IN SRV 0 0 5060  sipserver2.bigu.edu.
;
bigu.edu. IN NAPTR 0 0 "s" "SIPS+D2T" "" _sips._tcp.bigu.edu.
bigu.edu. IN NAPTR 1 0 "s" "SIP+D2T"  "" _sip._tcp.bigu.edu.
bigu.edu. IN NAPTR 2 0 "s" "SIP+D2U"  "" _sip._udp.bigu.edu.
</pre>
<p>NAPTR records are not necessary but if they are present RFC3263 mandates at least three records. It further states that they should be listed in this precedence: 1) SIPS+D2T, 2) SIP+D2T and SIP+D2U. In common English this means that TLS over TCP should be used if the calling party has the capability. Failing that TCP should be used and UDP is permitted only as a last resort to keep the call from failing.</p>
<p>In practice BIND implementations are often smart enough to <strong>return the SRV records in the target field and the A records to which they point among the glue data so that additional DNS lookups are not required. (how is the return looked like?, I need a sample)</strong></p>
<p>In terms of call flow then a SIP User Agent Client first sends a DNS NAPTR request to the domain specified in the Request-URI. If valid records are returned an appropriate transport is identified. Depending on the richness of the glue data in the first request, a second request is sent to the value in the substitution field.</p>
<p>If no NAPTR records are returned, a DNS SRV request is sent based on the transport preferred by the UAC. IF valid records are returned, the request is sent to the preferred proxy.</p>
<p>As a last resort if no SRV records are found a DNS A record request is sent for the domain in the Request-URI. In the case of <tt>sip:alice.smith@bigu.edu</tt> the request would be for the IP address of bigu.edu. If a valid IP address is returned, the request is sent to that address using UDP.</p>
<p>The best practice for sites wanting just to get started may be to implement SRV records but not NAPTR records. Those wishing complete detailed information on service location are referred to RFCs 2782, 3263 and 3403.</p>
<h3>Format of SRV</h3>
<pre>"_Service._Proto.Name TTL Class SRV Priority Weight Port Target"
</pre>
<h3>Format of NAPTR</h3>
<pre>"domain-name TTL Class NAPTR order preference flags service regexp target"
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=5&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2009/11/28/srv-and-naptr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://sipdroid.wordpress.com/2009/11/28/hello-world/</link>
		<comments>http://sipdroid.wordpress.com/2009/11/28/hello-world/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 06:24:50 +0000</pubDate>
		<dc:creator>sipdroid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=1&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="http://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sipdroid.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sipdroid.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sipdroid.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sipdroid.wordpress.com&amp;blog=10710251&amp;post=1&amp;subd=sipdroid&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sipdroid.wordpress.com/2009/11/28/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/64444f3ee87dc16bdd5b61898f3e7c40?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sipdroid</media:title>
		</media:content>
	</item>
	</channel>
</rss>
