Possible bug in provisioning PJSIP transports

Hi all,
I am using FreePBX 13.0.195.1 paired with Asterisk 13.18.3. There seems to be a bug in provisioning PJSIP transports.

Asterisk supports the following configurations:

  • A single transport bound to interface 0.0.0.0. If it is enabled, all the transports bound to specific interfaces are ignored.

  • Multiple transports bound to specific interfaces. This works if transport for 0.0.0.0 IS NOT enabled.

However, FreePBX allows enabling 0.0.0.0 and individual transports at the same time. This results in the following situation:

  • An individual transport may be selected for an extension or trunk

  • This individual transport will be rejected by Asterisk for the reason stated above with the following error:
    Unable to retrieve PJSIP transport 'x.x.x.x-udp'

In order to get aligned with Asterisk, FreePBX should automatically disable individual transports once a global one (0.0.0.0) is enabled for this protocol.
Should I raise a defect in JIRA? Or this logic described above is implemented deliberately?

Edit: ticket is here: https://issues.freepbx.org/browse/FREEPBX-17653 - mod

Hi all,
Are there any comments on this item?

Thanks.

Just tested and I am not seeing any issue. In the GUI, I’ve enabled udp for multiple interfaces as well as 0.0.0.0, i.e.:

image

The above config results in these lines in pjsip.transports.conf as expected:

[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
*snip*

[10.10.26.36-udp]
type=transport
protocol=udp
bind=10.10.26.36
*snip*

[10.8.0.1-udp]
type=transport
protocol=udp
bind=10.8.0.1
*snip*

After restarting and reloading asterisk:

34693894*CLI> pjsip show transports

Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress....................>
==========================================================================================

Transport:  0.0.0.0-tcp               tcp      3     96  0.0.0.0:5060
Transport:  0.0.0.0-tls               tls      3     96  0.0.0.0:5061
Transport:  0.0.0.0-udp               udp      3     96  0.0.0.0:5060
Transport:  0.0.0.0-ws                 ws      3     96  0.0.0.0:5060
Transport:  0.0.0.0-wss               wss      3     96  0.0.0.0:5060

Objects found: 5

@lgaetz,

Now try to select transport 10.10.26.36 for an extension.
FreePBX should allow this as the related transport is enabled.
However, in Asterisk such a transport does not exist (although created in config file), so that you would get an error “Unable to retrieve PJSIP transport” and non-working endpoint.

Or does it work differently for you?

1 Like

Ah, yes, I see the same, so confirmed bug. I think the fix here is as you say, to validate the bindings in Asterisk SIP settings. Please open a Jira and it will be triaged on Monday.

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