[Home]

Summary:ASTERISK-25487: chan_ooh323: Error Decoding H245 Message
Reporter:Grant Murdock (emdk)Labels:
Date Opened:2015-10-22 10:29:21Date Closed:2020-01-14 11:13:30.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Addons/chan_ooh323
Versions:13.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u5 x86_64 GNU/LinuxAttachments:( 0) core_show_threads.rtf
( 1) h323_log
( 2) ooh323issues.pcap
Description:OOH323 isn't responding to TCS from remote end.  Lack of TCS AWK from Asterisk results in TCS timeout (standard timeout of 5 seconds) and the clearing of the call.

Error:

Asn1Error: -2 at ooh323c/src/decode.c:67
10:21:02:814  Error decoding H245 message (outgoing, ooh323c_o_1)
10:21:02:814  msgCtxt Reset? Done (outgoing, ooh323c_o_1)
10:21:02:883  Receiving H245 message
10:21:02:883  Complete H245 message received (outgoing, ooh323c_o_1)
10:21:02:883  Received H.245 Message = {
10:21:02:883                          response = {
10:21:02:883                             terminalCapabilitySetAck = {
10:21:02:884                                sequenceNumber = {
10:21:02:884                                   2
10:21:02:884                                }
10:21:02:884                             }
10:21:02:885                          }
10:21:02:885  }
10:21:02:885  ERROR: unbalanced structure
Comments:By: Asterisk Team (asteriskteam) 2015-10-22 10:29:22.957-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Grant Murdock (emdk) 2015-10-22 10:30:57.789-0500

h323_log with tracelevel=6 in the ooh323.conf [general] section.
Wireshark trace of failed call.

By: Rusty Newton (rnewton) 2015-10-22 18:45:49.762-0500

Assigning to Alexander for triage.

By: Alexander Anikin (may213) 2015-10-24 07:18:47.352-0500

Hello,

From first view there is error of decoding second TCS from called side after empty TCS that mean reestablish TCS&MSD exchange.
Decode error found on proccessing g729AB cap:

                   Item 5
                       CapabilityTableEntry
                           capabilityTableEntryNumber: 6
                           capability: receiveAudioCapability (4)
                               receiveAudioCapability: g729AnnexAwAnnexB (15)
                                   g729AnnexAwAnnexB: 2

Its interesting that same cap was decoded without errors from fist TCS.

Could you disable g729 codec at answered side for test?


By: Grant Murdock (emdk) 2015-10-24 07:50:49.607-0500

Hi,

Thanks for looking at this for me.  Unfortunately, I cannot disable G729 on the remote end and I too find it interesting that sometimes it works and sometimes it doesn't.  Installing the open source G729 codec doesn't work either.  My ooh323.conf file is explicitly configured to allow ulaw and alaw with 40 ms packetization because my initial tests indicated that the remote end wanted 40 ms, Asterisk wanted 20 ms, and neither of them wanted to auto-frame.  

By: Rusty Newton (rnewton) 2015-11-21 13:30:45.471-0600

I haven't seen any activity here since Oct 15th. [~may213] is this a bug that you will end up investigating?  I'm trying to figure out if we should still have this issue in triage or if we should open it up.

Thanks!

By: Alexander Anikin (may213) 2015-11-22 05:22:42.484-0600

Hi Rusty,
Hi Grant


Sorry for long silence,

I'm confused little bit here. This issue isn't easy to investigate and i suggest porblem is not in OOH323 channel driver but i can wrong about it.

My suggestion based on that some time it work but not always, it could be depend from another components of asterisk.

But we will continue investigation here.


By: Alexander Anikin (may213) 2015-11-22 05:33:24.315-0600

Grant,

Could you please inform which modules/protocol stack you use on another legs of problematic calls?
Also please attach here 'core show threads' from asterisk.

And additional question. Could you please to disable video support on opposite side from asterisk? May be problem here is in parsing of video codecs from TCS


By: Grant Murdock (emdk) 2015-11-23 06:33:09.547-0600

Asterisk 'core show threads'

By: Grant Murdock (emdk) 2015-11-23 06:37:26.578-0600

Video can't be disabled on the remote end, unfortunately.  The asterisk box is very lean, only used for SIP audio to H323 audio translation and I am using the IAX2 protocol for direct client registration from my phone for testing, but that's it.

The wireshark sniff indicates that it doesn't respond to the TCS sent from the remote end.  Oddly enough, *sometimes* it will work and calling the remote end device using SIP works out of the box.  However, I need it in H323 flavor.


By: Alexander Anikin (may213) 2015-11-23 16:56:24.665-0600

Grant,

As I see you use res_timing_pthread as timing module in asterisk.
Could you change it to res_timing_timerfd module and disable res_timing_pthread module?
I had some problem with pthread timing module and switch to timerfd. I'm not sure that it will solution of your problem but please try it.


By: Grant Murdock (emdk) 2015-11-24 06:46:02.618-0600

Hi Alexander,

I've disabled the res_timing_pthread module and loaded the res_timing_timerfd module through the modules.conf file.  Verification that it was loaded was done with the `module show like res_timing` command.  Unfortunately, no change.

By: Rusty Newton (rnewton) 2016-01-20 16:08:36.076-0600

I don't know if there is much more we can do here. I'll ping Alexander to see if has any further ideas.

By: Alexander Anikin (may213) 2016-01-21 17:33:40.594-0600

Hi Rusty and Grant,

I will continue to understand about bug(s) here but I don't known if the issue is actual now for reporter.

Grant,

if it possible could you test same issue with previous asterisk version, 11 or 10 even? If the issue is related to another asterisk components
then result may be different with 13, if issue is OOH323 related only it will be same.

As a next step we can set trap breakpoint in decode.c at failure point (string #67) then analyze asterisk core file. I will need pcap file also there.



By: Asterisk Team (asteriskteam) 2016-02-05 12:00:19.335-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines