Dograh

Outbound Calling API for Germany and Spain: Consent and Caller ID

Outbound Calling API for Germany and Spain: Consent and Caller ID
TechnicalNovember 5, 2026·9 min read

Outbound Calling API for Germany and Spain: Consent and Caller ID

Pritesh Kumar
Pritesh Kumar·Co-founder, Dograh AI

Building Dograh, the open-source alternative to Vapi. OSS and Voice AI. Exit founder and YC alum.

An outbound calling API for Germany and Spain is the easy part of the job. Before the first call you need consent from each person, a German caller ID you hold, Spain's 400 numbers for commercial calls, and the paperwork your carrier asks for. Dograh, the open-source voice agent platform, places the calls through your own carrier account.

Key Takeaways

  • Germany needs prior express consent for sales calls to consumers.
  • Spanish commercial calls come from 400 numbers for firms in scope.
  • Carriers check addresses and company papers before numbers go live.

Sending one API request that rings a German or Spanish phone takes minutes. Making that call lawful, and making sure it connects with the right caller ID, takes longer. This post covers consent in both countries, Spain's new number range, caller ID law, and what five carriers ask for.

In Germany, the consent question settles most outbound plans before any carrier is chosen. The German Act against Unfair Competition (Gesetz gegen den unlauteren Wettbewerb, UWG) says a sales or advertising call to a consumer needs that consumer's prior express consent. For calls to businesses, presumed consent can be enough, such as a clear reason to think the business wants the call. Advertising with an automatic calling machine needs express consent whoever the person is. The law does not name AI, and the cautious reading treats an AI voice agent as such a machine, so plan on express consent for every AI sales call. Keep the consent details, when and how each person agreed, next to the contact list you upload, so a campaign list only ever holds people who said yes.

Consent also has to be documented and kept. Our post on German AI voice agents for automotive dealers covers the five-year record rule and how a dealer keeps those records.

Enforcement is active. The Bundesnetzagentur received 39,842 written complaints about unlawful phone advertising in 2025 and imposed fines of over €1.099 million. Service calls with no advertising, such as confirming an appointment the customer booked, sit outside this rule, so many teams start there.

Spain has two layers, one in its telecoms law and one in its data protection law. Spain's General Telecommunications Law 11/2022 (Ley General de Telecomunicaciones) gives people the right not to receive automated commercial calls without human intervention unless they gave prior consent. Other unwanted commercial calls need prior consent or another lawful basis under the GDPR. An AI agent with no person on the line generally falls under the automated-call rule, so plan on prior consent.

Spain's Organic Law 3/2018 on data protection (LOPDGDD) adds the Lista Robinson. Before a marketing call, check the number against the advertising exclusion lists, unless the person consented to calls from you. Our post on Spanish AI voice agents for e-commerce shows how these rules apply to order and delivery calls.

Spain's 400 numbers for commercial calls

Spain now separates commercial calls from customer service by number range. A BOE resolution on the 400 range assigns numbers starting with 400 to commercial calls, and it is now fully in force. Firms covered by the Customer Service Law 10/2025 may make commercial calls only from 400 numbers. That law covers providers of basic services at any size, plus other consumer-facing firms with 250 or more staff, over €50 million turnover or over €43 million balance sheet. Operators block commercial calls from covered firms that don't use the code.

Two details shape the setup. A 400 number is outbound only and can't be used for customer service, so customers who want to call back need a separate service line. Carriers can also go further than the law. Twilio applies the 400 rule to every outbound commercial call in Spain, whatever the size of the business. Confirm with counsel in each country whether your calls count as commercial and whether your firm is in scope.

In practice, a team that makes both service and sales calls in Spain ends up with two kinds of numbers: a service number for reminders and callbacks, and 400 numbers for anything that promotes. Decide what kind of call each campaign makes before you pick its numbers, because a reminder that adds an offer can turn into a commercial call.

A team in Spain holds two kinds of numbers: a 400 number for anything that promotes and a service number for reminders and callbacks. A sales call goes out from the 400 number, the operator lets it through, and the customer's phone shows a 400 number. When the customer calls back, the call goes to the service number, because a 400 number is outbound only.
Decide what kind of call each campaign makes before you pick its numbers, because a reminder that adds an offer can turn into a commercial call. Whether your firm is in scope is a question for counsel.
Dograh

Open Source Alternative to Vapi / Retell

Self-hosted voice agent platform — no per-minute fees

dograh-hq/dograh

Star on GitHub

Caller ID in Germany and Spain

Both countries now check the number a call shows, and both act against foreign calls showing local numbers. Germany's Telecommunications Act (Telekommunikationsgesetz, TKG) requires a call to show a full German number the caller has the right to use. Calls handed into Germany from abroad that show a German number have that number suppressed. So a German caller ID needs a German number on a route the carrier accepts as domestic.

In Spain, an order against caller ID spoofing (Orden TDF/149/2025) has operators block calls from abroad that show a Spanish caller ID, except for roaming. It also rules out mobile numbers for customer service and for unsolicited commercial calls.

On the Dograh side, a Cloudonix setup lets each phone number carry its own SIP trunk, and that trunk wins over others for calls showing that number, because a carrier rejects a caller ID it doesn't own. Test this before a campaign: call a German or Spanish mobile from your setup and check that the number shown is the one you expect.

What each carrier asks for

Phone numbers and minutes come from your carrier account, and the carrier sets the paperwork, such as the proof of address and company papers Telnyx asks for on German numbers. Self-hosted Dograh has no per-minute platform fee, but servers, model keys and phone minutes still cost money. Dograh Cloud charges a 1¢-a-minute platform fee.

The table covers five of the carriers the current Dograh release places outbound calls through, and our guide to telephony for voice AI covers how they compare in general.

CarrierGerman numbersSpanish numbers
TwilioLocal and mobile numbers for businesses only. Local needs an address in the area code's region plus a Handelsregisterauszug, Gewerbeanmeldung or tax letter. Mobile needs a German address.Local needs an address in the prefix's locality, ID or company registration with tax ID, and proof of address. Commercial calls only from 400 numbers.
TelnyxAddress in the area code, utility bill under 3 months old, company registration certificate and number, signed form, physical presence in Germany, scanned documents only.Telnyx sets its own document rules for Spanish numbers.
PlivoRequirements differ by country, by number type and by business or individual.Same as Germany.
CloudonixCloudonix doesn't sell numbers. They come from the number provider or SIP trunk you connect, which sets its own document rules.Same as Germany.
Asterisk ARIYour own Asterisk server and SIP trunk. The trunk provider sets the number rules.Same as Germany.

Connecting the account comes after that. The telephony overview in Dograh's docs covers each carrier, and numbers go in E.164 format, such as +4930XXXXXXX or +3491XXXXXXX.

Teams running their own phone system can connect it instead, and the Asterisk ARI guide covers the setup.

Join the Dograh Community

Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.

Setting up campaigns for both countries

The rules above turn into a few concrete settings. Create one telephony configuration per country under Telephony in the sidebar. Open a configuration with Manage Phone Numbers, use Add phone number for each number you hold, and mark one as the default caller ID. Each campaign uses one telephony configuration, and the API's campaign request takes it as telephony_configuration_id. A campaign rotates through that configuration's numbers, so a Spanish commercial campaign's configuration should hold only 400 numbers. Outside a campaign, a call shows the configuration's default caller ID unless a specific number is chosen.

Calling hours are set in one time zone per campaign. Germany and mainland Spain share Central European Time, but the Canary Islands run an hour behind, so they get their own campaign. You set the retries (0 to 10), and the consent records decide who gets called at all. Voicemail handling is off by default, and "Leave a message" plays one fixed message once you switch it on.

The call itself needs an AI notice under the EU AI Act, which our German banking post explains. Put it in the Greeting Text on the Start Call node, and switch off Allow Greeting Interruption, which is on by default, so the whole notice plays. For speech, tick German or Spanish under Language Hints, which work with Dograh models or Deepgram Flux.

Where call data lives matters too, and our GDPR voice AI post covers the full picture. Dograh Cloud names no data region. Self-host the platform in an EU data centre, and run the speech and language models there as well, for call data to stay in the EU. Every call has a full trace, and QA scores a sample of calls you choose, so you can check the AI notice played on each one.

Where to start

Start with consent records, because no setting fixes a missing one. Then order numbers early, since German and Spanish document checks take time, and order 400 numbers for Spanish commercial calls. Build one telephony configuration per country, and test a German and a Spanish call to real phones before the first campaign.

Glossary

400 number
A Spanish number range reserved for commercial calls. Covered firms must use it for sales calls, it is outbound only, and it cannot be used for customer service.
Lista Robinson
Spain's advertising exclusion list. Marketers check numbers against it before a marketing call, unless the person consented to calls from them.
Automatic calling machine
A machine that places calls with no person on the line. Under the German UWG, advertising with one needs express consent, and the cautious reading treats an AI voice agent as one.
Telephony configuration
A carrier account connected to Dograh with its own phone numbers and default caller ID. Each campaign uses one, so a team keeps one per country.

Frequently Asked Questions

Get started with Dograh

Build, deploy, and scale AI agents with Dograh. Join the community of developers building the future.