Got a basic question:
Let’s say that I’m calling from my office using sip phone in Toronto to an analog phone in Jamaica.
Behind the scenes:
My sip phone connects to an Asterisk box in Calgary(IP) which connects to a PSTN.
In this scenario, to make it cheaper/logic, the asterisk box in Calgary should send the call to another VOIP server in Jamaica, instead of using PSTN.This server in Jamaica should use local call(PSTN) to the destination.
My question is:
How does Asterisk in Calgary know that he needs to send the call to a Jamaican territory? Who determines the path? How does asterisk know the nearest voip server to the destination?