Skip to content

Various Q931 correctness fixes - #5

Open
laf0rge wants to merge 5 commits into
yatevoip:masterfrom
osmocom:q931fixes
Open

Various Q931 correctness fixes#5
laf0rge wants to merge 5 commits into
yatevoip:masterfrom
osmocom:q931fixes

Conversation

@laf0rge

@laf0rge laf0rge commented Sep 19, 2023

Copy link
Copy Markdown

Sicne we started to use yate in the Osmocom OCTOI (Osmocom Community TDM over IP) network, we encountered a number of problems in the Q.931 implementation while interoperating with a variety of EuroISDN equipment.

This pull request fixes those Q.931 bugs.

If yate is operating in the 'network' role of a PRI interface,
it must send a valid ChannelID InformationElement in the SETUP ACK.

However, current yate code is encoding the channel selection field
of said information element wrong, as it unconditionally looks up
the s_dict_channelIDSelect_BRI (instead of _PRI).

This fixes a regression introduced in 2009 in the following commit:

commit 05b717e0b94ca682a40c7685ef9b9442a6c1820a
Author: paulc <paulc@acf43c95-373e-0410-b603-e72c3f656dc1>
Date:   Mon Mar 2 18:51:30 2009 +0000

ISDN BRI support, most Andrei's (andrei@null.ro) work.
Fixes and new features throughout the signalling engine.
it-svn-id: http://yate.null.ro/svn/yate/trunk@2505 acf43c95-373e-0410-b603-e72c3f656dc1
This is important so udi/rdi doesn't get converted to speech.
The user may suggest a given channel in the SETUP, but it's not legal
for the network to return a non-mandatory ChannelID.

See Q.931 Section 5.1.2 (B-channel selection - Originating):

The selected B-channel is indicated in the Channel identification information
element coded as "channel is indicated, no acceptable alternative" in the first
message returned by the network in response to the SETUP message (i.e. a SETUP
ACKNOWLEDGE or CALL PROCEEDING message)
…s mandatory

The user may suggest a given channel in the SETUP, but it's not legal
for the network to return a non-mandatory ChannelID.

See Q.931 Section 5.1.2 (B-channel selection - Originating):

The selected B-channel is indicated in the Channel identification information
element coded as "channel is indicated, no acceptable alternative" in the first
message returned by the network in response to the SETUP message (i.e. a SETUP
ACKNOWLEDGE or CALL PROCEEDING message)

In an earlier commit I had only fixed SETUP ACK, but missed that this is
a more general problem that needs addressing in whatever is the first
message containing a channelID yate sends in response to the SETUP.
@laf0rge

laf0rge commented Dec 3, 2023

Copy link
Copy Markdown
Author

Dear yate team, it has been multiple months without any feedback here. Do you have any change requests? We're more than haappy to adjust our patches if you have any.

I believe all of those fixes address real bugs in yate's Q.931 code!

Surely, the treatment of the *called* party type/plan should
not depend on the *calling* party type/plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant