Monday, November 5, 2007

Leopard upgrade

Though the machine was bought after October 26 (the date Leopard's sales started), I had to resort to "update" by the Mac OS X Leopard Upgrade DVD. Here are my steps:

1. Boot from Upgrade DVD and install Leopard afresh
I originally made 3 partitions, one is boot partition, one is for data, and the last one is for Windows. But Bootcamp refused to use these partitions.. and Disk utility could not remove the extra partitions, so I did this:
diskutil mergePartitions HFS+ disk0s3 disk0s5

to merge boot partition (disk0s3) with disk0s4 and disk0s5. Then Bootcamp is satisfied.

2. Use MBP bundled DVD and install bundled application
Upgrade DVD does not come with iLife, since iLife came not with Tiger but bundled with

3. Install Windows Vista Ultimate via Bootcamp.

Thursday, November 1, 2007

Hi, I am a Mac (switcher)

I can't really say I switched to Mac, since I used Mac for the first time in 1987, and even since I replaced my last Mac (a PowerBook 520) with a Sony Vaio in 1999, I still used public Macs at school (and at work I regularly use iMac and Xserve). But since 1999 my main machine has always been a Windows machine, so let's just consider I just switched (back) to Mac, which is a MacBook Pro.
So first, my complaints:

1. The screen could not be tilted away deeper.
This is quite annoying, since when I put a notebook computer on my lap, the screen needs to be tilted low for clear viewing.
2. The power adaptor is bulky
It's not just bulky but also heavier. And oh, it hasn't changed since the 90s, the cable is thick! I am not sure if there is benefit of making power cable this thick, but it really is a nuisance.
3. Apple Mail can't use vertical orientation
I can't believe Jobs really thought users would be happy with horizontal orientation while current Apple notebook's screen is wide. Fotunately, macnoto shared me this link that would just solve this problem.
UPDATE 2007/11/11: Letterbox has not been updated to Leopard yet, but there is an alternative here.
4. MagSafe power connector keeps disconnected
Am I too obsessed with using a lap-top PC (i.e., putting it on my lap)? The MagSafe power connector on the left side keeps getting knocked out by my lap.
5. Mac can't hibernate
You may say there is "deep sleep" on Mac, yeah but it's not deep enough. I like to preserve my workspace so I rarely shutdown my notebook computer. On Windows, putting it to hibernate cut power totally (thus saving battery power) and the notebook will never wake up on its own. But Mac only has sleep, no hibernation, and I have experienced twice already putting Mac to sleep and then put it into my bag, only to find it became very hot when I pulled it out since it woke up inside my bag!
UPDATE: Yes there is hibernate on newer Macs including this MBP, but still I can't put the Mac to hibernate immediately using supported method. There is utilities like "Deep Sleep" but this is not using officially supported feature and not always worked in my situation.

Well, there are more, but that's it for now. I am waiting for the Leopard disk to come to try the "300 new features" :P
(BTW, though I am new switcher, I have been a Tiger user;) )

Softwares for the switcher…

After I stopped using Mac as daily personal machine in 1999 (when I bought Sony Vaio 505 to replace my PB520), today I returned to Mac as daily machine. Here are the softwares to make life as switcher easier:

Make Mail vertical oriented
http://harnly.net/software/letterbox/

Tuesday, September 25, 2007

確かな与党

共産党は「確かな野党」であれば、党四役の福田総裁の自民党は「確かな与党」
(まあ久しぶりの日本語投稿だから、投稿がないよりはいい)

Tuesday, September 18, 2007

SunFire’s jet turbine

It's been quite a while since I naturally stopped dealing with Sun servers. Back in college I dealt with Sun SPARC servers, and in Fujitsu I used Fujitsu's SPARC compatible with Solaris. After that, after a few months of using Solaris x86, I had no more direct interaction with Sun servers/operating systems for years. Until recently when I actually saw the details of Sun x64 servers (i.e., IA servers) whose pricing are not as expensive as I tought. I just set up a SunFire X4200 M2 and the first impression is it looks much closer to an Xserve now, but much noisier. When main power is on, it sounds like a jet turbine. I thought Dell's rack mount server is the noisiest, but now I forgot the existence of Xserve and Dell servers when this X4200 M2 is on.
Nevertheless, current Sun servers look cool and powerful. I couldn't wait to actually try the power of dual-core AMD Opteron 2220 2.8GHz.

Tuesday, August 21, 2007

jad file for au openappli

Here are compulsory items on jadi file to be compatible with au's openappli:

MIDlet-Name
MIDlet-Version
MIDlet-Vendor
MIDlet-Jar-URL
MIDlet-Jar-Size
MIDlet-Data-Size
MIDlet-1

Reference:
http://www.au.kddi.com/ezfactory/tec/spec/openappli.html

Preparing WAV file for Julius

This will change the sampling rate to 16KHz
ffmpeg -y -i 20070808.3GP -ar 16000 -acodec pcm_s16le output.wav

Sunday, August 5, 2007

Pakar basbang

Sang "pakar telematika" katanya menemukan versi lain dari lagu Indonesia Raya, dan katanya semoga ini menjadi hadiah bagi RI di bulan Agustus ini:

Lagu Indonesia Raya Versi Pertama Ditemukan di Server Belanda

Inilah Lirik Lagu Pertama Versi Pertama

Duh, ada yang bisa tolong ajarin "sang pakar telematika" ini untuk ikutan milis, baca blog dan pake YouTube, well singkatnya untuk menggunakan Internet? Katanya dia temukan versi lain dari lagu Indonesia Raya di "server Belanda," padahal ini udah lama beredar di YouTube dan gue udah liat dari dulu. Hadiah apaan, fakta basbang buat malu negara aja punya masyarakat dan media massa yang mau dibodoh2in.

[youtube=http://www.youtube.com/watch?v=6QvyLkdl1_s]

Thursday, August 2, 2007

mp3 on W54T’s LISMO

The LISMO software that came with W54T is said to be unable to handle mp3 files. Here is the patch to enable mp3 handling.

Monday, July 2, 2007

Binary contents download via SMS

In Japan contents download is always via browser, but this seems to be simply not the norm in GMS world, where SMS is used for almost everything. I wanted to know how to download some binary data (like a Flash file) to the handset in GSM world. It seems that the keywords are "WAP push sms". In fact, MMS which is the medium operator's email is transported, is actually an SMS with WAP push function. For MMS deliver, the mmsc delivers the sms with URL pointing to the actual MMS message, and the handset will use GPRS to fetch the message via WAP.

References:
How MMS works
Send an SMS to a Java app/MIDlet

Friday, June 8, 2007

Poor man’s blackberry

Almost any recent cellular phone in Japan has all that Blackberry has and much more, minus one (i.e., integration with corporate Exchange server, but this is available as optional service). But when traveling outside Japan while needing to read and responds in Japanese, all I have is poor man's Blackberry, and it took me years to come to this point. Here is how to "make" one:1. Make sure GPRS settings are correct and GPRS is activated by the operator for your subscription.2. You need to be able to use procmail to forward your emails, and has web-based sms sending service subscription that is cheap enough to warrant the name "poor";)3. Use a standard Japanese-capable handset (assuming that, like me, you need to deal with Japanese mails).4. Get Gmail account.5. Download mobile Gmail application from the following URL and install.http://gmail.com/appNow you are set to receive and send email like with any cell phone in Japan.6. Get real time notification of email arrival using SMS, by setting up a procmail recipe and perl script as follows::0 c* ^From:*\/.* |./sendsms.pl $MATCHThe "sendsms.pl" called above could be like this:
#!/usr/bin/perluse LWP::UserAgent;my $ua = LWP::UserAgent->new;$ua->timeout(10);$ua->agent('Mozilla');my $argc = @ARGV;my $from;my $subject;if ($argc>0) { $from = $ARGV[0]; } else { $from = "uknown"; }#if ($argc>1) { $subject = $ARGV[1]; }my $smsbody = "Mail from $from: $subject";my $posturl = "https://theurltowebbasedsms";my $req = HTTP::Request->new(POST => $posturl);my $res = $ua->request($req);
So whenever an email arrived, the procmail recipe above will get the sender's information (From: field) and pass it to the perl script, which will send it as sms via web interface to my cell phone7. Voila, the poor man's blackberry is now ready to tell you in real time that an email has arrived (at Gmail's email server) and ready to be read (via Gmail's Java application;).

Monday, May 21, 2007

Setting up MediaWiki

A default install of MediaWiki will allow anyone to read and edit.
Adding these lines into LocalSettings.php will allow only logged in users to read/edit:

$wgGroupPermissions['*' ]['read'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;


Furthermore, adding the following will allow only sysop to create accounts:

$wgGroupPermissions['*' ]['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount'] = true;
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-", "MediaWiki:Monobook.css" );


See http://ericsantiago.typepad.com/eric_santiago/mediawiki/index.html

Tuesday, May 15, 2007

Developing add-on for Thunderbird

Introductory document
http://developer.mozilla.org/en/docs/Extensions

Find info regarding developing Mozilla extension here:
http://kb.mozillazine.org/Getting_started_with_extension_development
(e.g., install "Console2" extension to view Jscript errors)

<a href="DOM
The XML User Interface Language (XUL)
Thunderbird: DOMming Around
XMLHTTP notes: abort() and Mozilla bug
Traditional Ways of Tree Traversal
Thunderbird extension development hell
Firefox Extension Development Tutorial :: Overview

Indonesia dan Tagalog

Ini kata2 yang sama antara bahasa Indonesia dan bahasa Tagalog.

Indonesia Tagalog
minum inum
gunting gunting
nangka nangka/langka
kambing kambing
balik balik
dinding dinding
kanan kanan
sayang sayang
mahal mahal
murah murah
takut takut
aku ako
simpan simpan

Thursday, May 10, 2007

OpenWorkBench troubles

I have not been able to run OpenWorkBench on my WinXP Home.
I just saw a new post in the forum saying that in WinXP Pro the problem can be solved by running it as Administrator. Unfortunately it still does not work on my WinXP Home.
I tried on Vista Ultimate, even the install failed with "Internal Error 2739". Some googling revealed that doing "regsvr32 c:\windows\system32\jscript.dll" may solve the problem. The info was not specifically for OpenWorkBench but it solved installation problem. But then OpenWorkBench could not start, giving error message regarding JRE not present. I installed "Java Runtime Environment Version 6 Update 1" from java.com, this solved the problem.
Now OpenWorkBench runs on my Vista machine, but not on my main machine, i.e., WinXP.
And for the first time I saw it running: it's not that impressive...

Sunday, May 6, 2007

Redmine on FreeBSD

First get ruby's tarball.
Then do "./configure; make; make install"
Then install gems as follows:

ruby setup.rb

Then install rails as follows:

gem update
gem install rails --include-dependencies


Then basically follow this basic installation steps:
http://www.redmine.org/index.php?s=install
(getting ruby via SVN is recommended on ruby site... so do the following svn checkout svn://rubyforge.org/var/svn/redmine)

But there will be iconv related error when running rake (rake db:migrate RAILS_ENV="production" and so on).

Change directory to /ext/iconv inside ruby's tar ball directory, then do the following:

$ ruby extconf.rb --prefix=$HOME/app --with-iconv-dir=/usr/local
$ make
$ cp iconv.so /usr/local/lib/ruby/1.8/i386-freebsd5.4


This will elimiate iconv error.

Uncomment this on config/environment.rb

ENV['RAILS_ENV'] ||= 'production'


References:
http://www.imasy.or.jp/~garsl/td/?date=0509
http://www.machu.jp/diary/20041004.html#p01

Sunday, April 29, 2007

As the Deer

Pardon the coughing and Rika's voice in this recording...

As the deer panteth for the water
So my soul longeth after Thee
You alone are my heart's desire
And I long to worship Thee

Chorus:
You alone are my strength, my shield
To you alone may my spirit yield
You alone are my heart's desire
And I long to worship Thee

You're my friend and you are my brother
Even though you are a king
I love you more than any other
So much more than anything
(Chorus)

I want you more than gold or silver
Only you can satisfy
You alone are the real joy giver
And the apple of my eye
(Chorus)

Thursday, April 26, 2007

Writing iCal

iCalendar
http://en.wikipedia.org/wiki/ICalendar

iCalendar Validator
http://severinghaus.org/projects/icv/

To identify values that contain human readable text:
(http://drupal.org/node/61830)
* For double quote use: DQUOTE
* For a comma use: \,
* For a colon use: ":"
* For a semicolon use: \;
* For a back-slash use \\
* For a new line use \n or \N

Thursday, April 19, 2007

弱者は我慢するしかない

テレビは長崎市長の射殺事件のことで騒いでいる。犯人は即逮捕され、市が管理する道路の陥没で自分の車が破損し、長崎市の対応に不満があると供述しているそうである。中央政府を含め、自治体は現代社会の強者であり、住民は弱者であることが多い。一個人が不当な扱いを受けても事実上何もできないことが多い。事実上、司法でさえ弱者の見方にならないことが多い。例え長崎市長射殺事件の犯人の訴えが正しければ、犯人が取った行為を正当化することはできないが、長崎市は蒔いた種を刈り取ったといえる。

世界のテロ問題はまさに同様な問題である。テロをまったく正当化できないが、不平等を容認する発展した国々は蒔いた種を刈り取った一つのものはテロである。世界はグローバル化されたのはテロを促進させた要因の一つであり、弱者に対する関心やケアもグローバル化させなければテロはなくならない気がする。

郵政民営化は誰のため

郵政民営化のお騒ぎは終わった。もうテレビではほとんどいわれなくなった。
先日飯塚郵便局からこのチラシが入った。今まで便利だった24時間郵便受付が廃止された。そういえば、しばらく前に国際送金をしようと思い、近くの郵便局(幸袋郵便局)にいったら、もう扱っていないといわれた。いくつかの郵便局でしか扱わなくなり、送金手数料も跳ね上がった。今度周辺の郵便局が閉鎖されるのか。
これは民営化を伴う合理化の結果だろうか。郵政民営化は誰のためなのか。今のところ利用者(特に地方にいる利用者)が感じるのは不便さのみのような気がする。テレビ電話の技術も飛躍的に向上し、日本ではブロードバンドインフラも世界トップの量と質になっているので、国家議員は地方に住み、地方から国会の格会に参加したらどうだ。そうすると少しは自分でその不便さが分かり、国民の目線で法律を作ることができるのではないか。

Tuesday, April 10, 2007

日本の安全神話

英国人女性のリンゼイさんの殺害ニュースが連日続いている。2週間も経ったのに犯人がいまだ逃亡中日本の安全は神話だろうか。私は次の理由で日本は母国のある東南アジアまたはその他の発展途上の国よりも危険であると考える:

1.犯人は「いい人」
事件が起きると、犯人の周辺の人たちがよくメディアからインタービューされる。その際、驚くほどのコメントは「いい人だったのに」「普通の人だった」「やさしそうな感じだった」などの普通以上の評価となっている。母国インドネシアでは犯罪者はだいたいイメージ通りの人であるが、日本での犯罪者はまさに外見によらないものである。インドネシアではだいたい危険度の高い地域に危険そうな人たちがいて、そこを避ければだいたい大丈夫ですが、日本ではどこのどんな人を避ければいいか分からない。自転車に乗るかわいい青年はまさかナイフで襲ってくる通り魔だと思ってもいなかっただろう。

2.キレると命取り
学校のクラスメートでさえ突然殺人者になり、子供から大人までキレやすい人が多くいる。上記のインタービューで最後によくいわれるのは「キレる怖い」ということである。まさに外見によらず、今のシカは明日ライオンになる。このため、日本の道路もインドネシアの道路より危ない。日本は高い金で運転免許を手に入れるわりには運転が下手な運転者が多い。道路で下手なのに、偉そうな人が多い。追い越されたりするとキレて追いかける。お前が下手だからやろ!と窓をあけて叫びたいが、日本人はキレると鉄砲を出すかも知れないと思い我慢する。実際割り込んだ車にびっくりしホーンを鳴らしたら鉄砲を向けられた経験があるので、もう二度とせず、ただ我慢するだけである。インドネシアの道路の方がずっと安全だと思うようになった。インドネシアでは下手なドライバは追い越されたりホーンを鳴らされたりしても気にしない。お金もあるのでアメリカから銃さえ輸入できるので、通常キレられたら殴られるだけでもひどいと思うが、日本ではキレられたら命の保障はない。

2.平和ボケ
上記にも触れているが、日本人はキレると何をするかが分からない。平和ボケのため、自分がとる行動の結果の深刻さを行動する前に知ることが困難である。クラスメートを殺した中学生などはナイフを手にするときに殺すという行動についてゲームで見るような知識しかない。キレると行動範囲は無限である。

日本は犯罪率は低いが、安全だと勘違いしない方が無難である。発展途上国よりも身の安全を確保するのは難しいかも知れないが、気を緩まず周りはいつも危険性を潜んでいるという発展途上国の常識を持ち続けるよい。

Tuesday, April 3, 2007

日本の天気予報に裏切られた

2週間前に週間天気予報を見て、次の週の花見を計画した。来日間もない人に日本の天気予報の正確さをほめた。本人も東南アジア出身で、ぼくらの国では天気予報を見る人なんかいないよね、日本の天気予報はすごい、日本の気候予測用のスーパーコンピュータは世界一早いスーパーコンピュータになってたもんなと話していた。しかし次の週に雨といわれた日は晴れ、そして晴れといわれた日は雨になった。まったく天気予報の反対のことが起きた。天気予報に裏切られ、もう週間予報を見て決められないと思い、花見を中止し、「来週天気次第でやりましょう」ということになった。その次の週の月曜日は昨日だったが、翌日の天気予報では晴れということだったので、火曜日に花見ということを決めた。月曜日の夜のテレビでの天気予報でも火曜日は晴れということになっていた。しかし今日起きてみたら、朝から雨やんか!ほんまに、だめやな天気予報は。ソフトウェアのパラメータか何かの間違いでサクラの開花時期予測が間違っていたようにこれもパラメータ間違いか!

Wednesday, March 21, 2007

Bawang Mumbai

Kemarin ketemu relasi perusahaan India di kantor mereka Tokyo. Kantor pusat dan beberapa cabangnya ada di India. Salah satu nya di Mumbai. Katanya dulu namanya Bombay, tapi ini nama buatan (atau pilihan) Inggris waktu menjajah India, jadi sekarang dikembalikan ke nama aslinya Mumbai. Demikian juga Madras yang nama buatan Inggris dikembalikan ke Chennai nama aslinya. Udah pernah dengar sih rasanya, cuma baru kali ini dengar langsung dari orang India.
Terlepas dari kontroversi mengenai penggantian nama ini, kalo gitu bawang bombay harus ganti nama dong jadi bawang mumbai?

Friday, March 9, 2007

OpenCV

OpenCV related links:

Main site
Open Source Computer Vision Library at Sourceforge
Open Source Computer Vision Library at Intel


Tutorial
Introduction to programming with OpenCV

Documentations
Image Processing and Analysis Reference
Basic Structures and Operations Reference
Structural Analysis Reference
Experimental Functionality Reference

Some other links:
http://www.idd.tamabi.ac.jp/art/wiki/index.php?Programming%2FOpenCV

私が提案する少子化対策

私が提案する少子化対策は次の通り: 国の年金制度を完全廃止する。国民は子供を十分多くつくり、自分の老後にそなえる。退職したら、複数の子供から仕送りをもらい、そして複数の子供が年をとって弱った自分を介護してもらう。国の年金制度を完全廃止することでこのようにせざるをえない状況を作る。不幸にも子供をで恵まれない夫婦の老後の最低限のレベルを国が生活支援として保証する。

馬鹿にしている市議会選挙

飯塚市の市議会選挙は明後日に迫ります。選挙カーは走り回り、スピーカから「~でございます。よろしくお願いします」「あたたかいご支援、ありがとうございます」が繰り返し流れます。「~でございます。よろしくお願いします」と聞いたからその立候補者に票を入れるわけないと思い、選挙のやり方を不思議に思います。この状況からわかることは、政治家は市民を馬鹿にしているか、市民は本当に馬鹿かのどちらかです。無意味な言葉を繰り返しうるさく言わずに、なぜ私はあなたに票を入れるべきかを説得力のある説明をしてもらいたい。

Monday, March 5, 2007

Multi RBL check

Here are some sites to check multiple RBL sites:

robtex's Multi-RBL check
http://www.robtex.com/rbls.html
Openrbl
http://openrbl.org/
MXRate (not multiple, but decisions are based on info from many servers)
http://www.mxrate.com/lookup/lookupResults.asp

Thursday, March 1, 2007

Asterisk dialplan patterns

X matches any digit from 0-9
Z matches any digit form 1-9
N matches any digit from 2-9
[1237-9] matches any digit or letter in the brackets
(in this example, 1,2,3,7,8,9)
. wildcard, matches one or more characters
! wildcard, matches zero or more characters immediately
(only Asterisk 1.2 and later, see note)


References:
voip-info.org

sip.conf settings

Keywords used in sip.conf settings:

[general]

* allow -- 有効なコーデックの指定
* allowguest -- パスワードの認証が必要かどうか
* allowexternaldomains -- ドメインによってはじくかどうか
* allowexternalinvites -- 外部への INVITE と REFER コマンドを使用するかどうか(使用不可)
* autocreatepeer -- peer としての設定のされていないユーザからの Register を許可するかどうか
* autodomain -- 「domain」「bindaddr」「externip」「externhost」で設定された値を、ドメインリストに追加するかどうか
* bindaddr -- このサーバで接続を待ち受けるIPアドレス
* bindport -- このサーバで接続を待ち受けるポート番号
* callerid -- コーラ ID の指定
* callevents -- 外部プログラムを使用するかどうか
* canreinvite --
* checkmwi
* compactheaders
* context
* defaultexpiry
* disallow
* domain -- このサーバに割り当てるドメイン
* dtmfmode
* externhost
* externip
* externrefresh
* fromdomain
* ignoreregexpire
* insecure
* language
* localnet
* localmask
* maxexpiry
* musicclass
* nat
* notifymimetype
* notifyringing
* ospauth
* outboundproxy
* outboundproxyport
* pedantic
* progressinband
* promiscredir
* realm
* recordhistory
* regcontext
* register
* registerattempts
* registertimeout
* relaxdtmf
* rtautoclear
* rtcachefriends
* rtpholdtimeout
* rtpkeepalive
* rtptimeout
* rtupdate
* sendrpid
* sipdebug -- SIPの動作部分のみのデバッグ情報を出力する
* srvlookup
* subscribecontext
* tos
* trustrpid
* useclientcode
* useragent
* usereqphone
* videosupport
* vmexten

[peer/user]

* accountcode
* allow
* allowguest
* amaflags
* auth
* call-limit
* callerid
* callgroup
* callingpres
* canreinvite
* context
* defaultip
* deny
* disallow
* dtmfmode
* fromdomain
* fromuser
* fullcontact
* host
* incominglimit
* insecure
* ipaddr
* language
* mailbox
* md5secret
* musiconhold
* name
* nat
* ospauth
* outboundproxy
* permit
* pickupgroup
* port
* progressinband
* promiscredir
* qualify
* regexten
* regseconds
* restrictcid
* rtpholdtimeout
* rtpkeepalive
* rtptimeout
* secret
* sendrpid
* setvar
* subscribecontext
* trustrpid
* useclientcode
* usereqphone
* username
* vmexten

Reference:
http://asterisk.phalanx.co.jp/index.php?sip.conf

Bridge mode for VMWare Player

This is how to set guest OS to use bridged mode (for example installing Trixbox, see http://arnold.siboro.org/blog/en/?p=41).

Guest OS is Windows 2003 Server with two NICs, one connected to global network, one to private network. The guest OS should be connected via bridged connection to private network.

Go to VMWare Player install directory and run vmnetcfg.exe. Click "自動ブリッジ" tab and see the virtual NIC that is bridged (usually, or perhaps always, VMnet0). Then click "ホスト仮想ネットワークの割当", and at VMnet0 select the host OS NIC that is connected to private network.
Then start VMWare player with the guest OS, set the player's Ethernet to Bridged. Settings are finished for host OS and player side.
Now go to guest OS and set the network connection accordingly. For example, if the host OS is CentOS (or other Linuxes), set /etc/sysconfig/network-scripts/ifcfg-eth0 to something like this:


DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:0C:29:03:7A:9D
IPADDR=172.31.31.3
NETMASK=255.255.255.0
NETWORK=172.31.31.0
BROADCAST=172.31.31.255
GATEWAY=172.31.31.1


Reference:
http://www37.tok2.com/home/nobusan/multi_boot/vmware/vmware.html

Wednesday, February 21, 2007

qpsmtpd for anti-spam

Here are the steps to use qpsmtpd:

Get qpsmtpd from http://smtpd.develooper.com/
Extract and put for example on /usr/local/qpsmtpd
Change the port number of currently running qmail from 25 to, for example, 2525
Put (or uncomment) the following line on /usr/local/qpsmtpd/config/plugins
queue/smtp-forward localhost 2525
Make a symbolic link from daemontools' service directory to /usr/localqpsmtpd

The qpsmtpd will then run with default plugins. A list of plugins can be found at http://wiki.qpsmtpd.org/plugins

Here are some plugins that require extra work to set:

check_validrcptto_cdb
This plugin can be downloaded from http://robinbowes.com/projects/check_validrcptto_cdb. This plugin requires a database (cdb file) of valid recipient addresses, which can be made with mkvalidrcptto and cdbmake-12 program, a part of djb's cdb package. A cron job as follows will then periodically make the list of valid RCTP TO addresses and turn into cdb file:



#!/bin/sh
PATH=/usr/bin:/bin:/usr/local/bin:/var/qmail/bin
cd /var/qmail/control

if [ ! -f validrcptto.txt ] ; then touch validrcptto.txt ;

fi mkvalidrcptto > validrcptto.new if ! diff validrcptto.txt validrcptto.new > /dev/null 2>&1
then
cdbmake-12 validrcptto.cdb tmp$$ < validrcptto.new chmod 644 validrcptto.cdb validrcptto.new
fi

mv -f validrcptto.new validrcptto.txt



Then put this line on /usr/local/qpsmtpd/config/plugins
check_validrcptto_cdb /var/qmail/control/validrcptto.cdb

References:
O'Reilly Using Qpsmtpd

Wednesday, February 14, 2007

Replacing SCCP to SIP on Cisco IP 7960

I got time (and enough motivation) to finally got rid of the SCCP firmware inside this Cisco IP 7960 that has been idle for years.


1. Setup a TFTP server
2. Put these files on the TFTP server
OS79XX.TXT
*.bin
(E.g., for v6.3, the file is P0S3-06-3-00.bin)
3. Set 7960 for firmware update
Press **# at the main window of 7960 to unlock the phone, then set DHCP to yes, and alternate to TFTP to yes. Then, press "*","6",Setting buttons at the same time to reboot. The 7960 will then boot with SIP firmware
4. Put these files on the TFTP server
OS79XX.TXT
SIPDefault.cnf
dialplan.xml
RINGLIST.DAT
5. Set the 7960 for SIP setting
Press "*","6",Setting buttons at the same time to reboot again. The 7960 will then booth with SIP settings according to the contents of SIPDefault.cnf and SIP<MAC addresss>.cnf (for example, SIP000B46CABF9F.cnf if the MAC address of the 7960 is 000B46CABF9F)




References:
Configuring Cisco 79xx phones with Asterisk
Cisco 7960 IP Phone - SIP firmware version
Using Cisco IP Phones with Asterisk
Cisco IP Phone 7960 Administrator Guide for SIP, Version 1.0
Cisco IP Phone 7960 Administrator Guide for SIP, Version 2.0
SIP IP Telephone 7940/7960 Software

Asterisk + VP-1000 + Cisco IP 7960

I got Windows server, Fletsphones and Cisco phones, and I got account on Voipbuster with free calls to Japan and other countries. Why can't I make free calls from these phones? So here is my try at Asterisk.

1. Install Trixbox (formerly Asterisk@Home)
Since Trixbox is CentOS based, and I don't have a free machine, I took a VMware image found here, (See "Introducing A Plug-And-Play Asterisk PBX for Windows") and run it on top of a Windows server via VWware Player. Note: set the VMware player to use NAT and DHCP.

2. Setup Asterisk to use Voipbuster account as outgoing trunk
Open freePBX interface of Trixbox, then click on "Trunks" menu. Make a little tweak to "SIP/voipdiscount" trunk just for quick test as follows:

PEER details:
allow=ulaw&alaw
authuser=asiboro
disallow=all
fromdomain=voipbuster.com
fromuser=<username>
host=sip.voipbuster.com
insecure=very
nat=yes
qualify=yes
secret=<password>
type=peer
username=<username>

Register string
<username>:<password>@sip.voipbuster.com


Adjust dialplan strings on both "Trunk" and "Outbound Routes".


3. Setup VP-1000
Setup VP-1000 to use Asterisk as SIP proxy/registrar. For example, use the pre-set number 500 (password 1234). Then VP-1000 can dial to whatever number allowed by dialplan via Voipbuster.



4. Setup Cisco IP Phone 7960
This is a bit not straightforward, since 7960 is shipped with SCCP ("Skinny" protocol) firmware by default, and this one is no exception. Though some people say that Asterisk can support Skinny protocol, it's a lot easier if the firmware is replaced with SIP firmware. So I replaced SCCP to SIP and the rest is like setting any SIP user agent.