Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Q931 correctness fixes #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

laf0rge
Copy link

@laf0rge laf0rge commented Sep 19, 2023

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 ([email protected]) 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
Copy link
Author

laf0rge commented Dec 3, 2023

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