[Home]

Summary:ASTERISK-24858: [patch]Asterisk 13 PJSIP sends RTP packets in wrong byte order on Intel platform when using slin codec
Reporter:Frankie Chin (fchin)Labels:
Date Opened:2015-03-09 18:59:14Date Closed:2017-02-01 14:51:13.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Codecs/General Core/RTP Resources/res_rtp_asterisk
Versions:13.0.0 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-26611 res_rtp_asterisk: Fix byte order on non-8kHz signed linear
is related toASTERISK-25684 codec: Translation of slin16 results in noise
Environment:Attachments:( 0) extensions_A.conf
( 1) extensions_B.conf
( 2) full_corrupt
( 3) full_good
( 4) pjsip_A.conf
( 5) pjsip_B.conf
( 6) slinear-conf.tgz
Description:Setup:
I have two Asterisks registered to one another via PJSIP using only "slin" codec.   One PhonerLite softphone A is registered to Asterisk A using "ulaw" codec. Another softphone B is registered to Asterisk B using "ulaw" codec. Note: PhonerLite doesn't support slinear codec.

Test:
Softphone A dials an extension into Asterisk A, which will dial another extension into Asterisk B, which eventually dials Softphone B. The voice coming out from Softphone B is corrupted.

Comments:By: Frankie Chin (fchin) 2015-03-09 19:02:44.212-0500

I'll provide debug log and configuration files later, as well as my findings.

By: Rusty Newton (rnewton) 2015-03-12 08:51:06.995-0500

Setting the status to "Waiting on Feedback"

Please use "Send Back" or "Enter Feedback" once you have the additional debug and config files. Thanks.

By: Frankie Chin (fchin) 2015-03-13 00:40:10.188-0500

Attached configuration and log files.
Softphone A is the endpoint 2000 in pjsip_A.conf
Softphone B is the endpoint 1000 in pjsip_B.conf
Asterisk A is the endpoint peer_1_238 in pjsip_B.conf
Asterisk B is the endpoint peer_2_178 in pjsip_A.conf
full_corrupt is the debug log file.

I managed to "fix" the issue by modifying rtp_engine.c, res_pjsip_sdp_rtp.c and res_rtp_asterisk.c. The attached full_good is the log file after this fix. I'll put my patch up into the review board.

By: Rusty Newton (rnewton) 2015-03-13 18:03:15.059-0500

Thanks, you should attach your patch to the JIRA issue as well and then you should submit your patch for code review. To do so, please follow the Code Review [1] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines [2]
* Review the Code Review Checklist [3] for common items reviewers will look for
* If necessary, provide tests for the Asterisk Test Suite that verify the correctness of your patch [4]

When ready, submit your patch and any tests to Review Board [5] for code review.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[3] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation
[5] https://wiki.asterisk.org/wiki/display/AST/Review+Board+Usage



By: Jacek Konieczny (jkonieczny) 2016-07-20 05:32:59.957-0500

The problem is still there and the 'jet engine noise' played instead of regular audio is quite annoying.

The year old patch from https://reviewboard.asterisk.org/r/4505/ still applies cleanly and fixes the problem for me.

By: Sean Bright (seanbright) 2017-01-27 16:35:16.250-0600

I am fighting with this issue myself right now and have a test environment where I can easily test patches. I haven't applied the patch in Reviewboard because Matt seemed to indicate that it was not the appropriate way forward.

By: Sean Bright (seanbright) 2017-01-30 07:23:28.379-0600

I've attached slinear-conf.tgz which is as stream-lined of an asterisk configuration as I could come up with. Register as slinear/slinear, set your codec prefs of your softphone only allowing L16/8000 and dial any number (e.g. 1234).

By: Friendly Automation (friendly-automation) 2017-02-01 14:51:14.261-0600

Change 4843 merged by zuul:
res_rtp_asterisk:  Swap byte-order when sending signed linear

[https://gerrit.asterisk.org/4843|https://gerrit.asterisk.org/4843]

By: Friendly Automation (friendly-automation) 2017-02-01 15:00:15.694-0600

Change 4853 merged by Joshua Colp:
res_rtp_asterisk:  Swap byte-order when sending signed linear

[https://gerrit.asterisk.org/4853|https://gerrit.asterisk.org/4853]

By: Friendly Automation (friendly-automation) 2017-02-01 15:37:17.628-0600

Change 4854 merged by Joshua Colp:
res_rtp_asterisk:  Swap byte-order when sending signed linear

[https://gerrit.asterisk.org/4854|https://gerrit.asterisk.org/4854]

By: Friendly Automation (friendly-automation) 2017-06-06 08:51:10.832-0500

Change 5729 merged by Jenkins2:
format: Reintroduce smoother flags

[https://gerrit.asterisk.org/5729|https://gerrit.asterisk.org/5729]

By: Friendly Automation (friendly-automation) 2017-06-06 08:58:31.890-0500

Change 5730 merged by Jenkins2:
format: Reintroduce smoother flags

[https://gerrit.asterisk.org/5730|https://gerrit.asterisk.org/5730]

By: Friendly Automation (friendly-automation) 2017-06-06 09:01:12.475-0500

Change 5731 merged by Jenkins2:
format: Reintroduce smoother flags

[https://gerrit.asterisk.org/5731|https://gerrit.asterisk.org/5731]