From da50bb63f37a5b3f2ad65084b3eb24d34d684cd3 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 30 May 2012 22:41:30 +0000 Subject: [PATCH] tweaks to the Asterisk port: - add an extra file to PLIST-calendar - add comments to the sample sip.conf showing how to hide version numbers - fix use of _POSIX_THREAD_PRIORITY_SCHEDULING, from Brad --- telephony/asterisk/Makefile | 6 ++++-- telephony/asterisk/files/sip.conf.sample | 8 +++++++- telephony/asterisk/patches/patch-main_features_c | 13 +++++++++++++ telephony/asterisk/pkg/PLIST-calendar | 3 ++- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 telephony/asterisk/patches/patch-main_features_c diff --git a/telephony/asterisk/Makefile b/telephony/asterisk/Makefile index 097c29a5d5d..68e6d98bf0d 100644 --- a/telephony/asterisk/Makefile +++ b/telephony/asterisk/Makefile @@ -1,9 +1,11 @@ -# $OpenBSD: Makefile,v 1.147 2012/05/06 13:58:23 naddy Exp $ +# $OpenBSD: Makefile,v 1.148 2012/05/30 22:41:30 sthen Exp $ SHARED_ONLY= Yes COMMENT-main= open source multi-protocol PBX and telephony toolkit VER= 1.8.12.0 +REVISION-main= 0 +REVISION-calendar= 0 DISTNAME= asterisk-${VER:S/beta/-beta/:S/rc/-rc/} PKGNAME-main= asterisk-${VER} @@ -145,7 +147,7 @@ CONFIGURE_ARGS+= --with-imap=no # calendar COMMENT-calendar= calendar support for Asterisk WANTLIB-calendar= ${MODGETTEXT_WANTLIB} asn1 crypto expat gssapi \ - ical iksemel krb5 m neon ssl xml2 z + ical iksemel krb5 m neon proxy ssl xml2 z LIB_DEPENDS-calendar= net/neon \ textproc/libical \ ${MODGETTEXT_LIB_DEPENDS} diff --git a/telephony/asterisk/files/sip.conf.sample b/telephony/asterisk/files/sip.conf.sample index df1c4088e02..f18ee64d52e 100644 --- a/telephony/asterisk/files/sip.conf.sample +++ b/telephony/asterisk/files/sip.conf.sample @@ -1,15 +1,21 @@ -; $OpenBSD: sip.conf.sample,v 1.6 2011/06/27 21:15:14 sthen Exp $ +; $OpenBSD: sip.conf.sample,v 1.7 2012/05/30 22:41:30 sthen Exp $ ; Longer example available in ${TRUEPREFIX}/share/examples/asterisk/default [general] disallow=all allow=ulaw + ; If Asterisk server is behind nat with port-forwarding for some ; external clients, set the external address and local network and ; perhaps restrict the port range (see rtpstart/rtpend in rtp.conf). ;externip=11.22.33.44 ;localnet=192.168.0.0/255.255.0.0 +; Defaults for these include the Asterisk version number, which you +; might not want to expose. +useragent=Asterisk PBX +sdpsession=Asterisk PBX + ; Phone #1 [100] type=friend diff --git a/telephony/asterisk/patches/patch-main_features_c b/telephony/asterisk/patches/patch-main_features_c new file mode 100644 index 00000000000..f58ee237c12 --- /dev/null +++ b/telephony/asterisk/patches/patch-main_features_c @@ -0,0 +1,13 @@ +$OpenBSD: patch-main_features_c,v 1.1 2012/05/30 22:41:30 sthen Exp $ +--- main/features.c.orig Thu May 17 23:30:18 2012 ++++ main/features.c Thu May 17 23:31:57 2012 +@@ -960,7 +960,9 @@ static void bridge_call_thread_launch(void *data) + ast_pthread_create(&thread, &attr, bridge_call_thread, data); + pthread_attr_destroy(&attr); + memset(&sched, 0, sizeof(sched)); ++#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0) + pthread_setschedparam(thread, SCHED_RR, &sched); ++#endif + } + + /*! diff --git a/telephony/asterisk/pkg/PLIST-calendar b/telephony/asterisk/pkg/PLIST-calendar index 159bc15768c..9066093934e 100644 --- a/telephony/asterisk/pkg/PLIST-calendar +++ b/telephony/asterisk/pkg/PLIST-calendar @@ -1,5 +1,6 @@ -@comment $OpenBSD: PLIST-calendar,v 1.1 2011/01/19 11:25:16 sthen Exp $ +@comment $OpenBSD: PLIST-calendar,v 1.2 2012/05/30 22:41:30 sthen Exp $ lib/asterisk/modules/res_calendar.so lib/asterisk/modules/res_calendar_caldav.so +lib/asterisk/modules/res_calendar_ews.so lib/asterisk/modules/res_calendar_exchange.so lib/asterisk/modules/res_calendar_icalendar.so