How to let Asterisk acts as a proxy server

Hello Dears,

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.

Thanks in advance,

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.

Thanks Devid, I’ve edited my post.

So, is it more obvious or you need something more?

It still doesn’t explain why.

Asterisk is not something that can do the “how” that you have described.

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.

Fine, now how should I integrate Kamailio as a proxy server with Asterisk SIP server?
Excuse my low experience of these things.

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”.

                                               Please reply to the list;
                                                     please *don't* CC me.

As I mentioned it just for more security purposes on WAN. I’m really hope if you can help me with any advice in this case.

Thank you

You’ve already created a point of failure in the cloud, Why not put the whole \PABX function in the cloud, and have just the one, cloud, Asterisk.

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!

                                               Please reply to the list;
                                                     please *don't* CC me.

Well, I’ll check that Kamailio register proxy server and see how it gonna be relay SIP registration messages to the Asterisk server.

Thank you very much for these advices.

You can start here…

https://kb.asipto.com/asterisk:index

Thank you I’ll check it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.