First of all, I have two Asterisk servers A & B.
I would like to let my Asterisk server A acts as a proxy server, so it can redirect SIP messages “registration, invite, etc…” and RTP media to Asterisk server B.
However, at this case I want to register my extensions throw the server A but finally the registration and config file of the endpoints will be in Asterisk server B. I really hope that I cleared it well XD.
EDITE: My main purpose is to build a proxy server that can just redirect SIP messages “registration, invite, etc…” and RTP media to Asterisk server, so when I’m trying to register on this proxy server, it will send the registration to the Asterisk server which has the endpoint config files and can match the authentication of this request.
Asterisk is a back to back user agent. It is not a proxy server. You need to remove the Asterisk requirement, from your specification, or detail you higher level goals, so that people can suggest solutions that are within the scope of Asterisk.
Ok, mainly I want to register to local Asterisk server throw proxy server which is on cloud, so I need to do it for security purpose to let the public IP address of Asterisk is hidden.
It sounds like you want OpenSIPS or Kamailio, then. Or you don’t use things as a proxy of messages, and run two Asterisk instances that are independently configured.
On Thursday 21 March 2024 at 12:57:49, Omarito via Asterisk Community wrote:
Ok, mainly I want to register to local Asterisk server throw proxy
server which is on cloud, so I need to do it for security purpose to let
the public IP address of Asterisk is hidden.
So, you want your users to register to a public IP address of some machine “in
the cloud” in order to hide from them the public IP address of your Asterisk
server?
What are you trying to achieve here? What advantage does telling your users
one IP address instead of the other have?
Antony.
–
If you ask a Yorkshireman whether he knows the German word for “egg”,
don’t be surprised if he just smiles and says “Aye”.
Just in case I want to extend and build more than one PBX. With that I suppose this way could be useful to relay SIP messages to each Asterisk server without huge cost on the cloud.
On Thursday 21 March 2024 at 14:13:27, Omarito via Asterisk Community wrote:
Just in case I want to extend and build more than one PBX. With that I
suppose this way could be useful to relay SIP messages to each Asterisk
server without huge cost on the cloud.
So, that’s a totally different reason than “security”.
I agree with Joshua that Kamailio (or OpenSIPS) fits this requirement well.
There’s quite a bit of documentation on the Internet about combining Kamailio
with Asterisk, and for further details you’d probably be best off asking the
Kamailio project.
Antony.
–
It may not seem obvious, but (6 x 5 + 5) x 5 - 55 equals 5!