Matthew Wills @ Readify

June 4, 2008

COM Interop Principle #3 – Fear the (Hidden) Period

Filed under: COM Interop, Technical — mjwills @ 11:39 am

This post is the fourth in my series on getting your head around COM Interop. My aim here is not to teach you all the innards of COM Interop, but instead to communicate a few key principles. These principles will (hopefully) make your life a little simpler when coding in .NET against COM components (particularly in relation to getting the COM objects to clean themselves up).

COM Interop Principle #3: Fear the (Hidden) Period

Last week’s post covered the key principle of COM Interop – Fear the Period (aka Full Stop).

As a result, we had the following code:

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wb As msE.Workbook
        Dim ws As msE.Worksheet
        Dim xlApp As msE.Application
        '==========================
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        Dim wbs As msE.Workbooks
        wbs = xlApp.Workbooks
        wbs.Add()
        Marshal.ReleaseComObject(wbs)
        wb = xlApp.Workbooks(1)
        Dim wss As msE.Sheets
        wss = wb.Worksheets
        'Clear all but the first worksheet
        For Each wrk As msE.Worksheet In wss
            If wrk.Index > 1 Then wrk.Delete()
        Next
        Marshal.ReleaseComObject(wss)
        ws = wb.Sheets(1)
        xlApp.Visible = True
        Threading.Thread.Sleep(5000)    'So we can see Excel
        wb.Close(False)
        xlApp.Quit()
        Marshal.ReleaseComObject(ws)
        Marshal.ReleaseComObject(wb)
        Marshal.ReleaseComObject(xlApp)
    End Sub
End Class

In the above code, we have diligently followed the two key ways that we learnt to Fear the Period:

  • Do not ever allow two periods to be consecutive (as in the above example of xlApp.Workbooks.Add).
  • Do not ever allow any periods to appear in the ‘In’ section of a For Each declaration (as in For Each wrk As msE.Worksheet In wb.Worksheets).

Or have we?

The Hidden Period

While not evident at first glance, it actually turns out that in the above code there are hidden periods.

Huh? What are you talking about?

Well, lets take a look at one of the lines of code…

        ws = wb.Sheets(1)

The code is simple enough. We want to get the first worksheet of the workbook – so we are calling the Sheets function on the wb (Workbook) object, passing 1.

Or are we?

Is it a function?

Whoops, it seems that Sheets isn’t a function – it is actually a Default Property. This means that:

        ws = wb.Sheets(1)

is just shorthand for:

        ws = wb.Sheets.Item(1)

See – there it is – our hidden period.

So, lets’s add a third practical way to Fear the Period (hidden or otherwise):

  • Do not ever allow two periods to be consecutive (as in the above example of xlApp.Workbooks.Add).
  • Do not ever allow any periods to appear in the ‘In’ section of a For Each declaration (as in For Each wrk As msE.Worksheet In wb.Worksheets).
  • Do not ever call a Default Property.

So, lets incorporate this principle into the original code:

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wb As msE.Workbook
        Dim ws As msE.Worksheet
        Dim xlApp As msE.Application
        '==========================
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        Dim wbs As msE.Workbooks
        wbs = xlApp.Workbooks
        wbs.Add()
        wb = wbs.Item(1)
        Marshal.ReleaseComObject(wbs)
        Dim wss As msE.Sheets
        wss = wb.Worksheets
        'Clear all but the first worksheet
        For Each wrk As msE.Worksheet In wss
            If wrk.Index > 1 Then wrk.Delete()
        Next
        ws = wss.Item(1)
        Marshal.ReleaseComObject(wss)
        xlApp.Visible = True
        Threading.Thread.Sleep(5000)    'So we can see Excel
        wb.Close(False)
        xlApp.Quit()
        Marshal.ReleaseComObject(ws)
        Marshal.ReleaseComObject(wb)
        Marshal.ReleaseComObject(xlApp)
    End Sub
End Class

So, did that fix the issue?

Unfortunately not. I know the tension must be killing you, but there is still one more gotcha to address…

So:

COM Interop Principle #3: Fear the (Hidden) Period

Coming up next – COM Interop Principle #4: Watch the Loops.

May 26, 2008

COM Interop Principle #2 – Fear the Period

Filed under: COM Interop, Technical — mjwills @ 12:37 pm

This post is the third in my series on getting your head around COM Interop. My aim here is not to teach you all the innards of COM Interop, but instead to communicate a few key principles. These principles will (hopefully) make your life a little simpler when coding in .NET against COM components (particularly in relation to getting the COM objects to clean themselves up).

COM Interop Principle #2: Fear the Period

Last week’s post was about what not to do when dealing with COM Interop.

So, what should you do instead? Well, first and foremost you must Fear the Period.

The most powerful weapon in your arsenal when correctly doing COM Interop is Marshal.ReleaseComObject. You can see some examples of its use in the previous two posts in this series. Unfortunately, ReleaseComObject has a natural enemy – the period (or full stop).

So, what does Marshal.ReleaseComObject do? Well, it decrements the reference count of the RCW that you pass to it. Or, in English, it releases the underlying COM object (*).

So, what does the period have to do with anything? Well, lets look at some of the code from the original post…

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim xlApp As msE.Application
        '==========================
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        xlApp.Workbooks.Add()		<---- Focus your attention on this line
        <snip>
        Marshal.ReleaseComObject(xlApp)
    End Sub
End Class

Looking at the code we can see that xlApp is being cleaned up correctly at the end of the code. But have a look at:

        xlApp.Workbooks.Add()		<---- Focus your attention on this line

Let’s have a think about what that code is doing. We are calling a property on the xlApp object which is returning a ‘temporary’ Workbooks object. Then we are calling the Add method (**) on that ‘temporary’ Workbooks object.

But hold on, where are we cleaning up that ‘temporary’ Workbooks object? (Hint: We aren’t!)

This is why we must Fear the Period. To get the above code to work you must introduce an explicit Workbooks variable – this then allows you to explicitly clean it up. So the code would become:

        Dim wbs As msE.Workbooks
        wbs = xlApp.Workbooks
        wbs.Add()
        Marshal.ReleaseComObject(wbs)

So, how do you Fear the Period in practice?

  • Do not ever allow two periods to be consecutive (as in the above example of xlApp.Workbooks.Add).
  • Do not ever allow any periods to appear in the ‘In’ section of a For Each declaration (as in For Each wrk As msE.Worksheet In wb.Worksheets).

So, lets incorporate this principle into the original code:

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wb As msE.Workbook
        Dim ws As msE.Worksheet
        Dim xlApp As msE.Application
        '==========================
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        Dim wbs As msE.Workbooks
        wbs = xlApp.Workbooks
        wbs.Add()
        Marshal.ReleaseComObject(wbs)
        wb = xlApp.Workbooks(1)
        Dim wss As msE.Sheets
        wss = wb.Worksheets
        'Clear all but the first worksheet
        For Each wrk As msE.Worksheet In wss
            If wrk.Index > 1 Then wrk.Delete()
        Next
        Marshal.ReleaseComObject(wss)
        ws = wb.Sheets(1)
        xlApp.Visible = True
        Threading.Thread.Sleep(5000)    'So we can see Excel
        wb.Close(False)
        xlApp.Quit()
        Marshal.ReleaseComObject(ws)
        Marshal.ReleaseComObject(wb)
        Marshal.ReleaseComObject(xlApp)
    End Sub
End Class

So, did that fix the issue?

Unfortunately not. While Principle #2 is definitely the most important principle when dealing with COM Interop, there are still a couple of gotchas in the original sample that we have yet to address…

So:

COM Interop Principle #2: Fear the Period

Coming up next – COM Interop Principle #3: Fear the (Hidden) Period.

* This is an over-simplification, and there a number of finer points that I am purposely ignoring – to keep the discussion simple.
** Let’s ignore what the Add method actually does for now – it isn’t relevant to this post.

May 19, 2008

COM Interop Principle #1 – Don’t Cheat

Filed under: COM Interop, Technical — mjwills @ 12:22 pm

This post is the second in my series on getting your head around COM Interop. My aim here is not to teach you all the innards of COM Interop, but instead to communicate a few key principles. These principles will (hopefully) make your life a little simpler when coding in .NET against COM components (particularly in relation to getting the COM objects to clean themselves up).

COM Interop Principle #1: Don’t Cheat (by relying on the Garbage Collector)

In my previous post, I listed a short code sample that was not behaving as I might have liked. Specifically, it was not closing down Excel when I wanted it to. In that post I called for attempts to get the code ‘working’ without calls to GC.Collect().

But, what if you ignored my requirement to not use GC.Collect()? Well, you would likely have come up with a solution something like this:

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wb As msE.Workbook
        Dim ws As msE.Worksheet
        Dim xlApp As msE.Application
        '==========================
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        xlApp.Workbooks.Add()
        wb = xlApp.Workbooks(1)
        'Clear all but the first worksheet
        For Each wrk As msE.Worksheet In wb.Worksheets
            If wrk.Index > 1 Then wrk.Delete()
        Next
        ws = wb.Sheets(1)
        xlApp.Visible = True
        Threading.Thread.Sleep(5000)    'So we can see Excel
        wb.Close(False)
        xlApp.Quit()
        Marshal.ReleaseComObject(ws)
        Marshal.ReleaseComObject(wb)
        Marshal.ReleaseComObject(xlApp)
        GC.Collect()
        GC.Collect()' A couple more for good measure
        GC.Collect()' A couple more for good measure
        GC.WaitForPendingFinalizers()

    End Sub
End Class

So, what is the problem?

There are two:

  1. It doesn’t work (well, not on my machines running Visual Studio 2008 on Vista 32-bit, nor my machines running Visual Studio 2003 on XP 32-bit).
  2. Even if it did work on your PC (or in your version of the .Net Framework) there is no guarantee that it would work in the future or on other machines.

So:

COM Interop Principle #1: Don’t Cheat (by relying on the Garbage Collector)

As with all principles, there are exceptions! Such as:

  • If the lifetime of your RCWs (COM components) is the same as your application (eg you will be loading Excel when your application starts, and closing it when your application closes) then there is little point in cleaning up correctly. You can be confident (not 100% sure, but confident) that all RCWs will be cleaned up when your process shuts down. So, cheating is OK. :)

Coming up next – COM Interop Principle #2: Fear the Period.

May 15, 2008

COM Interop – The Appetiser

Filed under: COM Interop, Technical — mjwills @ 12:39 pm

So, you want to get your head around COM Interop? (You don’t? Well, just imagine you did.) You could read Adam Nathan’s 1500 page classic (which I thoroughly recommend) or you could start with something a little simpler. :)

I am hoping over the next couple of weeks to put together a set of blog posts discussing some tips on how to do COM Interop correctly – particularly in terms of cleaning up after yourself.

As part of this I will be starting with a block of code that isn’t doing what I want (it is based on some real production code). You can copy and paste the code into a new VB.NET project. The question I will be looking at over the coming blog posts is:

What code changes are required to (reliably) make sure Excel is not still running when the method finishes (without calls to GC.Collect)?

Make sure you add a reference to Excel in your project…

Option Strict Off
Option Explicit On
Imports msE = Microsoft.Office.Interop.Excel
Imports System.Runtime.InteropServices  
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wb As msE.Workbook
        Dim ws As msE.Worksheet
        Dim xlApp As msE.Application
        '==========================  
        xlApp = New msE.Application
        xlApp.DisplayAlerts = False
        xlApp.Interactive = False
        xlApp.Workbooks.Add()
        wb = xlApp.Workbooks(1)
        'Clear all but the first worksheet  
        For Each wrk As msE.Worksheet In wb.Worksheets
            If wrk.Index > 1 Then wrk.Delete()
        Next
        ws = wb.Sheets(1)
        xlApp.Visible = True
        Threading.Thread.Sleep(5000)    'So we can see Excel  
        wb.Close(False)
        xlApp.Quit()
        Marshal.ReleaseComObject(ws)
        Marshal.ReleaseComObject(wb)
        Marshal.ReleaseComObject(xlApp)
        'Your objective is for the EXCEL.EXE process to not be  
        'running by the time you get here...  
        'No use of GC.Collect allowed  
    End Sub
End Class

 

Feel free to post comments (or email me) with solutions, questions, comments etc…

April 28, 2008

Code Camp Oz 2008

Filed under: Technical — mjwills @ 11:05 am

2008 was the year I finally decided to get organised and head down to Code Camp Oz. And it was more than worth my time.

For those of you who haven’t attended Code Camp before, it felt to me like a low-key TechEd or maybe a 2-day RDN. The quality of presentations was generally very high – Fernando Guerrero’s presentation (‘Lessons learned while tuning database systems’) was the highlight for me, but I also particularly enjoyed the presentations by Mahesh Kirshnan (‘How well do you know your IDE?’) and Paul Stovell (‘SyncLINQ‘). Phillip Beadle’s presentation on Test Driven Development reminded me of my urgent need to get further up to speed on TDD.

Some other random thoughts from my first experience at Code Camp:

  • I stayed at Mercury Motor Inn. I won’t be racing to stay there next year. :)
  • The organisation and catering for the event (including the Wine and Cheese night, BBQ, pizza etc) was very well co-ordinated. A big thumbs-up to all involved.
  • I had a real issue finding the venue on the first day (it took me more than 30 minutes, and even then it was only because I followed some other people who had been previously). I think next year I will volunteer to put some signs out on the Friday.
  • The WiFi at the venue was surprisingly good (initial connection was annoying, but after that…). I really wasn’t expecting to be able to make VoIP calls while I was there – but it worked well.
  • Having my Readify loaner laptop with me reminded me of one key thing I need to consider when picking a new laptop in 2 months – battery life. While the majority of Readify staff seem to get Dell laptops (particularly the XPS M1530) they don’t seem to have the variety of battery options as say the Thinkpad T61P. In fact when I try and spec a M1530 online, Dell doesn’t even provide the option of a second battery (let alone a third!) as part of the transaction.

All in all a great experience. I thoroughly recommend you attend in 2009 – if you live in Australia!

March 31, 2008

Coolest bug you have ever found?

Filed under: Technical — mjwills @ 7:34 am

So, what is the coolest bug you have ever found?

Let me state up front that I completely agree with Jeff AtwoodIt’s Always Your Fault. For me its simply a numbers game – given that history has shown me that 99% of the time it is my fault, it seems ludicrous when confronting a new problem to assume the fault lies elsewhere.

Nonetheless, sometimes the 1% case does occur. You do find a bug in the OS. Or a bug in the compiler. Or a bug in a vendor’s control. The programmers working on the OS, or the compiler, or the control, are likely more skilled than I. But they are human too – they make mistakes.

So today I would be interested to hear what is the coolest bug you have ever found (‘found’ meaning you discovered it, as opposed to having someone else show it to you)? Note that you can interpret coolest any way you like. Weirdest, most frustrating, funniest, whatever.

Below is a code snippet illustrating what is the coolest bug I have ever found. I discovered the bug while writing some code to test my VB6 application. The application I was testing converted numbers to text (for the purposes of automatic cheque generation) – so $16.52 would become Sixteen dollars and fifty two cents.

The test code I wrote is below (you can open up Microsoft Word, press Alt-F11 and paste this code in to run it for yourself – the bug still exists). Usenet has some discussion on the issue (its a very old discussion).

Public Sub Bob()

Dim c As Currency

'This code works
For c = 1@ To 10@ Step 1@
	'Call GenerateChequeName(c)
Next
MsgBox c
'11 - makes sense

'This code works
For c = 0@ To 113400000@ Step 567@
	'Call GenerateChequeName(c)
Next
MsgBox c
'113400567 - makes sense

'This code doesn't work
For c = 0@ To 1134000@ Step 5.67@
	'Call GenerateChequeName(c)
Next
MsgBox c
'858993.66 - huh?

End Sub

So, what is the coolest bug you have ever found?

March 26, 2008

You + Ian Griffiths = Free Zune (*)

Filed under: Technical — mjwills @ 10:05 am

Ian Griffiths                        Zune 30

I am assuming most of you are familiar with Ian Griffiths (of Pluralsight). He is the author of a number of books – the most recent I have read was Programming WPF (co-authored with Chris Sells). Ian’s blog is a must read.

Well, last year Ian visited Sydney, Australia to run a 4 day Applied WPF course. He was even kind enough to put his demos online.

Well, this year we have the pleasure of an encore performance - running from 29th April to 2nd May. For someone of Ian’s calibre this is a rare treat for we Sydney-siders.

Now to commemorate his return to the land down under, Readify will be giving away a free Microsoft Zune 30. And how do you get your hands on this Zune, you ask? Its simple. If you register for Ian’s course, and put ‘I want me a Zune’ under the Additional Information section of the booking form, then you are in the running.

So what else could you ask for? One of the world’s great technology experts, teaching one of the world’s most interesting rich client technologies, and the chance at winning the world’s finest MP3 player (**).

(*) Maybe.
(**) Well, ignoring the Zune 80 and the iPod Touch. :)

March 18, 2008

MIX 08 Sessions – Zune feed

Filed under: Technical — mjwills @ 12:37 pm

One of the ‘problems’ of owning a Zune is that you get used to being able to easily subscribe and download podcast content. In fact, you get to the point where if you can’t just subscribe to the RSS feed then you don’t bother downloading and viewing the content.

Generally this isn’t a major issue, but it does annoy me with regard to Flash based websites and their RSS feeds.

But just recently, an even more annoying case raised its head. And that was with regard to the MIX08 Sessions.

MIX08 was recently held in Las Vegas, and from it were made available 88 presentations that can be viewed online or downloaded. At first glance it looks promising for me and my Zune obsession – there is even a ‘Download for Zune’ option.

downloadforzunesmall.jpg

So what is the problem? Well, I am in no mood to download 88 WMV files one by one, then tell the Zune software about them and sync them across. There must be a RSS feed to do this automatically, right?

Wrong. (Well, there is this – but there are only 15 entries in it so at the very least it is incomplete).

So, seeing as I didn’t want to waste 20 minutes downloading the files manually, telling the Zune software about them and syncing them across, I instead spent 60 minutes putting together a very simple RSS feed to allow myself (and others) to download the MIX08 sessions just like any other podcast.

Keep in mind that I have had no experience putting together a RSS feed before (let alone a podcast RSS feed), so don’t expect any fancy schmancy stuff like session descriptions or file sizes. But it has been tested with the Zune client software, and it does work. I think.

March 10, 2008

VoIP Braindump

Filed under: Technical — mjwills @ 11:40 am

Given I am a strong advocate of Voice over IP, I often get asked questions (online and face to face) about what it is, why use it, any recommendations I have etc etc.

The purpose of this post is to list the most common questions I receive, and my answers (or links to other people’s answers) to them. Note that most of my answers are targetted at someone very new to VoIP, and so will seem over-simplified to those who have some depth to their VoIP knowledge. They are also targeted primarily at Australian residents.

Q1 ) What is Voice over IP?

Voice over IP (or VoIP) allows you to talk to other people over the internet. See Whirlpool if you would like more detail.

Q2 ) Why would I want to use Voice over IP?

The main reason is saving money. Talking to other people using VoIP is substantially cheaper than using PSTN (eg Telstra). The cost of calls vary, but here are some examples as of 10 March 2008:

  • With VoIP, you can call other users of VoIP throughout the world for free.
  • With VoIP, you can make untimed local or STD calls for 8c (compare to Telstra).
  • With VoIP, you can call many overseas destinations (such as US, Canada, UK) for 8c untimed (compare to Telstra).
  • With VoIP, you can make calls to Australian mobiles for less than 15c a minute.
  • With VoIP, you can have an extra incoming phone line (for example for your children) for $0 a month.

Q3 ) What do I need to use Voice over IP?

It depends. There are four broad options for using Voice over IP, all with differing requirements:

  1. Global Access or ANI Callback. This requires you to have an existing phone (PSTN or mobile) that sends caller id. Nothing else is required.
  2. Web Callback. This requires you to have an existing phone (PSTN or mobile) and an internet connection (preferably broadband).
  3. Softphone. This requires you to have a broadband internet connection, a computer and a headset (headphones and microphone) that plugs into your computer. Recommended.
  4. VoiceBox. This requires you to have a broadband internet connection, an ATA (aka Analogue Telephone Adapter, aka VoiceBox) and a router (for the ATA to plug into). Recommended.

Global Access is similar to the concept of a calling card which many people use for calling overseas. ANI Callback is a more advanced form of Global Access and is only provided by a very small number of providers. For those new to VoIP, I would not recommend Global Access or ANI Callback.

Web Callback is more mainstream than ANI Callback. I don’t recommend its use, but it is a very simple way to try Voice over IP.

Softphone is my recommendation for trialling Voice over IP. For the cost of a headset (less than $20) and some VoIP credit ($10 or so) you can give it a try. With a softphone you sit at the PC and make phone calls. Skype is a well known example of a softphone.

Once you have played with a softphone, you will likely want to upgrade to a VoiceBox. An ATA (or VoiceBox) is a piece of hardware into which you plug your existing (Telstra) telephone. Then you pick up the phone and dial as you normally would. There is no need to sit down at the computer or do anything else fancy to make a call – you simply pick up the phone and dial.

Q4 ) Which ATA (VoiceBox) do you recommend?

I generally recommend all-in-one devices. This means the one box will do most of what you need in your home – allowing you to connect multiple PCs or use a wireless network, for example (as well as providing VoIP).

If you have ADSL internet, I recommend any of the Billion 7404 options. If this is too pricey, you could also consider the Open 824RLW (4-port). This guide will assist you in getting VoIP setup with these devices.

If you have cable internet, I recommend any of the Billion 6404 options. This guide will assist you in getting VoIP setup with this device.

I personally use the Linksys SPA3102 (the Billion 6404 was unavailable when I started with VoIP). This device is generally more complicated to setup than the Billion devices. This guide will assist you in getting VoIP setup with this device.

Make sure any device you purchase has QoS for VoIP and a FXO port (all of the above devices have both). You can check the capabilities of devices at Whirlpool - click on the specific device and search for these settings.

Q5 ) I don’t have any money to buy an ATA (VoiceBox). What can I do?

I suggest starting with a softphone. Alternatively, if you are nice to me (and I know you) I can lend you my spare ATA – a Linksys SPA2100.

Q6 ) Where should I buy my VoIP hardware from?

Either JMG Technology or from the specific VSP you are planning to use.

Q7 ) What is a VSP?

A VSP is a Voice over IP Service Provider. It is the equivalent of Telstra or Optus or AAPT in the VoIP world.

Q8 ) What are some examples of VSPs?

There are hundreds. Some you may have heard of may include Skype and Engin.

Q9 ) Which VSPs do you recommend?

I recommend MyNetFone, Freshtel and Pennytel (in that order). I use all of these three providers myself (mainly Freshtel). If you decide to go with MyNetFone, make sure you go through this link – if you just go to the home page of MyNetFone you will pay higher call rates. You may also want to check out GoTalk.

Q10 ) Why not use Skype or Engin?

Without boring you with the finer details, you will find the options I suggest are cheaper in 95% of cases. And quality is as good or better.

Note that Skype is perfectly fine for calling other Skype users (since its free – and it is hard to beat free). But it is not as competitive for non-free calls.

Q11 ) OK, so what is the downside of Voice over IP?

The key downside is that VoIP is inherently less reliable than PSTN. While this is an issue, it can be mitigated with a number of measures (such as having accounts with multiple VSPs). Also, there is nothing stopping you turning off the ATA (VoiceBox) if you are having issues and making calls over the PSTN like you do now. A well configured system should have a reliability of over 99.5%.

There is also an upfront cost of purchasing an ATA (VoiceBox), unless you plan to use a softphone. There will also be a (one-off) time commitment to configure the ATA (VoiceBox) before using it (some VSPs such as MyNetFone sell preconfigured devices which reduces setup time).

Also, VoIP requires a good quality broadband connection. Note that good quality is not the same as fast. What you want are low latency, low jitter, low dropouts and low packet loss. In practice, this means VoIP is especially problematic over satellite and wireless internet. It can be problematic over ADSL1 as well (especially if you are with a cheap ISP), but generally ADSL2 and cable are very reliable.

Q12 ) I have more questions about Voice over IP. Where do I go to find out more?

There is a great community of people at Whirlpool who will be more than happy to help you. You could also post a comment to this blog post – but to be honest you are likely to get faster help from Whirlpool.

Q13 ) I need some advice as to what to do or what to buy.

There is a great community of people at Whirlpool who will be more than happy to help you.

Q14 ) I am having issues setting up my ATA (VoiceBox).

There is a great community of people at Whirlpool who will be more than happy to help you.

Q15 ) I don’t want to use VoIP, but I do want to save money on STD phone calls.

BetterTelecom are an alternative to Telstra that provide 17.5c untimed STD calls.

Blog at WordPress.com.