[Home]

Summary:ASTERISK-28417: SDP negotiation issue
Reporter:Alan (lameventanas)Labels:pjsip
Date Opened:2019-05-14 07:35:18Date Closed:2019-06-04 12:00:03
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General Resources/res_pjsip_sdp_rtp
Versions:13.26.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:LinuxAttachments:
Description:I compiled Asterisk 13.26.0 with external pjsip 2.6.

Asterisk is in the same network as 2 phones:
extension 11: software phone based on pjproject 2.8
extension 02: hardware phone Grandstream GXV3240

When 11 calls 02, audio works well but the video looks terrible.

extract of SDP from 11 to Asterisk:
m=video 4014 RTP/AVP 97 96
c=IN IP4 10.6.0.254
b=TIAS:256000
a=rtcp:4015 IN IP4 10.6.0.254
a=sendrecv
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01e; packetization-mode=1
a=rtpmap:96 H263-1998/90000
a=fmtp:96 CIF=1;QCIF=1
a=ssrc:1987299971 cname:719547ff01003a20

extract of SDP from Asterisk to 02:
m=video 4014 RTP/AVP 97 96
c=IN IP4 10.6.0.254
b=TIAS:256000
a=rtcp:4015 IN IP4 10.6.0.254
a=sendrecv
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01e; packetization-mode=1
a=rtpmap:96 H263-1998/90000
a=fmtp:96 CIF=1;QCIF=1
a=ssrc:1987299971 cname:719547ff01003a20

extract of SDP from 02 to Asterisk:
m=video 5006 RTP/AVP 99
a=sendrecv
a=rtcp:5007 IN IP4 10.6.0.244
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=42E014; packetization-mode=1
a=content:main
a=label:11

extract of SDP from Asterisk to 11:
m=video 19562 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=42E01E
a=sendrecv

At this point the profile-level-id changed from 2.0 to 3.0.
Could this be causing the video issue?
Comments:By: Asterisk Team (asteriskteam) 2019-05-14 07:35:19.385-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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: George Joseph (gjoseph) 2019-05-15 08:29:34.559-0500

Hi Alan,

I'm not sure what causes the profile id to change or if it may be causing the issue but I do know that pjproject 2.6 is pretty old and we do use pjproject to build the SDP.  Is there a reason you're not building Asterisk with the bundled pjproject 2.8?


By: Alan (lameventanas) 2019-05-15 14:07:25.451-0500

Building with external pjproject 2.8 results in pjsip modules that won't load due to missing symbols.

If I try to build with the bundled pjproject I get this error:
...
  [LD] libasteriskpj.o -> libasteriskpj.so.2
/usr/bin/ld:libasteriskpj.exports:1: ignoring invalid character `-' in script
/usr/bin/ld:libasteriskpj.exports:1989: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:287: libasteriskpj.so.2] Error 1
make: *** [Makefile:387: main] Error 2

Checking libasteriskpj.exports I see:
-e {
global:
PJSIP_EINVAL_ERR_EXCEPTION;
...

The Makefile rule that produced this is:
libasteriskpj.exports: $(ASTTOPDIR)/$(PJPROJECT_DIR)/pjproject.symbols
       $(ECHO_PREFIX) echo "   [GENERATE] libasteriskpj.exports"
ifeq ($(GNU_LD),1)
       $(CMD_PREFIX) echo -e "{\nglobal:" > libasteriskpj.exports
       $(CMD_PREFIX) sed -r -e "s/.*/$(LINKER_SYMBOL_PREFIX)&;/" $(ASTTOPDIR)/$(PJPROJECT_DIR)/pjproject.symbols >> libasteriskpj.exports
       $(CMD_PREFIX) echo -e "$(LINKER_SYMBOL_PREFIX)ast_pj_init;\n" >> libasteriskpj.exports
       $(CMD_PREFIX) echo -e "local:\n*;\n};" >> libasteriskpj.exports
endif

If I replace echo with /bin/echo, it works.  I'm using GNU make 4.2.1. I think "echo" is a builtin that interprets escape sequences but doesn't take "-e" as a parameter.

Anyway, after fixing this and building with the bundled pjproject, the behavior with the SDP is exactly the same and the video still looks bad.

By: Benjamin Keith Ford (bford) 2019-05-20 14:55:59.970-0500

We'll have to try and narrow down the problem. Can you test this with 2 of the same kind of phone? Either 2 soft phones or 2 Grandstreams, and check the SDP for those scenarios? Also, if possible, it may be worth trying in 16 as a lot of video work was done in that version. Although 16 is dealing more with multiple streams, if it does help the situation, we would have a better idea of where to look for the problem.

By: Asterisk Team (asteriskteam) 2019-06-04 12:00:02.511-0500

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

By: Alan (lameventanas) 2019-06-04 20:11:26.408-0500

I have tested many times between 2 softphones and 2 Grandstreams and I never saw this problem before.
By the way, this even happens with the pjsua client shipped with pjproject 2.8.

I'll try to test with Asterisk 16, but it will take some time.



By: Asterisk Team (asteriskteam) 2019-06-04 20:11:26.682-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Chris Savinovich (csavinovich) 2019-06-10 17:03:53.157-0500

>>> I'll try to test with Asterisk 16, but it will take some time.

This issue was opened automatically by the system due to you commenting on it last.
As per your last comment, status is pending of your test.

Chris


By: Asterisk Team (asteriskteam) 2019-06-25 12:00:02.225-0500

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