Entries from September 2006 ↓
September 22nd, 2006 — General, Technology
Excerpts from The Dilbert Principle by Scott Adams
Ego-wise, two things are important to engineers: a) how smart they are, b) how many cool devices they own.
The fastest way to get an engineer to solve a problem is to declare that the problem is unsolvable. No engineer can walk away from an unsolvable problem until it’s solved. These types of challenges quickly become personal – a battle between the engineer and the laws of nature.
Engineers will go without food and hygiene for days to solve a problem. (Other times just because they forgot.) And when they succeed in solving the problem they will experience an ego rush that is better than sex – and I’m including the kind of sex where other people are involved. Not only is it better at the moment, but it lasts longer.
When an engineer says that something can’t be done (a code phrase that means it’s not fun to do), some clever normal people have learned to glance at the engineer with a look of compassion and pity and say something like: “I’ll ask Bob to figure out. He knows how to solve difficult technical problems.”
At that point, it is a good idea for the normal person to not stand between the engineer and the problem.
Engineers can actually hear machines talk to them. The computer hums an approving tune when the engineer writes an especially brilliant piece of computer code. An engineer who is surrounded by machines is never lonely and never judged by appearance. These are friends. So it should be no surprise that engineers invest much of their ego in what kind of “friends” they have.
September 21st, 2006 — Technology
Alright, I am spending too much time with Asterisk these days. It’s fun to work with it, but it can be quite frustrating at other times. My latest problem is faxes. I am using spanDSP and the RxFax and TxFax applications. Everything compiles alright, but the whole Asterisk crashes when either of the applications are invoked from the dialplan. I am surprised it crashes the whole application - I did not expect it to do that. I have already read a lot about compiling fax support, using AsterFax etc, but am not making any headway.
Then Mitul told me to wait till October. He said Asterisk has problems with Fax. And the Fax over IP (T.38) feature will solve the issue, when it comes up with Asterisk 1.4. (though I am not sure about it as the detailed report on ISP Planet is not very clear about it)
And Sujeet sent me to New Asterisk Set to Ring - an article on InternetNews talking about the new features coming up in the next version. Fax is certainly there, and even Jabber and Google support is coming.
On the other hand, I was thrilled to learn that the Gizmo project now supports Asterisk. You can now use your Gizmo softphone to login to your Asterisk PBX system. That means we can now have a reliable Asterisk client for the Mac. Even SJPhone hasn’t worked well with me lately. The other options on Mac are simply unusable (also because I am on an Intel Mac)
We are also setting up Wildfire from JiveSoftware as our Jabber based instant messaging system now. Figuring out the pam_mysql integration now.
The other issues we have faced on the Asterisk installation so far:
- First, the ISDN line crossover connection to the Digium E110P card. We finally figured it with Mitul’s help.
- We used TrixBox initially, then did a fresh Ubuntu installed and compiled Asterisk from scratch. FreePBX adds too many configuration files and makes things complex.
- Mitul gave sample configuration files - I tried to understand them and make them work to our situation. Finally gave up and started afresh. Later, added parts from those samples to our files.
- The CallerID was creating problems initially. We would get the call in Asterisk, and it would not do a Direct Inward Dialing to the extension because it was searching for the whole number as extension - even with a “22″ prefix for the city. I added a pattern matching for this and extracted the last 4 digits of the number to arrive at the extension number.
- The patterns in the dial plans, I couldn’t find a way to have a wildcard at the start of the pattern. If I put a wildcard at the beginning it would match any number. E.g. a pattern like _.67192000 would match any number - not just 67192000 or 2267192000 or 912267192000.
- Then we struggled with authentication. We wanted to have a single login/password for all services enterprise wide. We used pam_mysql and all our authentication worked on that. There is a real time mysql integration module with Asterisk but we did not want to increase the load on our servers. So we wrote up a PHP script to generate the SIP and Voicemail configuration files from our db. The extensions.conf would be written once and would not need to be changed. Even in authentication, we faced numerous issues - first realization was that we can not use numeric extension numbers and string usernames.
- Another thing was a hack to dial local phone numbers when the caller ID showed the city code (22) in front of them. Just took the last 8 digits of the number and dialed out in such cases.
- It was a bit tricky to test the dialplan. Initially it was going in the “welcome. please dial the extension number…” prompt every now and then. Had to verify the flow for various extensions, and add extensions for timeout and hangup to resolve this.
- The voicemail’s email notification requires that you have sendmail on the same server as Asterisk. Had to setup Exim on the box for this and use our main mail server as smarthost.
- You will not get incoming phones if you do not “register with the proxy”.
- On some lines, we experienced no voice for a while in conversations. The voice would just disappear. Finally figured it was an issue with the network cables.
- We have setup different access levels of outgoing calls to different people. Local / Mobile / STD / ISD. This was very easy to accomplish via “context” in the sip configuration file. We added a field in the MySQL db for the access, and placed the context based on this field in our PHP generated sip config file.
- When people complained about “Line is busy” errors at the start of the day, mostly the problem was that the ISDN router was not started! (we are still to push these things behind a UPS and run them 24/7)
- Programmers may face some initial problems working with software phones, but they will get used to it quickly!
- We still haven’t been able to figure out how to capture sound from our Intel 945 dual core motherboards under Ubuntu. This sucks!
September 21st, 2006 — GNU/Linux, Technology
We have a pam_mysql based centralized authentication. We used LDAP earlier but dropped it in favor of MySQL because we are much more familiar with it and we could easily build or integrate other systems around it. This choice has led to a few complications though.
One such is address book integration with this database. We had an LDAP based address book lookup earlier that could auto complete email addresses of people in the organization - and even other centralized contacts. Now that wouldn’t work since we don’t have LDAP itself. (and we want to avoid using it)
So I was looking online for some resources on this. Did not find much. Just found one application - absync - that was similar to what we need. This software has two parts - one SquirrelMail plugin and the other a Thunderbird extension. The address book is synchronized between the two instances. This sounded just perfect for us, but it did not work out of the box. The version available on their site is one year old, and gave a lot of errors with my Thunderbird 1.5 setup. (I first had to hackup the install.rdf file for accepting my version). The AddressBook plugin for SquirrelMail too did not work without manual patches.
So we are still looking for a solution to this. Hacking AbSync and getting it to work the way we want looks like the best way. But I am certainly willing to consider options!
September 20th, 2006 — Technology
http://en.wikipedia.org/wiki/Email_address
According to RFC 2822, the local-part of the e-mail may use any of these ASCII characters:
- Uppercase and lowercase letters (case insensitive)
- The digits 0 through 9
- The characters, ! # $ % & ‘ * + - / = ? ^ _ ` { | } ~
- The character “.” provided that it is not the first or last character in the local-part.
i.e. Acording to RFC 2822, _firstname.lastname@domainname.tld or #firstname.lastname@domainname.tld are 100% correct email address.
Standard Regular Expression for any email according to RFC 2822,
/^(([a-z0-9!#$%&*+-=?^_`{|}~][a-z0-9!#$%&*+-=?^_`{|}~.]*[a-z0-9!#$%&*+-=?^_`{|}~])|[a-z0-9!#$%&*+-?^_`{|}~]|(”[^"]+”))[@]([-a-z0-9]+\.)+([a-z]{2}|com|net|edu|org|gov|mil|int|biz|pro|info|arpa|aero|coop|name|museum)$
Also Visit : http://tools.ietf.org/html/rfc2822
Thanks to Vikas, who works in our PHP team, for this! I didn’t care to read this much about emails!
September 19th, 2006 — Apple
Lot of posts related to Mac lately! Today, I wanted to get online from home and thought of hooking up my Reliance phone via the data cable. The rconnect software works well on Windows and Linux, but I was not sure about Mac. So I plugged one end of the cable into the phone and the other on the USB port of the Mac. Went to System Preferences -> Network and it told me that the system has detected the LG CDMA USB Modem and I should configure it!
I tried it out, but the default modem driver did not work. So I took my pick and selected an “au CDMA” driver. And to my surprise, it worked!
The dial up settings are simple:
- The number to dial is #777
- Username and password are your mobile phone number
Good to be connected this way. Though the speed is not high, it’s workable. The main advantage is I can take it almost anywhere in the country and still be connected!