Skip to content

extensions.conf: NODE Variable Breaks Contexts With More Than One Node on Server #156

@ve7fet

Description

@ve7fet

Describe the bug
When a node is created, node-setup sets the [global] variable NODE=<nodenumber> in extensions.conf.

This is all fine, when there is a single node on the server. However, when you add another node to the sever, that breaks contexts in extensions.conf.

Case in point, [iaxrpt]. If you have two nodes running on the box, you can only connect with IAXRpt (or any IAX client) to the first node that was setup (NODE=<nodenumber>). Attempting to connect to any other node on the server fails silently (no messages on the CLI).

This is because the stock context is:

[iaxrpt]
; Entered from iaxrpt in iax.conf
; Info: The X option passed to the Rpt application
; disables the normal security checks.
; Because incoming connections are validated in iax.conf,
; and we don't know where the user will be coming from in advance,
; the X option is required.
exten => ${NODE},1,rpt(${EXTEN},X)       ; NODE is the Name field in iaxrpt

So, when user iaxrpt connects, only the NODE global is passed to this context. If you are trying to connect to another node number running on the server, there is no matching extension for that in this context, so it just fails silently.

We need a better way to handle multiple nodes.

A workaround for this is to add another line to that context with the other node number(s):

[iaxrpt]
; Entered from iaxrpt in iax.conf
; Info: The X option passed to the Rpt application
; disables the normal security checks.
; Because incoming connections are validated in iax.conf,
; and we don't know where the user will be coming from in advance,
; the X option is required.
exten => ${NODE},1,rpt(${EXTEN},X)       ; NODE is the Name field in iaxrpt
exten => <secondnodenumber>,1,rpt(${EXTEN},X)       ; replace <secondnodenumber> with the actual additional node number

To Reproduce
Steps to reproduce the behavior:

  1. Add a second node to the server
  2. Configure an external application/client to connect to the second node number
  3. Fail silently (unable to connect, no messages in CLI)

Expected behavior
Be able to connect to any provisioned node number on the server with an external client.

Software versions (listed in asl-menu, option 4)

********** AllStarLink [ASL] Version Info **********

OS            : Debian GNU/Linux 12 (bookworm)
OS Kernel     : 6.12.34+rpt-rpi-v8

Asterisk      : 22.4.1+asl3-3.5.5-1.deb12
ASL [app_rpt] : 3.5.5

Installed ASL packages :

  Package                         Version
  ==============================  ==============================
  allmon3                         1.6.0-3.deb12
  asl3                            3.8-1.deb
  asl3-asterisk                   2:22.4.1+asl3-3.5.5-1.deb12
  asl3-asterisk-config            2:22.4.1+asl3-3.5.5-1.deb12
  asl3-asterisk-modules           2:22.4.1+asl3-3.5.5-1.deb12
  asl3-menu                       1.14-1.deb12
  asl3-pi-appliance               1.10.0-1.deb12
  asl3-update-nodelist            1.5.1-1.deb12
  cockpit                         287.1-0+deb12u3
  cockpit-bridge                  287.1-0+deb12u3
  cockpit-networkmanager          287.1-0+deb12u3
  cockpit-packagekit              287.1-0+deb12u3
  cockpit-pcp                     287.1-0+deb12u3
  cockpit-sosreport               287.1-0+deb12u3
  cockpit-storaged                287.1-0+deb12u3
  cockpit-system                  287.1-0+deb12u3
  cockpit-wifimanager             1.1.1-1.deb12
  cockpit-ws                      287.1-0+deb12u3
  dahdi                           1:3.1.0-2
  dahdi-dkms                      1:3.4.0-7.asl
  dahdi-linux                     1:3.4.0-7.asl

Have you run a software update and rebooted?

  • YES

What is the platform - e.g. Raspberry Pi 4, Raspberry Pi 5, Virtual Machine, Desktop, etc.

  • :Platform Pi 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions