0

I have been messing around with Asterisk for a few days, I am enjoying it, but I recently just thought of a potentially simpler way to achieve what I want, but I don't really know if it's possible.

Is it possible to match two smartphones over LTE using their IPs?

So, you'd just get their IPs programmatically, send those IPs to a server, and have the server connect them. Is this possible?

Any insight would be appreciated!

Nolan Anderson
  • 576
  • 1
  • 6
  • 15

1 Answers1

0

As with anything in telecommunications, it depends on your carrier :-)

Some carriers provide native IPv4 addresses and do not NAT them. In this case, your server could use the IPs to determine the node endpoints. However, given the IPv4 shortage, more than likely, your carrier, as with many an ISP in general, is both NATing the IP, and likely firewalling unsolicited inbound traffic. This makes it hard for you in two ways. First, the IP/port combination you have is not guaranteed to be uniquely yours for the connection -- it can change "between flows". Second, even if you did know the IP, it's unlikely you'd ever be able to directly reach the mobile.

Something like this might be a better idea:

  1. Mobile A establishes a session, we will assume it has a NATed, firewalled, IPv4 address
  2. Mobile B does the same Mobile A opens a TCP session to the server -- it must be TCP because firewalls are more permissive with that.
  3. Mobile B opens a TCP session to the server
  4. The server now has two active sockets, regardless of their address to tie users to.

Some carriers provide a "wake up" mechanism to raise a mobile to have it "call a server back" eliminating the need for a server to have a fixed address for the mobile. It may be SMS, it may be through some integrated solution. Remember, the carrier knows exactly where the mobile is and it's current IP arrangement -- it gave that arrangement to the mobile. If you can ask the carrier, the server gets what it needs.

user500123
  • 617
  • 6
  • 14