Bug 211533 - net/pjsip update to 2.5.5 and add option for pjsua
Summary: net/pjsip update to 2.5.5 and add option for pjsua
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-08-02 20:27 UTC by Joseph Mingrone
Modified: 2016-09-12 15:27 UTC (History)
0 users

See Also:
madpilot: maintainer-feedback+


Attachments
svn diff to update net/pjsip to version 2.5.5 (4.03 KB, patch)
2016-08-02 20:27 UTC, Joseph Mingrone
no flags Details | Diff
New diff (3.79 KB, patch)
2016-08-04 09:13 UTC, Guido Falsi
no flags Details | Diff
svn diff to be used as a possible starting point for adding pjsua support (2.28 KB, patch)
2016-08-14 22:32 UTC, Joseph Mingrone
no flags Details | Diff
proposed patch (6.80 KB, patch)
2016-09-07 16:41 UTC, Guido Falsi
madpilot: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mingrone freebsd_committer freebsd_triage 2016-08-02 20:27:41 UTC
Created attachment 173202 [details]
svn diff to update net/pjsip to version 2.5.5

portlint: OK
testport: OK (poudriere: 9.3-RELEASE-p44, i386,  default options)
testport: OK (poudriere: 9.3-RELEASE-p44, amd64, default options)
testport: OK (poudriere: 10.3-RELEASE-p5, i386,  default options)
testport: OK (poudriere: 10.3-RELEASE-p5, amd64, default options)

There is one problem I have yet to solve.  Running pjsua or trying to play a test sound with pjsystest gives

"Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV)".

This is the same with both versions 2.5.1 and 2.5.5.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2016-08-02 22:47:13 UTC
Hi, I'm going to test the update soon.

I'd like to extrapolate the pjsua part for now it will require a little time to discover why it's not working.

Anyway I'll take a look at that too while testing the update.

I confess I made the pjsip port just because it was required by asterisk13, and did not check the pjsua part.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2016-08-03 08:01:20 UTC
(In reply to Joseph Mingrone from comment #0)
> Created attachment 173202 [details]
> svn diff to update net/pjsip to version 2.5.5
> 
> portlint: OK
> testport: OK (poudriere: 9.3-RELEASE-p44, i386,  default options)
> testport: OK (poudriere: 9.3-RELEASE-p44, amd64, default options)
> testport: OK (poudriere: 10.3-RELEASE-p5, i386,  default options)
> testport: OK (poudriere: 10.3-RELEASE-p5, amd64, default options)
> 
> There is one problem I have yet to solve.  Running pjsua or trying to play a
> test sound with pjsystest gives
> 
> "Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV)".
> 
> This is the same with both versions 2.5.1 and 2.5.5.

Some googling suggests it requires an additional dependency on ALSA (available in audio/alsa-lib).

I'm going to test this, could you do the same?
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2016-08-03 09:23:10 UTC
While testing I noted this patch, as is, breaks asterisk13 due to this change in the plist(line 343):

%%SHARED%%%%VIDEO%%lib/libpjsua2.so

Why conditional on video? Asterisk13 actually depends on this object.

I suspect this slipped in by mistake, testing without this change.


And having a better look, I'd also rather keep the PJSUA option off by default. As I stated in the commit message when adding this port, the default options are tailored on the asterisk port, to make sure the asterisk13 port gets a correct pjsip library for its' use (asterisk is quite picky about this).
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2016-08-04 09:13:08 UTC
Created attachment 173272 [details]
New diff

I've tested this slightly modified patch.

Asterisk13 works fine with this.

I still have to test pjsua though.
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2016-08-04 10:21:30 UTC
I found some definitely broken logic in a pjsip Makefile:

pjmedia/build/os-auto.mak.in

I'll try to fix it, at east for the FreeBSD case.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-08-09 14:12:12 UTC
A commit references this bug:

Author: madpilot
Date: Tue Aug  9 14:12:07 UTC 2016
New revision: 419921
URL: https://svnweb.freebsd.org/changeset/ports/419921

Log:
  Update to 2.5.5.

  PR:		211533
  Submitted by:	Joseph Mingrone <jrm at ftfl.ca>

Changes:
  head/net/pjsip/Makefile
  head/net/pjsip/distinfo
  head/net/pjsip/pkg-plist
Comment 7 Guido Falsi freebsd_committer freebsd_triage 2016-08-09 14:13:43 UTC
I committed the update to 2.5.5.

The PJSUA option still needs some work.

I will not be able to really work on this for a week or two, but am not going to forget.
Comment 8 Joseph Mingrone freebsd_committer freebsd_triage 2016-08-14 22:32:37 UTC
Created attachment 173681 [details]
svn diff to be used as a possible starting point for adding pjsua support

Thanks for the update and sorry for the delay.

- Unfortunately, depending on ALSA doesn't seem to help.
- Yes, %%VIDEO%% should only have been added to the libyuv lines
- I have attached a new diff as a possible starting point.  It works in the sense that poudriere testport and portlint are happy, but pjsua is still broken, so it should not be committed as is.  I'm not sure how it could break asterisk, but since asterisk is certainly used by many more users, I'll let you decide how/if to include it.  

portlint: OK
testport: OK (poudriere: 9.3-RELEASE-p44, i386,  default options) [1]
testport: OK (poudriere: 9.3-RELEASE-p44, amd64, default options) [2]
testport: OK (poudriere: 10.3-RELEASE-p5, i386,  default options) [3]
testport: OK (poudriere: 10.3-RELEASE-p5, amd64, default options) [4]

[1]  http://pkg.awarnach.mathstat.dal.ca/data/9i386-default/2016-08-14_19h09m09s/logs/pjsip-2.5.5.log

[2]  http://pkg.awarnach.mathstat.dal.ca/data/9amd64-default/2016-08-14_19h09m34s/logs/pjsip-2.5.5.log

[3]  http://pkg.awarnach.mathstat.dal.ca/data/10i386-default/2016-08-14_19h09m49s/logs/pjsip-2.5.5.log

[4]  http://pkg.awarnach.mathstat.dal.ca/data/10amd64-default/2016-08-14_19h07m07s/logs/pjsip-2.5.5.log
Comment 9 Guido Falsi freebsd_committer freebsd_triage 2016-08-14 23:16:36 UTC
(In reply to Joseph Mingrone from comment #8)
> Created attachment 173681 [details]
> svn diff to be used as a possible starting point for adding pjsua support
> 
> Thanks for the update and sorry for the delay.
> 
> - Unfortunately, depending on ALSA doesn't seem to help.

No it does not, there are other problems with the build scripts, I need a little time to fix them

> - I have attached a new diff as a possible starting point.  It works in the
> sense that poudriere testport and portlint are happy, but pjsua is still
> broken, so it should not be committed as is.  I'm not sure how it could
> break asterisk, but since asterisk is certainly used by many more users,
> I'll let you decide how/if to include it.  

I already committed the update whcih was the part which could break asterisk.

Regarding the PJSIP option I'll commit it once it works, as I said I need a little time to look at it.
Comment 10 Joseph Mingrone freebsd_committer freebsd_triage 2016-08-15 00:22:53 UTC
Sounds good.  I'm just trying to give you something to start with so that work doesn't have to be repeated.
Comment 11 Guido Falsi freebsd_committer freebsd_triage 2016-09-07 16:41:55 UTC
Created attachment 174478 [details]
proposed patch

Sorry for the delay.

After some work I cooked up the attached patch, which seems to work, without needing ALSA.

The patches are a little "crude", and cannot be upstreamed in this way.

Making upstreamable patches would require much more work though, because the build system would need various fixes to do the correct thing on FreeBSD.

Can you test this patch and report back?

Thanks!
Comment 12 Joseph Mingrone freebsd_committer freebsd_triage 2016-09-08 23:55:51 UTC
It seems to work.

Host 1
-------
1. % pjsua
3. m (make call)

Host 2
-------
2. % pjsua
4. a (answer with code 200)

Success!

Thank you.
Comment 13 commit-hook freebsd_committer freebsd_triage 2016-09-12 15:26:53 UTC
A commit references this bug:

Author: madpilot
Date: Mon Sep 12 15:26:47 UTC 2016
New revision: 421929
URL: https://svnweb.freebsd.org/changeset/ports/421929

Log:
  - Add PJSUA option (on by default) to install the pjsua client binary
  - Strip libraries
  - Reflowed OPTIONS_DEFINE

  PR:		211533
  Submitted by:	Joseph Mingrone <jrm at ftfl.ca>

Changes:
  head/net/pjsip/Makefile
  head/net/pjsip/files/patch-aconfigure
  head/net/pjsip/files/patch-build.mak.in
  head/net/pjsip/files/patch-pjmedia_build_os-auto.mak.in
  head/net/pjsip/pkg-plist
Comment 14 Guido Falsi freebsd_committer freebsd_triage 2016-09-12 15:27:51 UTC
Committed. Thanks!