<?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/"
	>

<channel>
	<title>thebottle</title>
	<atom:link href="http://thebottle.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://thebottle.org/blog</link>
	<description>Tutorials, stories, and ramblings...</description>
	<lastBuildDate>Fri, 09 Apr 2010 19:22:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Caller ID on XBMC TV</title>
		<link>http://thebottle.org/blog/computers/caller-id-on-xbmc-tv/</link>
		<comments>http://thebottle.org/blog/computers/caller-id-on-xbmc-tv/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 16:53:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[caller]]></category>
		<category><![CDATA[caller id]]></category>
		<category><![CDATA[cid]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[xbmc]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=243</guid>
		<description><![CDATA[There is a very quick and easy way to get caller ID working on  your TV through XBMC by using XBMC&#8217;s http commands. In order for this to work you will need to have the web interface enabled in XBMC.

This is not a full featured script like the project here  which is under [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very quick and easy way to get caller ID working on  your TV through XBMC by using XBMC&#8217;s http commands. In order for this to work you will need to have the web interface enabled in XBMC.</p>
<p><span id="more-243"></span></p>
<p>This is not a full featured script like <a href="http://code.google.com/p/xbmc-pbx-addon/">the project here</a>  which is under development. This will just display incoming calls on your TV and pause the movie or music or whatever is playing.</p>
<p>I have Elastix but this will work with any Asterisk distribution. In Elastix you will need to create a <em>Misc Destination</em>. I named my <em>Misc. Destination</em> &#8220;XBMC&#8221; and then gave it the number *9262 which is the numerical representation of the letters XBMC on a phone dial-pad. It doesn&#8217;t matter what number you choose, but this provides coherence. </p>
<p>Once you have it created then you will need to change your inbound route to go to the XBMC destination. So now when a call comes in instead of going to your ring group it will go to this XBMC destination and now we have to tell Asterisk what to do when it gets there. In Elastix you will need to edit <em>extensions_custom.conf</em></p>
<p>The following is the code that I used in <em>extensions_custom.conf</em>:</p>
<p><code>[xbmc-cid]<br />
exten => *9262,1,Macro(user-callerid)<br />
exten => *9262,2,TrySystem(wget -b -O /dev/null -o /dev/null "http://192.168.1.100/xbmcCmds/xbmcHttp?command=ExecBuiltIn&#038;parameter=XBMC.Notification(Incoming%20Call%2C${CALLERID(name)}%20%3C${CALLERID(number)}%3E%2C15000)")<br />
exten => *9262,3,TrySystem(wget -b -O /dev/null -o /dev/null "http://192.168.1.100/xbmcCmds/xbmcHttp?command=Pause")<br />
exten => *9262,4,Goto(ext-group,600,1)<br />
</code></p>
<p>The first line uses your caller ID lookup method to get the ID. The second line uses wget to execute the command to pop-up the notification in XBMC and it passes the CID name and CID number variables to it. In this command make sure you set the correct IP address for XBMC. The thrid line sends a command to pause XBMC. The fourth line moves onto my ring group 600 which rings all the phones in my house. Make sure to include this context in [from-internal-custom] and then reload the dial plan and you are done.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/computers/caller-id-on-xbmc-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caller ID Spoof (On Demand)</title>
		<link>http://thebottle.org/blog/voip/caller-id-spoof-on-demand/</link>
		<comments>http://thebottle.org/blog/voip/caller-id-spoof-on-demand/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 23:01:58 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[VoIP]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[caller id]]></category>
		<category><![CDATA[caller id spoof]]></category>
		<category><![CDATA[change caller id]]></category>
		<category><![CDATA[change cid]]></category>
		<category><![CDATA[cid spoof]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=232</guid>
		<description><![CDATA[Using Asterisk and a VoIP provider you can set your caller ID to anything. I leave mine set to my real number, but when I had a cell phone I would occasionally change it to my cell number. The most common use for this type of feature is if you have a business and you [...]]]></description>
			<content:encoded><![CDATA[<p>Using Asterisk and a VoIP provider you can set your caller ID to anything. I leave mine set to my real number, but when I had a cell phone I would occasionally change it to my cell number. The most common use for this type of feature is if you have a business and you do some of your work from home. Instead of making that occasional business call using your home phone number it might be more professional to change it to your business number before making the call. Obviously this feature also has great potential for abuse, but I figure that anyone who takes the time to setup their own PBX should be mature enough not to abuse caller ID and if not they would be able to do it without any help from this article anyway.</p>
<p><span id="more-232"></span></p>
<p>Edit file: extensions_custom.conf</p>
<p><code>[from-internal-custom]<br />
include => spoof</code></p>
<p><code>[spoof]<br />
exten => _*555NXXNXXXXXX,1,Set(CALLERID(all)=Private <1${EXTEN:4}>)<br />
exten => _*555NXXNXXXXXX,2,Answer<br />
exten => _*555NXXNXXXXXX,3,Playback(pls-entr-num-uwish2-call&#038;beep)<br />
exten => _*555NXXNXXXXXX,4,WaitExten(10)<br />
exten => _*555NXXNXXXXXX,5,Dial(IAX2/callwithus:${EXTEN})<br />
exten => _*555NXXNXXXXXX,6,Hangup()</code></p>
<p>The way it works is that you dial *555# where # is the 10 digit number that you want displayed as your caller ID. </p>
<p>The first command sets the caller ID name to private which usually isn&#8217;t forwarded and sets the caller ID number to the number that you dialed by removing the first 4 characters (*555) and  prepending a 1. The second command just answers which is followed by the third command which plays &#8220;Please enter the number you wish to call&#8221; and then beeps. The fourth command waits for you to put in a number and then the fifth command dials it.</p>
<p>Most people are only going to need to change your caller ID to one other number so this would be a little faster in this regard. </p>
<p><code>[spoof]<br />
exten => _*555,1,Set(CALLERID(all)=Business Name<####>)<br />
exten => _*555,2,Answer<br />
exten => _*555,3,Playback(pls-entr-num-uwish2-call&#038;beep)<br />
exten => _*555,4,WaitExten(10)<br />
exten => _*555,5,Dial(IAX2/callwithus:${EXTEN})<br />
exten => _*555,6,Hangup()</code></p>
<p>Whenever you would dial *555 then it sets caller ID to &#8220;Business Name&#8221; and your business number, represented by #### in the command. The rest of the commands are the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/voip/caller-id-spoof-on-demand/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Public Key Access to OpenWRT</title>
		<link>http://thebottle.org/blog/computers/public-key-access-to-openwrt/</link>
		<comments>http://thebottle.org/blog/computers/public-key-access-to-openwrt/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:11:10 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[allow wan]]></category>
		<category><![CDATA[configure dropbear]]></category>
		<category><![CDATA[dropbear]]></category>
		<category><![CDATA[dropbear public]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[private key]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[puttygen]]></category>
		<category><![CDATA[wan]]></category>
		<category><![CDATA[wan port]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=217</guid>
		<description><![CDATA[I allow SSH and only SSH into my router via WAN. I have the web interface and all other ports that don&#8217;t have specific forwards blocked for obvious reasons. When you install OpenWRT it automatically blocks everything from the WAN side, so this doesn&#8217;t require any configuration. Although if you are like me and you [...]]]></description>
			<content:encoded><![CDATA[<p>I allow SSH and only SSH into my router via WAN. I have the web interface and all other ports that don&#8217;t have specific forwards blocked for obvious reasons. When you install OpenWRT it automatically blocks everything from the WAN side, so this doesn&#8217;t require any configuration. Although if you are like me and you require access to your network from outside then you will need to make some changes.</p>
<p>You don&#8217;t want to have password authentication on the WAN side or it is possible to get compromised by a brute force attack. The solution is to implement public key access.</p>
<p><span id="more-217"></span><br />
First open <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">PuTTY Key Generator</a> and from the top menu select Key > SSH2 RSA key. Then click on the <i>Generate</i> button and move your mouse around the window until it gets enough random data and creates your key. Now click on the <i>Save private key</i> button and save your key somewhere that you won&#8217;t lose it. If you want to password protect your key then enter a password in the password boxes. You can create one with a password and one without password if you want. Copy the text on the top where it says <i>Public key for pasting into OpenSSH authorized_keys file</i>. It should look something like this:</p>
<p><code>ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqnogKGS3oHTp4nDfLzdwL4NlbZR3i5UXvk+oE9T<br />
3oiycPk3r+Nj4WCWjjNnwUN/561S0G891EQNv8I3BkN1wox7ImM0SV33rdKx1md1Ay<br />
txfs0rcymT0DS/+3AbyskzoZHmZfs3PWforj0yoEhT9SVdkwPPOq+935aM8cb33tE0=<br />
rsa-key-20090701</code></p>
<p>Now ssh into your router and you will be adding that to the authorized_keys file with the following command:</p>
<p><code>root@router:~# echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqnogKGS3oHTp4nDfLzdwL4NlbZR3i5UXvk+oE9T<br />
3oiycPk3r+Nj4WCWjjNnwUN/561S0G891EQNv8I3BkN1wox7ImM0SV33rdKx1md1Ay<br />
txfs0rcymT0DS/+3AbyskzoZHmZfs3PWforj0yoEhT9SVdkwPPOq+935aM8cb33tE0=<br />
rsa-key-20090701 >> /etc/dropbear/authorized_keys</code></p>
<p>You will be pasting your own public key that you copied instead of the one that is in the example.</p>
<p>We still have a few more options that need to be changed. You don&#8217;t want to leave dropbear running on the default port or it is more likely to be discovered and attacked.</p>
<p><code>root@router:~# vi /etc/config/dropbear</code></p>
<p>Change PasswordAuth = off and Port = 443. You can change the port to anything that you like, but you want to choose something that is not common. I like port 443 because it is the SSL port so when I am tunneling through my router from work my traffic looks natural. Also, port 443 is never going to be blocked. PasswordAuth off is just turning off the password authentication which we don&#8217;t want anymore because we are using keys.</p>
<p>We still need to open up the port that dropbear is running on to the WAN, because as I mentioned earlier OpenWRT has all inbound WAN ports closed. </p>
<p><code>root@router:~# vi /etc/config/firewall</code></p>
<p>You can do this by editing the firewall configuration file and adding:</p>
<p><code><br />
config 'rule' 'ssh'<br />
        option 'src' 'wan'<br />
        option 'proto' 'tcp'<br />
        option 'src_ip' ''<br />
        option 'dest_ip' ''<br />
        option 'dest_port' '443'<br />
        option 'target' 'ACCEPT'</code></p>
<p>Or you can do this in the web interface. I have X-WRT and I am not sure what web interface it uses, but for me it is under Network > Firewall > Incoming Ports.</p>
<p>Quick note&#8230; Some people mention that you should also run dropbear on a local port with password authentication turned on in case you lose your private key. This is not necessary if you have a web interface because you can always get into your web interface from LAN and edit the files to turn password authentication back on until you update the key file. But for those without a web interface you will want to do the following:</p>
<p><code>root@router:~# vi /etc/init.d/dropbear</code></p>
<p>You should see this line, or a line like it that starts dropbear.</p>
<p><code>/usr/sbin/dropbear $DROPBEAR_ARGS</code></p>
<p>Just add another line below it.</p>
<p><code>/usr/sbin/dropbear -p 22</code></p>
<p>Now you will also have password access from LAN on port 22.</p>
<p>After making all of these changes you will need to reboot or just run /etc/init.d/dropbear restart</p>
<p>In order to access it, open PuTTY and enter your IP and port. Then under Connection > Data for <i>Auto-login username</i> enter root. Under Connection > SSH > Auth click on <i>Browse</i> and select your private key. I recommend saving the session and then creating a shortcut to it. You can create shortcuts to putty sessions by running putty.exe @sesssion_name.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/computers/public-key-access-to-openwrt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SIP Scanning and VoIP Security</title>
		<link>http://thebottle.org/blog/voip/sip-scanning-and-voip-security/</link>
		<comments>http://thebottle.org/blog/voip/sip-scanning-and-voip-security/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 15:16:42 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[VoIP]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[elastix]]></category>
		<category><![CDATA[scan]]></category>
		<category><![CDATA[sip]]></category>
		<category><![CDATA[sip scanning]]></category>
		<category><![CDATA[sipscan]]></category>
		<category><![CDATA[voip security]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=207</guid>
		<description><![CDATA[A few months ago after I had setup my Asterisk box I started receiving strange calls from people in Colorado and started to check my call logs. I noticed that the night before someone had made calls from my box to many different numbers in succession. xxx-xxx-2401, xxx-xxx-2402, xxx-xxx-2403, etc.  I knew that my [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago after I had setup my Asterisk box I started receiving strange calls from people in Colorado and started to check my call logs. I noticed that the night before someone had made calls from my box to many different numbers in succession. xxx-xxx-2401, xxx-xxx-2402, xxx-xxx-2403, etc.  I knew that my box had been compromised.</p>
<p>I had set weak secrets for my extensions and they were able to brute the secret and start making calls from my machine. I immediately changed all the secrets and have not had a problem since, but this article will show you some tools that can be used to test your own box and some settings that should be changed in order to secure it.</p>
<p><span id="more-207"></span></p>
<p>The tool that I use to scan Asterisk boxes is <a href="http://code.google.com/p/sipvicious/" target="_blank">sipvicious</a>. You will need to have python installed in order to run the scripts. There are two scripts that I use in the sipvicious tool suite: svwar.py to enumerate extensions and svcrack.py to crack the extension&#8217;s secret.</p>
<p><code>python svwar.py -e 100-499,1000-2999 192.168.1.223</code></p>
<p>This would scan my Asterisk box and enumerate extensions 100-499 and 1000-2999. You can also input a dictionary file of extensions by using the -d switch. </p>
<p><code>| Extension | Authentication |<br />
| 200                       | reqauth        |</code></p>
<p>The return shows that I have extension 200 and it requires authentication. So now I could run svcrack.py to crack the secret.</p>
<p><code>python svcrack.py -u 200 -r 1-9999 192.168.1.223</code></p>
<p>This would try to login to extension 200 with secret 1 through 9999. svcrack.py can also be used with a dictionary using the -d switch.</p>
<p>Some useful .bat files that I created to make it quicker:<br />
<code>@echo off<br />
cd C:\(directory with sipviscous scripts)<br />
:input<br />
set SIP_IP=<br />
set /P SIP_IP=Enter IP Address: %=%<br />
if "%SIP_IP%"=="" goto input<br />
python svwar.py -e 100-499,1000-3999 %SIP_IP%<br />
pause</code></p>
<p><code>@echo off<br />
cd C:\(directory with sipviscous scripts)<br />
:sip_ip<br />
set SIP_IP=<br />
set /P SIP_IP=Enter IP Address: %=%<br />
if "%SIP_IP%"=="" goto sip_ip<br />
:sip_exten<br />
set SIP_EXTEN=<br />
set /P SIP_EXTEN=Enter Extension: %=%<br />
if "%SIP_EXTEN%"=="" goto sip_exten<br />
python svcrack.py -u %SIP_EXTEN% -r 0-9999 %SIP_IP%<br />
pause</code></p>
<p><strong>To secure my box I have done the following:</strong><br />
1. Long multi-character secrets.<br />
2. Added alwaysauthreject=yes to /etc/asterisk/sip_custom.conf<br />
3. Blocked WAN ports to Asterisk on network firewall (except port 5060).<br />
4. Changed default passwords on everything that comes with Elastix.<br />
5. Installed <a href="http://www.voip-info.org/wiki/view/Fail2Ban+(with+iptables)+And+Asterisk" target="_blank">Fail2Ban</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/voip/sip-scanning-and-voip-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elastix Faxing Send Receive</title>
		<link>http://thebottle.org/blog/voip/voip-faxing-elastix-send-receive/</link>
		<comments>http://thebottle.org/blog/voip/voip-faxing-elastix-send-receive/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 15:27:57 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[VoIP]]></category>
		<category><![CDATA[disable fax report]]></category>
		<category><![CDATA[disable faxmaster report]]></category>
		<category><![CDATA[disable hylafax report]]></category>
		<category><![CDATA[elastix]]></category>
		<category><![CDATA[elastix email]]></category>
		<category><![CDATA[elastix fax]]></category>
		<category><![CDATA[elastix faxing]]></category>
		<category><![CDATA[elastix nvfax]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[nvfax]]></category>
		<category><![CDATA[receive fax]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[send fax]]></category>
		<category><![CDATA[voip fax]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=161</guid>
		<description><![CDATA[This article will walk you through setting up faxing on a voice line within Elastix PBX.
The first thing that you will want to do is create a IAX2 extension. After that is done go to your Fax tab and select New Virtual Fax. The extension and secret should be the same of the IAX2 extension [...]]]></description>
			<content:encoded><![CDATA[<p>This article will walk you through setting up faxing on a voice line within Elastix PBX.</p>
<p>The first thing that you will want to do is create a IAX2 extension. After that is done go to your <em>Fax</em> tab and select <em>New Virtual Fax</em>. The extension and secret should be the same of the IAX2 extension that you created. Fill in the rest of the required fields.</p>
<p><span id="more-161"></span></p>
<p>Once that is done go to <em>General Settings</em> and set the fax extension to the IAX2 extension that you created. Enter the email addresses here as well. Next go to your inbound route and for <em>Fax Extension</em> select <em>FreePBX default</em>, for <em>Fax Detection Type</em> select <em>NVFax</em>, and for <em>Pause After Answer</em> enter 5.</p>
<p>It is almost setup, but we still need to install NVFax.</p>
<p>You can download the files here:</p>
<p><a href="http://www.elastix.org/images/fbfiles/files/NV_Apps_elastix_0-f1b156f398276beb9feb5856e88edc88.zip" target="_blank">http://www.elastix.org/images/fbfiles/files/NV_Apps_elastix_0-f1b156f398276beb9feb5856e88edc88.zip</a></p>
<p>The instructions are in the archive, but basically you are just going to SCP three .so files over to your Elastix box. Once that is done you should be able to receive faxes. Check the <em>Fax Visor</em> under the <em>Fax</em> tab because the email notification won&#8217;t work unless you set that up before now. For instructions on setting up email please refer to the Elastix without Tears guide section 20.1 ENABLING EMAIL NOTIFICATION OF VOICEMAIL. If you don&#8217;t want the daily usage reports to be sent to you then you will need to edit the cronjob. Open /etc/cron.daily/hylafax in Vi or Nano. You need to comment out the section where the output of faxcron gets mailed.</p>
<p>Change this:<br />
<code>-tmp 7 | mail -s "HylaFAX Usage Report" faxmaster</code><br />
To This:<br />
<code>-tmp 7 # | mail -s "HylaFAX Usage Report" faxmaster</code></p>
<p>The script will still run to delete the old and temporary data, but it will no longer mail the reports to you.</p>
<p>Sending faxes is done using either JHylaFAX or Winprint Hylafax. Both applications have enough documentation to get them connected to Elastix so I won&#8217;t go into detail. I use Winprint Hylafax and the only thing it requires is the Elastix IP, extension, and secret.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/voip/voip-faxing-elastix-send-receive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert ADPCM WAV to MP3</title>
		<link>http://thebottle.org/blog/computers/convert-adpcm-wav-to-mp3/</link>
		<comments>http://thebottle.org/blog/computers/convert-adpcm-wav-to-mp3/#comments</comments>
		<pubDate>Tue, 12 May 2009 15:05:47 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[ad-pcm]]></category>
		<category><![CDATA[adpcm]]></category>
		<category><![CDATA[adpcm to mp3]]></category>
		<category><![CDATA[adpcm wav]]></category>
		<category><![CDATA[convert adpcm]]></category>
		<category><![CDATA[convert adpcm wav]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=151</guid>
		<description><![CDATA[
If your recording device records ADPCM .WAVs then you will know that you can&#8217;t open these files in sound editors like Audacity. If you search online you will find that most conversion applications like CDex don&#8217;t support this format either. I couldn&#8217;t find any free or open source program to convert this type of file [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot3.jpeg"><img class="aligncenter size-full wp-image-152" title="adpcm properties" src="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot3.jpeg" alt="adpcm properties" width="276" height="159" /></a></p>
<p>If your recording device records ADPCM .WAVs then you will know that you can&#8217;t open these files in sound editors like Audacity. If you search online you will find that most conversion applications like CDex don&#8217;t support this format either. I couldn&#8217;t find any free or open source program to convert this type of file until I opened it in Windows Sound Recorder. Windows Sound Recorder which comes with Windows is able to convert ADPCM to MP3. First open the file and then choose File &gt; Properties.</p>
<p><span id="more-151"></span></p>
<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot6.jpeg"><img class="aligncenter size-medium wp-image-154" title="mpeg layer 3" src="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot6-300x170.jpg" alt="mpeg layer 3" width="300" height="170" /></a></p>
<p>Click on the Convert button and then you will see this screen where you can choose your new format.</p>
<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot7.jpeg"><img class="aligncenter size-medium wp-image-155" title="rate" src="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot7-300x170.jpg" alt="rate" width="300" height="170" /></a></p>
<p>I set the attributes to match those of the original. If you right-click on the original and select Properties then you can see what attributes it has, my recorder records 8000Hz, 32kbps, Mono.</p>
<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot8.jpeg"><img class="aligncenter size-full wp-image-156" title="save as" src="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot8.jpeg" alt="save as" width="276" height="159" /></a></p>
<p>Now you just save the file with an .mp3 extension and you are now able to open it in your favorite sound editor.</p>
<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot9.jpeg"><img class="aligncenter size-medium wp-image-157" title="save" src="http://thebottle.org/blog/wp-content/uploads/2009/05/screenshot9-300x233.jpg" alt="save" width="300" height="233" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/computers/convert-adpcm-wav-to-mp3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nmap Scanning Routine</title>
		<link>http://thebottle.org/blog/computers/my-scanning-routine/</link>
		<comments>http://thebottle.org/blog/computers/my-scanning-routine/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 15:01:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[5060]]></category>
		<category><![CDATA[autoit]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[hosts.txt]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[scan]]></category>
		<category><![CDATA[set path]]></category>
		<category><![CDATA[sip]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[utorrent]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=135</guid>
		<description><![CDATA[
I am always looking for open smtp, ssh, or sip servers. This is the routine that I have set up to scan for these open hosts. In order to set this up for yourself you will need to have Nmap and AutoIt installed. If you are using the non-install version of Nmap then you will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/04/screenshot1.jpeg"><img src="http://thebottle.org/blog/wp-content/uploads/2009/04/screenshot1-300x243.jpg" alt="Scan Folder" title="Scan Folder" width="300" height="243" class="aligncenter size-medium wp-image-136" /></a></p>
<p>I am always looking for open smtp, ssh, or sip servers. This is the routine that I have set up to scan for these open hosts. In order to set this up for yourself you will need to have Nmap and AutoIt installed. If you are using the non-install version of Nmap then you will need to add the Nmap directory to PATH. You can either do that in the .bat file that I use or by right-clicking My Computer and selecting properties. Go to the advanced tab and click the environmental variables button. Add the Nmap directory to PATH.<br />
<span id="more-135"></span><br />
Here is my .bat file to run the scan.</p>
<p><code>@echo off<br />
title nmap scan<br />
nmap -iL hosts.txt -sS -sV --version-all -vv --open -p 80,5060 -oX results.xml --stylesheet http://www.insecure.org/nmap/data/nmap.xsl<br />
start results.xml</code></p>
<p>The first two lines just make the command prompt look pretty by removing the output and giving the window a title. The third line actually runs the scan. It uses the file hosts.txt to import the IP addresses from, it uses the TCP SYN technique to scan, it is checking service information for each port, verbose mode is turned on, it will only show open ports, it is scanning ports 25 (smtp), 80 (http), and 5060 (sip). It is outputting the results to results.xml, and it is using the stylesheet from the nmap website to make the xml file readable. The last line just opens the xml file.</p>
<p>If you don&#8217;t add the Nmap directory to the environmental variables then in the .bat file before running Nmap add this line where C:\program files\nmap would be the Nmap directory.</p>
<p><code>set path=%path%;C:\program files\nmap</code></p>
<p>How do I populate the hosts.txt file? I like to get a bunch of random hosts, and the best way that I have found to do that is through P2P networks. In uTorrent I just go to the Peers tab, right-click, and choose Copy Peer List.</p>
<p><a href="http://thebottle.org/blog/wp-content/uploads/2009/04/screenshot2.jpeg"><img src="http://thebottle.org/blog/wp-content/uploads/2009/04/screenshot2-300x214.jpg" alt="Copy Peer List" title="Copy Peer List" width="300" height="214" class="aligncenter size-medium wp-image-137" /></a></p>
<p>This is going to give you a nice random selection of potentially open/vulnerable hosts. I then paste this list into the hosts.txt file. The only problem is that the peer list also has the port numbers at the end of the IP address in this fashion 192.168.1.1:5454. Nmap only wants the IP address so we have to get rid of the port number. To do this I set up an AutoIt script.</p>
<p><code>$input = InputBox("Remove Ports", "Filename:")</code></p>
<p><code>If $input = "" then Exit</code></p>
<p><code>$open = FileOpen($input, 0)<br />
$write = FileOpen("peers -ports.txt", 2)</code></p>
<p><code>while 1<br />
$line = FileReadLine($open)<br />
If @error = -1 Then ExitLoop<br />
$array = StringSplit($line, ":")<br />
FileWriteLine($write, $array[1])<br />
wend</code></p>
<p><code>FileClose($open)<br />
FileClose($write)<br />
FileDelete(â€hosts.txtâ€)<br />
FileCopy(â€peers -ports.txtâ€, â€œhosts.txtâ€)<br />
FileDelete(â€peers -ports.txtâ€)<br />
MsgBox( 1, â€œâ€, â€œDone.â€)</code></p>
<p>If your host file doesnâ€™t always change then it would be faster just to set $input to the filename of the script instead of using an input box. <em>Note: On Windows Vista the above script wouldn&#8217;t work unless I changed the double quotes to single quotes.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/computers/my-scanning-routine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elastix Block Anonymous &#8211; Restricted Calls</title>
		<link>http://thebottle.org/blog/voip/elastix-block-anonymous-restricted-calls/</link>
		<comments>http://thebottle.org/blog/voip/elastix-block-anonymous-restricted-calls/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 17:14:45 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[VoIP]]></category>
		<category><![CDATA[1restricted]]></category>
		<category><![CDATA[anonymous]]></category>
		<category><![CDATA[black private]]></category>
		<category><![CDATA[blacklist]]></category>
		<category><![CDATA[block restricted]]></category>
		<category><![CDATA[block restricted calls]]></category>
		<category><![CDATA[call block]]></category>
		<category><![CDATA[elastix]]></category>
		<category><![CDATA[elastix blacklist]]></category>
		<category><![CDATA[restricted]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=123</guid>
		<description><![CDATA[So I was trying to block a certain someone from calling me and after I set up the blacklist they started  to *67 my number and it would still ring through as Restricted. This was not acceptable and I could not figure out how to block this for the longest time until I came [...]]]></description>
			<content:encoded><![CDATA[<p>So I was trying to block a certain someone from calling me and after I set up the blacklist they started  to *67 my number and it would still ring through as Restricted. This was not acceptable and I could not figure out how to block this for the longest time until I came across this <a rel="nofollow" href="http://www.freepbx.org/trac/attachment/ticket/3053/cidfix.patch">patch</a> for Elastix. This post will show you how to set up the blacklist in Elastix as well as block Anonymous, Restricted, and Private type calls.<span id="more-123"></span></p>
<p align="center">
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-4753073465217599";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-04-14: http://thebottle.org/blog
google_ad_channel = "6673098589";
google_color_border = "efefef";
google_color_bg = "efefef";
google_color_link = "666666";
google_color_text = "000000";
google_color_url = "666666";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p><strong>Blacklist</strong><br />
Blacklist is not a built-in feature in the Elastix build that I am using. In order to install and use Blacklist, you must click on the <em>PBX</em> tab on the top and then click on <em>Unembedded FreePBX</em>. The default login is admin:admin. Once you are logged in then go to the <em>Tools</em> tab and then under that <em>Module Admin</em>. Find <em>Blacklist</em>, click on it, check <em>Install</em>, and on the bottom click on the <em>Process</em> button. This will install Blacklist and you can block any numbers that you want by accessing it through Unembedded FreePBX.</p>
<p><strong>Anonymous Call Block</strong><br />
If you want to completely block anonymous, restricted, private, unidentified, etc. calls then you will want to do the following.</p>
<p>SSH into your Elastix box.<br />
<code>[root@elastix ~]# locate page.did.php</code><br />
<code>/var/www/html/admin/modules/core/page.did.php</code></p>
<p>We just found where the page.did.php file is located, now we want to edit the lines outlined in this <a rel="nofollow" href="http://www.freepbx.org/trac/attachment/ticket/3053/cidfix.patch">patch</a>. I like to use nano when I need to search through a file, so if you don&#8217;t have it installed yet then type:<br />
<code>[root@elastix ~]# </code><code>yum -install nano</code></p>
<p>To edit the file type:<br />
<code>[root@elastix ~]# nano -w /var/www/html/admin/modules/core/page.did.php</code></p>
<p>We will basically be finding this line:<br />
<code>if (!isDialpattern(theForm.cidnum.value))</code></p>
<p>deleting the last close-parenthesis and adding:<br />
<code>&amp;&amp; theForm.cidnum.value != "Private" &amp;&amp; theForm.cidnum.value != "Blocked" &amp;&amp; theForm.cidnum.value != "Unknown" &amp;&amp; theForm.cidnum.value != "Restricted" &amp;&amp; theForm.cidnum.value != "Unavailable")</code></p>
<p>Save the file, you are now done editing files. I know the patch says that the functions.inc.php file needs to be edited, but I didn&#8217;t touch that file and everything works fine for me.</p>
<p>For the next step go back into the Elastix WebUI and go to the <em>PBX</em> tab and then to <em>Inbound Call Routes</em>.</p>
<p>For the <em>Caller ID Number</em> type in Restricted or Unknown or Private or Blocked or Unavailable. It is case sensitive so make sure you have the proper case. Then you can set the destination to <em>Terminate Call</em> and it will hangup when that type of call comes in, but I am sure that you would rather have it go to a message that says you do not accept blocked calls. If you want to do that then do the following.</p>
<p>Go to <em>System Recordings</em> and go to <em>Built-in Recordings</em> and select <em>privacy-unident</em>.  You will now see this recording listed on the right-side menu. Click on it and change the name to &#8220;Unidentified&#8221;. Save and apply. Then from the second drop down select <em>privacy-thankyou</em>. Save and apply. Then from the third drop down select <em>goodbye</em>. Save and apply. The &#8220;Unidentified&#8221; message will now be, &#8220;The party you are trying to reach does not accept unidentified calls, thank you, goodbye.&#8221;</p>
<p>Go to <em>Announcements</em> and name it &#8220;Restricted&#8221;, select the &#8220;Unidentified&#8221; recording, and choose <em>Terminate Call</em>. Save and Apply.</p>
<p>Now go back and edit your Restricted, Private, Unknown, etc routes and instead of having the destination be set to terminate the call, have it set to play the &#8220;Restricted&#8221; announcement.</p>
<p>UPDATE:<br />
I recently upgraded to version 1.5.2 and this version includes the ability to enter &#8220;Blocked,&#8221; &#8220;Restricted,&#8221; &#8220;Anonymous,&#8221; etc. but my calls are sent to me as &#8220;1Restricted&#8221; so I still had to edit a couple of files to make it accept &#8220;1Restricted.&#8221;</p>
<p><code>[root@elastix ~]# nano -w /var/www/html/admin/modules/core/page.did.php</code></p>
<p>Search for restrict and where you see this line:<br />
<code>if (!isDialpattern(mycid) &#038;&#038; mycid.substring(0,4) != "priv" &#038;&#038; mycid.substring(0,5) != "block" &#038;&#038; mycid != "unknown" &#038;&#038; mycid.substring(0,8) != "restrict" &#038;&#038; mycid.substring(0,7) != "unavail" &#038;&#038; mycid.substring(0,6) != "anonym")</code></p>
<p>Change:<br />
<code>"restrict"</code><br />
to:<br />
<code>"1restric"</code></p>
<p><code>[root@elastix ~]# nano -w /var/www/html/admin/modules/core/functions.inc.php</code></p>
<p>Search through functions.inc.php for restrict and you will find a similar line as above. You must do the same thing by changing &#8220;restrict&#8221; to &#8220;1restric&#8221;. I also found that in this version of FreePBX/Elastix that I had to check <em>CID Priority Route</em> on my inbound route in order for it to actually take effect, so check that if you haven&#8217;t already. Now you will be able to block restricted calls sent from CallWithUs.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/voip/elastix-block-anonymous-restricted-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switched to Elastix from trixbox</title>
		<link>http://thebottle.org/blog/voip/switched-to-elastix-from-trixbox/</link>
		<comments>http://thebottle.org/blog/voip/switched-to-elastix-from-trixbox/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 16:37:19 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[VoIP]]></category>
		<category><![CDATA[elastix]]></category>
		<category><![CDATA[elastix features]]></category>
		<category><![CDATA[elastix vs trixbox]]></category>
		<category><![CDATA[trixbox]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=121</guid>
		<description><![CDATA[Recently I have switched from trixbox to Elastix, and there is quite a difference. They both support features like call recording, time groups, ring groups, voicemail, IVRs, call history, dial-patterns, etc. A big difference is that Elastix supports fax, so you can send faxes with a program called WinprintHylafax or JHylaFAX. You can also receive [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have switched from trixbox to Elastix, and there is quite a difference. They both support features like call recording, time groups, ring groups, voicemail, IVRs, call history, dial-patterns, etc. A big difference is that Elastix supports fax, so you can send faxes with a program called WinprintHylafax or JHylaFAX. You can also receive faxes by having a .pdf document emailed to any address. It also has an IM server that supports many different clients, so it would be easy to create a secure chat for your company. Another big feature Elastix has over trixbox is that it has RoundCube Webmail. This is great if your company does not currently have a solution for email. <span id="more-121"></span></p>
<p align="center">
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-4753073465217599";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-04-14: http://thebottle.org/blog
google_ad_channel = "6673098589";
google_color_border = "efefef";
google_color_bg = "efefef";
google_color_link = "666666";
google_color_text = "000000";
google_color_url = "666666";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>Some other things that Elastix offers are an address book where you can initiate calls just by clicking on the number that you want to call, speech synthesis for converting text to speech, business tracking solutions vTigerCRM and SugarCRM, integrated echo canceler, and support for calling cards.Â  These are all features that trixbox does not have and not only that but Elastix is just more user friendly and polished.</p>
<p>I will delve deeper into Elastix in later posts. So if you want to learn how to setup faxing or block anonymous calls then check back <a href="http://thebottle.org/blog/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/voip/switched-to-elastix-from-trixbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XBMC and Functional IMDB Scraper</title>
		<link>http://thebottle.org/blog/computers/xbmc-and-functional-imdb-scraper/</link>
		<comments>http://thebottle.org/blog/computers/xbmc-and-functional-imdb-scraper/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 15:56:44 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[imdb]]></category>
		<category><![CDATA[imdb scraper]]></category>
		<category><![CDATA[imdb tv.xml]]></category>
		<category><![CDATA[imdb.xml]]></category>
		<category><![CDATA[t3ch]]></category>
		<category><![CDATA[x-box]]></category>
		<category><![CDATA[xbmc]]></category>
		<category><![CDATA[xbmc imdb]]></category>
		<category><![CDATA[xbmc imdb scraper]]></category>
		<category><![CDATA[xbox]]></category>

		<guid isPermaLink="false">http://thebottle.org/blog/?p=102</guid>
		<description><![CDATA[The latest version of XBMC (X-Box Medica Center) does not allow you to scrape IMDB for movie information, but there is a work-around.








Go to T3CH and download both the latest version and then also rev16762 built on 12-30-08. Upgrade XBMC to the latest version and then once you are done upload just the imdb.gif, imdb.xml, [...]]]></description>
			<content:encoded><![CDATA[<p>The latest version of XBMC (X-Box Medica Center) does not allow you to scrape IMDB for movie information, but there is a work-around.<span id="more-102"></span></p>
<p align="center">
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-4753073465217599";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-04-14: http://thebottle.org/blog
google_ad_channel = "6673098589";
google_color_border = "efefef";
google_color_bg = "efefef";
google_color_link = "666666";
google_color_text = "000000";
google_color_url = "666666";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>Go to <a href="http://t3ch.yi.se/">T3CH</a> and download both the latest version and then also rev16762 built on 12-30-08. Upgrade XBMC to the latest version and then once you are done upload just the <em>imdb.gif, imdb.xml,</em> and <em>imdb tv.xml</em> from rev16762. The files are located in <em>&#8220;XBMC\system\scrapers\video&#8221;</em> and should be uploaded to the same location on your X-box. Now the IMDB scraper will work just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://thebottle.org/blog/computers/xbmc-and-functional-imdb-scraper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
