Index: head/net/pjsip/Makefile =================================================================== --- head/net/pjsip/Makefile (revision 500704) +++ head/net/pjsip/Makefile (revision 500705) @@ -1,113 +1,114 @@ # $FreeBSD$ PORTNAME= pjsip PORTVERSION= 2.8 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.pjsip.org/release/${PORTVERSION}/ DISTNAME= pjproject-${DISTVERSION} MAINTAINER= madpilot@FreeBSD.org COMMENT= Multimedia communication library written in C language LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libportaudio.so:audio/portaudio USES= gmake localbase pathfix ssl tar:bz2 USE_LDCONFIG= yes CONFLICTS?= pjsip-extsrtp GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-external-pa \ --disable-silk PATHFIX_MAKEFILEIN= Makefile PLIST_SUB= CONFIGURE_TARGET="${CONFIGURE_TARGET}" MAKE_JOBS_UNSAFE= yes OPTIONS_DEFINE= AMR DEBUG EXTSRTP FFMPEG G711 G722 G7221 GSM ILBC IPV6 \ L16 OPENH264 PJSUA RESAMPLE RESAMPLEDLL SAMPLERATE SDL \ SHARED SOUND SPEEX SPEEXAEC V4L VIDEO WEBRTC OPTIONS_DEFAULT=G711 G722 G7221 GSM ILBC L16 SHARED SPEEX SPEEXAEC EXTSRTP_DESC= Use libsrtp port (needed to get SRTP support in asterisk pjsip backend) G711_DESC= G.711 codec support G722_DESC= G.722 codec support G7221_DESC= G.722.1 codec support ILBC_DESC= iLBC codec support L16_DESC= Linear/L16 codec support OPENH264_DESC= OpenH264 support PJSUA_DESC= Command line SIP agent RESAMPLE_DESC= Enable resampling implementations RESAMPLEDLL_DESC= Build libresample as shared library SHARED_DESC= Build shared libraries (other ports may depend on this) SPEEXAEC_DESC= Speex Acoustic Echo Canceller/AEC V4L_DESC= Video4Linux2 support WEBRTC_DESC= Build linwebrtc OPTIONS_SUB= yes AMR_CONFIGURE_WITH= opencore-amr AMR_LIB_DEPENDS= libopencore-amrwb.so:audio/opencore-amr \ libvo-amrwbenc.so:audio/vo-amrwbenc DEBUG_CFLAGS= -DNDEBUG=0 DEBUG_CFLAGS_OFF= -DNDEBUG=1 EXTSRTP_CONFIGURE_WITH= external-srtp EXTSRTP_CONFLICTS_OFF= libsrtp libsrtp2 EXTSRTP_LIB_DEPENDS= libsrtp2.so:net/libsrtp2 FFMPEG_CONFIGURE_ENABLE= ffmpeg FFMPEG_LIB_DEPENDS= libswresample.so:multimedia/ffmpeg G711_CONFIGURE_ENABLE= g711-codec G722_CONFIGURE_ENABLE= g722-codec G7221_CONFIGURE_ENABLE= g7221-codec GSM_CONFIGURE_ENABLE= gsm-codec GSM_CONFIGURE_ON= --with-external-gsm GSM_LIB_DEPENDS= libgsm.so:audio/gsm ILBC_CONFIGURE_ENABLE= ilbc-codec IPV6_CFLAGS= "-DPJ_HAS_IPV6=1" IPV6_CFLAGS= -DPJ_HAS_IPV6=1 IPV6_CFLAGS_OFF= -DPJ_HAS_IPV6=1 L16_CONFIGURE_ENABLE= l16-codec OPENH264_CONFIGURE_ENABLE= openh264 OPENH264_LIB_DEPENDS= libopenh264.so:multimedia/openh264 RESAMPLE_CONFIGURE_ENABLE= resample RESAMPLEDLL_CONFIGURE_ENABLE= resample-dll SAMPLERATE_CONFIGURE_ENABLE= libsamplerate SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate SDL_CONFIGURE_ENABLE= sdl SDL_USE= SDL=sdl SHARED_CONFIGURE_ENABLE= shared SOUND_CONFIGURE_ENABLE= sound SPEEXAEC_CONFIGURE_ENABLE= speex-aec SPEEX_CONFIGURE_ENABLE= speex-codec SPEEX_CONFIGURE_ON= --with-external-speex SPEEX_LIB_DEPENDS= libspeex.so:audio/speex \ libspeexdsp.so:audio/speexdsp V4L_BUILD_DEPENDS= v4l_compat>=0:multimedia/v4l_compat V4L_CONFIGURE_ENABLE= v4l2 V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l VIDEO_CONFIGURE_ENABLE= video WEBRTC_CONFIGURE_OFF= --disable-libwebrtc post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/pkgconfig.py @${REINPLACE_CMD} -e 's/$$(APP_LDFLAGS) \{0,1\}//' \ -e 's/$$(OS_LDFLAGS)/$$(APP_LDFLAGS) &/' \ ${WRKSRC}/*/build/Makefile - @${ECHO} "#include " > ${WRKSRC}/pjlib/include/pj/config_site.h - @${ECHO} "#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)" >> ${WRKSRC}/pjlib/include/pj/config_site.h + @${CP} ${FILESDIR}/config_site.h \ + ${WRKSRC}/pjlib/include/pj/config_site.h post-install-SHARED-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so post-install-PJSUA-on: ${INSTALL_PROGRAM} \ ${WRKSRC}/pjsip-apps/bin/pjsua-${ARCH}-portbld-${OPSYS:tl}${OSREL} \ ${STAGEDIR}${PREFIX}/bin/pjsua ${INSTALL_PROGRAM} \ ${WRKSRC}/pjsip-apps/bin/pjsystest-${ARCH}-portbld-${OPSYS:tl}${OSREL} \ ${STAGEDIR}${PREFIX}/bin/pjsystest .include Index: head/net/pjsip/files/config_site.h =================================================================== --- head/net/pjsip/files/config_site.h (nonexistent) +++ head/net/pjsip/files/config_site.h (revision 500705) @@ -0,0 +1,40 @@ +/* + * Custom options imported from asterisk provided customizations. + * + * $FreeBSD$ + */ + +#include + +#define PJ_MAX_HOSTNAME (256) +#define PJSIP_MAX_URL_SIZE (512) +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE) + +#define PJ_SCANNER_USE_BITWISE 0 + +#define PJ_LOG_MAX_LEVEL 6 + +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1) +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1) +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024) +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024) + +#define PJSIP_MAX_PKT_LEN 32000 + +/* Defaults too low for WebRTC */ +#define PJ_ICE_MAX_CAND 32 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND) + +/* Increase limits to allow more formats */ +#define PJMEDIA_MAX_SDP_FMT 64 +#define PJMEDIA_MAX_SDP_BANDW 4 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4) +#define PJMEDIA_MAX_SDP_MEDIA 16 + +/* + * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds), + * which conflicts with the global section's keep_alive_interval option in + * pjsip.conf in asterisk. + */ +#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0 +#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0 Property changes on: head/net/pjsip/files/config_site.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update =================================================================== --- head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update (nonexistent) +++ head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update (revision 500705) @@ -0,0 +1,33 @@ +diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c +--- pjsip/src/pjsip-ua/sip_inv.c ++++ pjsip/src/pjsip-ua/sip_inv.c +@@ -4185,6 +4185,29 @@ + + if (tsx->status_code != 100) { + ++ if (inv->role == PJSIP_ROLE_UAC) { ++ pjsip_rx_data *rdata = e->body.tsx_state.src.rdata; ++ pjsip_allow_hdr *allow = NULL; ++ pjsip_msg *msg = rdata->msg_info.msg; ++ ++ if (msg) { ++ allow = (pjsip_allow_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW, ++ NULL); ++ } ++ if (allow) { ++ unsigned i; ++ const pj_str_t STR_UPDATE = { "UPDATE", 6 }; ++ ++ for (i=0; icount; ++i) { ++ if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0) { ++ /* UPDATE is present in Allow */ ++ inv->options |= PJSIP_INV_SUPPORT_UPDATE; ++ break; ++ } ++ } ++ } ++ } ++ + if (dlg->remote.info->tag.slen) + inv_set_state(inv, PJSIP_INV_STATE_EARLY, e); + Property changes on: head/net/pjsip/files/patch-0010-outgoing_connected_line_method_update ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements =================================================================== --- head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements (nonexistent) +++ head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements (revision 500705) @@ -0,0 +1,42 @@ +From 1fed39fe1488abd654a5488b5e6ad59b4b973331 Mon Sep 17 00:00:00 2001 +From: nanang +Date: Tue, 8 Jan 2019 09:07:47 +0000 +Subject: [PATCH 1/5] Fixed #2172: Avoid double reference counter decrements in + timer in the scenario of race condition between pj_timer_heap_cancel() and + pj_timer_heap_poll(). + +--- + pjlib/src/pj/timer.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c +index 90a95e37b..7bae084ef 100644 +--- pjlib/src/pj/timer.c ++++ pjlib/src/pj/timer.c +@@ -580,13 +580,16 @@ static int cancel_timer(pj_timer_heap_t *ht, + + lock_timer_heap(ht); + count = cancel(ht, entry, flags | F_DONT_CALL); +- if (flags & F_SET_ID) { +- entry->id = id_val; +- } +- if (entry->_grp_lock) { +- pj_grp_lock_t *grp_lock = entry->_grp_lock; +- entry->_grp_lock = NULL; +- pj_grp_lock_dec_ref(grp_lock); ++ if (count > 0) { ++ /* Timer entry found & cancelled */ ++ if (flags & F_SET_ID) { ++ entry->id = id_val; ++ } ++ if (entry->_grp_lock) { ++ pj_grp_lock_t *grp_lock = entry->_grp_lock; ++ entry->_grp_lock = NULL; ++ pj_grp_lock_dec_ref(grp_lock); ++ } + } + unlock_timer_heap(ht); + +-- +2.20.1 + Property changes on: head/net/pjsip/files/patch-0020-Fixed-2172-Avoid-double-reference-counter-decrements ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property