For most common B2B cases you (supplier from non-EU-country / Drittland) should not need to register for German VAT.
physical goods and services you "produce" while being outside EU (coming to the EU as a normal business trip doen't hurt here, unless it's one of the particularly listed services, see below).
You send an invoice that is done the way you do it in your country when exporting goods (this probably means without Australian VAT). The German receiving company has to pay "import VAT" (Einfuhrumsatzsteuer), which they can deduct in the same VAT declaration (Vorsteuerabzug)
(there may be further burocratic duties)
There are some services that work differently, and to provide those you'd need to get a German VAT number (the "except ..." list in @Vercetti's quote). As a rule of thumb you can say that this exception list is about services that "inherently" take place in Germany (e.g. you run an arts exhibition in Germany, or a trade fair or a congress). None of this usually happens during consulting.
But given your consulting background, this exception may be of more importance for you the other way round, i.e. if you attend a conference in Germany (or any other EU country): then that country's VAT is due, and you'll have to reclaim it which may or may not be possible depending on tax treaties between your country and that country.
Nevertheless, the German customer will need you send a bill that is proper according to German VAT law, otherwise they'll still have to pay importation VAT but cannot deduct it from their VAT bill. List from EU information page:
Information required in all cases
- Date of issue
- Unique sequential number identifying the invoice
- Customer’s VAT identification number (if the customer is liable for the tax on the transaction)
- Supplier’s full name & address
- Customer’s full name & address
- Description of quantity & type of goods supplied or type & extent of services rendered
- Date of transaction or payment (if different from invoice date) [delivery date, date when service was provided - I do this time-sheet style for my customers]
- VAT rate applied
- VAT amount payable
- Breakdown of VAT amount payable by VAT rate or exemption
- Unit price of goods or services – exclusive of tax, discounts or rebates (unless included in the unit pri[ce)]
Extra information required in some cases
- Exempt transactions – a reference to the appropriate (EU or national) legislation exempting it, or any other reference indicating it is exempt (at the choice of the supplier).
- Customer liable for the tax (i.e. under the reverse-charge procedure) – the words ‘Reverse charge’.
- Intra-EU supply of a new means of transport – the details specified in Article 2(2)(b) of the VAT Directive (e.g. for a car, its age and mileage).
- A margin scheme applies – a reference to the particular scheme involved (e.g. ‘Margin scheme — travel agents’).
- Self-billing (customer issues invoice instead of supplier) – the words ‘Self-billing’.
- Person liable for tax is a tax representative – their VAT identification number, full name and address.
- Supplier is operating a cash-accounting system – the words ‘Cash accounting’).
So, you state that the invoice is subject to reverse charge according to §13b UStG. Also because of reverse charge, you do not state any German VAT in the invoice (as you did not pay VAT to the German tax office). The invoice also needs to give your customer's VAT-ID in addition to any kind of Australian business ID / VAT-ID you have (this is part of making unambiguously clear who issued the invoice).
Also, it is up to you to verify your customer's VAT-ID, at least to make sure it is a valid VAT-ID.
I do not know whether you have to declare these earnings somewhere - inside EU I have to submit VAT declarations (zusammenfassende Meldung) that state who (VAT-ID) was invoiced for how much.
Not VAT but income tax: §50a income tax law has a withholding tax of 15 % on income from selling licenses in Germany (copyright incl. software, patent, franchise, any kind of knowledge or experience where you collect a fee to let your customer business use this, ...) to the German (business) customer (there are some more situations with such a withholding tax but this is the one most likely to affect you).
The B2B customer is responsible for withholding this tax and sending you a certificate saying so which you can then use for your tax declaration. Exceptions for "small" fees (< 5500 € per case/contract, < 40000 € per year), but they need to sign up for that and have declare it nevertheless.
The business customer does not have this burocratic hassle if you have a business location registered for taxes inside Germany (note though that this would not necessarily change the VAT procedure: to be legally on the safe side with treating the consulting service as inner-German transaction for VAT, they's want to see a certificate by the tax office that you provide these services from within Germany).