[asterisk-users] Sending Calls via SIP trunk from two different IP addresses from same Asterisk Machine
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Sun Feb 1 15:40:29 CST 2009
On Sunday 01 February 2009 14:39:11 Jeff LaCoursiere wrote:
> Actually I think that is a good idea. In sip.conf setup the two remote
> ends on different IPs (one of which is actually bogus). Outbound NAT
> based on the destination, where you change the source IP to the one
> expected by the provider, and change the bogus destination to the real
> one. Inbound NAT back to the base address based on the destination in the
> reply.
>
> Now THAT is a hack.
And it probably won't work. SIP is a known protocol which violates layer
separation, encoding IP addresses directly into the application layer. Unless
your firewall were able to DPI and modify the addresses within the application
layer (which may or may not work, depending on whether Asterisk encodes the
message with IP addresses or hostnames), then the whole exercise is doomed
to fail.
One way which does occur to me that will work, if the OP only needed exactly
2 different addresses, would be to set the bindaddr and tcpbindaddr to
different addresses, and send TCP signalling for one peer and UDP signalling
for the other. Again, this would only work for exactly 2 peers, not for more.
The current code uses a separate socket for each of TCP, TLS, and UDP
connections, so this would be the maximum possible without any code changes.
One could probably use multiple TCP descriptors without a lot of work.
--
Tilghman
More information about the asterisk-users
mailing list