Hassan is right that this is why SBCs exist :)
However, I think if you were to use the sip-address-srv option, then use split DNS setting up external DNS resolution to the public IP and internal DNS to the private IP, then I think it might work... Of course you'll need access to the DNS for the FQDN....
sip-address-srv
Default Value: No default value
Valid Values: Valid Fully Qualified Domain Name (FQDN)
Changes Take Effect: After SIP Server restart
Related Feature: "DNS Name Resolution" on page 217
When specified, SIP Server can use this FQDN as its own contact for the DNS
name resolution procedure
Attention! This value will be inserted in the Contact and Via header fields of
all outgoing SIP messages.
------------------------------
Jason McLennan
Commonwealth Bank of Australia
------------------------------
Original Message:
Sent: 03-10-2021 09:56
From: Adam Mazur
Subject: Trying to get inbound calls to provide treatment using SIP Server installed on AWS EC2 instance
I have an AWS EC2 instance where I installed SIP Server, RM/MCP in order to provide treatments. When I call internally everything works fine, however when I try to play the same treatment when calling from the outside it always fails.
After doing some more research / troubleshooting I have found that the problem is that the IP that SIP Server is binding to is the private IP of my EC2 instance so my external provider cannot respond back. When I try to change my SIP Server 'sip-address' to instead be the public IP, SIPServer will not even start because it is not a "physical" IP interface and therefore SIPServer cannot bind to it.
I have to believe that there is someone out there that was able to get this to work using an AWS EC2 instance. I have searched everywhere but have been unable to find a solution. Please help!
#SIP/VolP
------------------------------
Adam Mazur
Systems Analyst
------------------------------