I have a proposed solution design for emergency number handling and need some feedback on the approach taken.
In each country one site is designated for forwarding of all emergency calls. So if we take Spain as an example:
The designated site is Madrid.
A person in the Barcelona office dials the emergency number from an IP handset.
The call is routed across an IP WAN as a VoIP call to the Madrid site.
The voice gateway at the Madrid site forwards the call into the PSTN.
In order for the call to be processed successfully we need to ensure the caller id (ANI or CLI) is preserved when the call enters the PSTN in Madrid. This is needed to ensure the emergency services call centre are able to identify where the call was made. In this example they will need to know that the caller is actually in Barcelona and not Madrid even though the call is being presented into the PSTN from Madrid.
The key question I have is will the Telco rewrite the caller id because the PSTN trunk is physically connected in Madrid?
In other words do Telco's who provide PSTN circuits insist that any caller id is physically linked in some way to the location of the PSTN trunk?
As Paulo said, service providers will normally (and should normally) override any unexpected numbers that you present as calling numbers.
In the UK, this generally means that you can advertise out any DDI numbers that you have associated with the circuit that is carrying the call. If you try to advertise something else, it will get overwritten with the default number for that circuit.
This is to prevent you masquerading as someone else, not just to the Emergency services but to prevent various scams that would become possible.
That said, I have seen circuits (for example a Vodafone QSIG circuit that allowed me to present 4-digit extension numbers to the PSTN or any other number I send out) that may have different rules - these rules would be defined by the service provider. It's also possible by agreement with the service provider to advertise out other numbers.
When it comes to the emergency services, the safe rule is that you route the call out to the PSTN at the general location of the person who has dialled 999/911/112. You send the call out at Madrid, the call may be traced back to Madrid, and if the person making the call can't give their location information for whatever reason that is where the ambulance may be sent - so if that person is in Barcelona they'll be waiting a while to hear the sirens.
If you are dealing with multiple countries then this probably gets a lot more complicated - for example in the US they have an 'e911' service that traces calls back to physical locations - there is a Cisco product 'Cisco Emergency Responder' designed to work with this. That product in the UK becomes a chocolate fireguard out emergency services use a different system. I imagine there are different mechanisms in many different countries.
Given the language barriers, very careful configuration of calling numbers, reliance on those calling numbers being presented properly, and importance of emergency calls... the simple solution is the best.
Why would you want to route all emergency calls out centrally anyway? Do you have no PSTN on the local sites?