Attach to specific IP (or at least identify which IP ASL is using)

My Pi has 2 IP addresses (1 from eth0 and the other from wlan0). The Wifi connection connects to an AREDN router which is in the same VLAN as other ASL nodes/servers. But I can’t get any other node on the same VLAN to connect or be able to be connected to.

This is my [nodes] stanza from the one on the Pi I’m discussing:

1100 = radio@10.150.180.35/1100,NONE ; Local node
1101 = radio@10.48.13.20/1101,NONE ; Remote node
1102 = radio@10.150.180.37/1102,NONE ; Remote node
1103 = radio@10.150.180.36/1103,NONE ; Remote node

1100 is the one. I tried radio@127.0.0.1 but that just attaches to localhost. I would have thought using the IP of wlan0 (10.150.180.35) would attach ASL to that IP but it doesn’t seem to help

When I had node 1100 on it’s own dedicated Pi (with only 1 active NIC), everything worked fine. But I’m trying to consolidate things

Ken, If I read this correctly, you have 4 nodes each on it’s own IP. If that is correct, each node would have the following [nodes] stanza

; This is on node 1100

1100 = radio@127.0.0.1/1100,NONE ; Local node
1101 = radio@10.48.13.20/1101,NONE ; Remote node
1102 = radio@10.150.180.37/1102,NONE ; Remote node
1103 = radio@10.150.180.36/1103,NONE ; Remote node

; This is node 1101

1101 = radio@127.0.0.1/1101,NONE ; local node
1100 = radio@10.150.180.35/1100,NONE ; remote node
1102 = radio@10.150.180.37/1102,NONE ; Remote node
1103 = radio@10.150.180.36/1103,NONE ; Remote node

and so on.

That is correct. Each node has the appropriate [nodes] stanza(s). As I said, everything was working fine before I moved the “hub” ASL to the “shared” Pi

What error do you get?
Show the output of netstat -unap on the hub

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:2074 0.0.0.0:* 1720/ispeaker
udp 0 0 0.0.0.0:2075 0.0.0.0:* 1720/ispeaker
udp 0 0 0.0.0.0:68 0.0.0.0:* 25943/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 378/dhclient
udp 0 0 0.0.0.0:5198 0.0.0.0:* 31590/asterisk
udp 0 0 0.0.0.0:5199 0.0.0.0:* 31590/asterisk
udp 0 0 0.0.0.0:58966 0.0.0.0:* 419/avahi-daemon: r
udp 0 0 0.0.0.0:39529 0.0.0.0:* 1723/imike
udp 0 0 0.0.0.0:5353 0.0.0.0:* 419/avahi-daemon: r
udp 0 0 0.0.0.0:4569 0.0.0.0:* 31590/asterisk
udp6 0 0 :::5353 :::* 419/avahi-daemon: r
udp6 0 0 :::35235 :::* 419/avahi-daemon: r

Look at iax.conf

[general]
bindport = 4569 ; bindport and bindaddr may be specified
; NOTE: bindport must be specified BEFORE
; bindaddr or may be specified on a specific
; bindaddr if followed by colon and port
; (e.g. bindaddr=192.168.0.1:4569)

; bindaddr = 192.168.0.1 ; more than once to bind to multiple
; addresses, but the first will be the
; default

Don’t use wlan0 and eth0 at the same time. Either use hardwired or wireless not both.

The Pi is fully capable of doing so. Why not?

Did you look at iax.conf?
OK, let me be more “complete” Asterisk or more precisely. IAX will bind to the first interface presented, which in your case is the wired Ethernet. You have 2 choices, either change the order the interfaces come up or change the bind address in iax.conf. If you want to see this in action, disable the wired interface and try to connect to the RPi on the WiFi address.

Aha! Ok, bind to the wlan0 IP in iax.conf and it’s all good. Thanks!

(another lesson learned)

A problem ‘might’ exist if you are operating a Pi node mobile tethered to a smartphone.
As the pi will try the next connection in your connection list on failure. Which often happens during slow tower switching events.

In this case, to save time, you would only want 1 connection described. Or you will have to wait for all the connection descriptions to time-out before the desired connection is tried again.

I used a old linksys router loaded with ddwrt and tethered it to the smartphone and a wired connection to the Pi. The wired connection is the same as the one in the house. So it only has one connection description. And is faster than using the Pi’s wifi interface.