Multihomed client: internal (wifi) and external(4g + nat)

Dear all,

I’m trying to deploy a pbx for allowing softphones in mobile devices to work:

  1. From internal wifi network when connected.
  2. From anywhere (4g/other connection) when disconnected or out of range.

Details of the deployment:

  • asterisk v16.4.0 with bundled PJSIP, ICE enabled in RTP and endpoints, directmedia=no
  • Independent network card for internet access via NAT (
  • Independent network card for Wifi network (
  • Softphone registration: I’m using a DNS pointing to the external IP address.

I succeded to make it to work with NAT loopback enabled in the router but in the Wifi the RTP flow like this:

normal endpoint <-> pbx to <-> external router <-> pbx <-> external router <-> multihomed endpoint

Should not ICE handle this situation and avoid using the external router for connecting the endpoints?

The IP address configured in the Wifi network interface is offered as a candidate:

a=candidate:Hc0a801c8 1 UDP 2130706431 12370 typ host

Should not asterisk directly connect using this interface instead external router?

I found this other thread 74276, but it’s related to handoff from 4g to wifi, in this case it’s not required.

Best Regards.

You’d need to show the actual SIP traffic and a packet capture. You can also enable debug in logger.conf and set it to level 3 (core set debug 3) which will output what the PJNATH ICE implementation is doing.

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