View | Details | Raw Unified | Return to bug 226667
Collapse All | Expand All

(-)net/opensips/Makefile (-8 / +13 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/net/opensips/Makefile 464084 2018-03-10 17:46:04Z gerald $
2
# $FreeBSD: head/net/opensips/Makefile 464084 2018-03-10 17:46:04Z gerald $
3
3
4
PORTNAME=		opensips
4
PORTNAME=		opensips
5
PORTVERSION=		2.2.3
5
PORTVERSION=		2.2.6
6
PORTREVISION=	5
7
CATEGORIES=		net
6
CATEGORIES=		net
8
MASTER_SITES=		http://opensips.org/pub/opensips/${PORTVERSION}/
7
MASTER_SITES=		http://opensips.org/pub/opensips/${PORTVERSION}/
9
8
Lines 34-40 Link Here
34
WRKSRC=			${WRKDIR}/opensips-${PORTVERSION}
33
WRKSRC=			${WRKDIR}/opensips-${PORTVERSION}
35
DOCSDIR=		share/doc/opensips
34
DOCSDIR=		share/doc/opensips
36
35
37
USE_RC_SUBR=		opensips
36
USERS=			opensips
37
GROUPS=			opensips
38
38
39
USES=			gmake ncurses perl5 pkgconfig python:2.7 shebangfix ssl
39
USES=			gmake ncurses perl5 pkgconfig python:2.7 shebangfix ssl
40
USE_GCC=		yes
40
USE_GCC=		yes
Lines 55-60 Link Here
55
MYSQL_USE=		MYSQL=client
55
MYSQL_USE=		MYSQL=client
56
PGSQL_USES+=		pgsql
56
PGSQL_USES+=		pgsql
57
57
58
USE_RC_SUBR=		opensips
59
58
PGSQL_BUILD_DEPENDS+=	p5-DBD-Pg>=3.4:databases/p5-DBD-Pg
60
PGSQL_BUILD_DEPENDS+=	p5-DBD-Pg>=3.4:databases/p5-DBD-Pg
59
RADIUS_LIB_DEPENDS+=	libradiusclient-ng.so:net/radiusclient
61
RADIUS_LIB_DEPENDS+=	libradiusclient-ng.so:net/radiusclient
60
HTTP_LIB_DEPENDS+=	libmicrohttpd.so:www/libmicrohttpd
62
HTTP_LIB_DEPENDS+=	libmicrohttpd.so:www/libmicrohttpd
Lines 69-80 Link Here
69
			modules/jabber/doc/jabberreg.pl \
71
			modules/jabber/doc/jabberreg.pl \
70
			modules/seas/doc/xml2sgml.sh \
72
			modules/seas/doc/xml2sgml.sh \
71
			modules/sipcapture/examples/partrotate_unixtimestamp.pl \
73
			modules/sipcapture/examples/partrotate_unixtimestamp.pl \
72
			packaging/debian/common/rules \
74
			packaging/debian/rules \
73
			packaging/freebsd/files/pkg-deinstall.in \
75
			packaging/freebsd/files/pkg-deinstall.in \
74
			packaging/freebsd/files/pkg-install.in \
76
			packaging/freebsd/files/pkg-install.in \
75
			packaging/gentoo/opensips.init \
77
			packaging/gentoo/opensips.init \
76
			packaging/redhat_fedora/opensips.init \
78
			packaging/redhat_fedora/opensips.init \
77
			packaging/redhat_fedora/opensips.m4cfg \
79
			packaging/redhat_fedora/opensips-m4cfg \
78
			packaging/rpm/opensips.init \
80
			packaging/rpm/opensips.init \
79
			packaging/solaris/berkeley-postinstall \
81
			packaging/solaris/berkeley-postinstall \
80
			packaging/solaris/berkeley-preinstall \
82
			packaging/solaris/berkeley-preinstall \
Lines 116-121 Link Here
116
			test/18.sh \
118
			test/18.sh \
117
			test/19.sh \
119
			test/19.sh \
118
			test/2.sh \
120
			test/2.sh \
121
			test/20.sh \
119
			test/21.sh \
122
			test/21.sh \
120
			test/22.sh \
123
			test/22.sh \
121
			test/23.sh \
124
			test/23.sh \
Lines 177-183 Link Here
177
.endif
180
.endif
178
181
179
.if ${PORT_OPTIONS:MTLS}
182
.if ${PORT_OPTIONS:MTLS}
180
EXTRA_MODULES+=		proto_tls
183
EXTRA_MODULES+=		proto_tls proto_wss tls_mgm
181
.endif
184
.endif
182
185
183
.if ${PORT_OPTIONS:MSQLITE}
186
.if ${PORT_OPTIONS:MSQLITE}
Lines 238-244 Link Here
238
.for i in	aaa_radius.so acc.so alias_db.so auth.so auth_aaa.so auth_db.so auth_diameter.so \
241
.for i in	aaa_radius.so acc.so alias_db.so auth.so auth_aaa.so auth_db.so auth_diameter.so \
239
		avpops.so b2b_entities.so b2b_logic.so b2b_sca.so benchmark.so cachedb_local.so \
242
		avpops.so b2b_entities.so b2b_logic.so b2b_sca.so benchmark.so cachedb_local.so \
240
		cachedb_memcached.so cachedb_sql.so call_center.so call_control.so carrierroute.so \
243
		cachedb_memcached.so cachedb_sql.so call_center.so call_control.so carrierroute.so \
241
		cfgutils.so closeddial.so cpl-c.so db_cachedb.so db_flatstore.so db_mysql.so \
244
		cfgutils.so closeddial.so cpl_c.so db_cachedb.so db_flatstore.so db_mysql.so \
242
		db_postgres.so db_text.so db_unixodbc.so db_virtual.so dialog.so dialplan.so \
245
		db_postgres.so db_text.so db_unixodbc.so db_virtual.so dialog.so dialplan.so \
243
		dispatcher.so diversion.so dns_cache.so domain.so domainpolicy.so drouting.so \
246
		dispatcher.so diversion.so dns_cache.so domain.so domainpolicy.so drouting.so \
244
		enum.so event_datagram.so event_rabbitmq.so event_route.so event_xmlrpc.so exec.so \
247
		enum.so event_datagram.so event_rabbitmq.so event_route.so event_xmlrpc.so exec.so \
Lines 254-260 Link Here
254
		sms.so speeddial.so sst.so statistics.so stun.so textops.so tlsops.so tm.so uac.so \
257
		sms.so speeddial.so sst.so statistics.so stun.so textops.so tlsops.so tm.so uac.so \
255
		uac_auth.so uac_redirect.so uac_registrant.so uri.so userblacklist.so usrloc.so \
258
		uac_auth.so uac_redirect.so uac_registrant.so uri.so userblacklist.so usrloc.so \
256
		xcap.so xcap_client.so xmpp.so topology_hiding.so fraud_detection.so rtpengine.so \
259
		xcap.so xcap_client.so xmpp.so topology_hiding.so fraud_detection.so rtpengine.so \
257
		proto_ws.so proto_tls.so cachedb_redis.so db_sqlite.so
260
		proto_ws.so proto_tls.so cachedb_redis.so db_sqlite.so proto_bin.so tls_mgm.so \
261
		tls_mgm.so event_flatstore.so event_virtual.so proto_hep.so proto_wss.so \
262
		clusterer.so sql_cacher.so
258
		@if [ -e ${STAGEDIR}${PREFIX}/lib/opensips/modules/${i} ]; then \
263
		@if [ -e ${STAGEDIR}${PREFIX}/lib/opensips/modules/${i} ]; then \
259
			${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/opensips/modules/${i}; \
264
			${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/opensips/modules/${i}; \
260
		fi
265
		fi
(-)net/opensips/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1488823435
1
TIMESTAMP = 1520992193
2
SHA256 (opensips-2.2.3.tar.gz) = ccf540f7aae4335a8319b83f6cb87b562e665991fe1c2adc4e8eb4d4f3042dd7
2
SHA256 (opensips-2.2.6.tar.gz) = a48323435e656f6e8de6ff82ef08a55665e2331fc5ad009bf3a2ddc883906e7f
3
SIZE (opensips-2.2.3.tar.gz) = 9111509
3
SIZE (opensips-2.2.6.tar.gz) = 9154213
(-)net/opensips/files/Makefile.conf (-17 / +26 lines)
Lines 3-19 Link Here
3
#cachedb_cassandra= Implementation of a cache system designed to work with Cassandra servers | thrift 0.6.1
3
#cachedb_cassandra= Implementation of a cache system designed to work with Cassandra servers | thrift 0.6.1
4
#cachedb_couchbase= Implementation of a cache system designed to work with CouchBase servers | libcouchbase >= 2.0
4
#cachedb_couchbase= Implementation of a cache system designed to work with CouchBase servers | libcouchbase >= 2.0
5
#cachedb_memcached= Implementation of a cache system designed to work with a memcached server. | Memcached client library, tipically libmemcached
5
#cachedb_memcached= Implementation of a cache system designed to work with a memcached server. | Memcached client library, tipically libmemcached
6
#cachedb_mongodb= Implementation of a cache system designed to work with a MongoDB server. | libjson and the mongo-c-driver 
6
#cachedb_mongodb= Implementation of a cache system designed to work with a MongoDB server. | libjson and the mongo-c-driver
7
#cachedb_redis= Implementation of a cache system designed to work with Redis servers | Redis client library, hiredis
7
#cachedb_redis= Implementation of a cache system designed to work with Redis servers | Redis client library, hiredis
8
#carrierroute= Provides routing, balancing and blacklisting capabilities. | libconfuse, a configuration file parser library
8
#carrierroute= Provides routing, balancing and blacklisting capabilities. | libconfuse, a configuration file parser library
9
#compression= Implements SIP message compression/decompression and base64 encoding | zlib dev library, tipically zlib1g-dev
9
#compression= Implements SIP message compression/decompression and base64 encoding | zlib dev library, tipically zlib1g-dev
10
#cpl-c= Implements a CPL (Call Processing Language) interpreter | library for parsing XML files, tipically libxml2 and libxml2-devel
10
#cpl_c= Implements a CPL (Call Processing Language) interpreter | library for parsing XML files, tipically libxml2 and libxml2-devel
11
#db_berkeley= Integrates the Berkeley DB into OpenSIPS | Berkeley embedded database
11
#db_berkeley= Integrates the Berkeley DB into OpenSIPS | Berkeley embedded database
12
#db_http= Provides access to a database that is implemented as a HTTP server. | CURL library - libcurl
12
#db_http= Provides access to a database that is implemented as a HTTP server. | CURL library - libcurl
13
#db_mysql= Provides MySQL connectivity for OpenSIPS | development libraries of mysql-client , tipically libmysqlclient-dev
13
#db_mysql= Provides MySQL connectivity for OpenSIPS | development libraries of mysql-client , tipically libmysqlclient-dev
14
#db_oracle= Provides Oracle connectivity for OpenSIPS. | Development library of OCI, tipically instantclient-sdk-10.2.0.3
14
#db_oracle= Provides Oracle connectivity for OpenSIPS. | Development library of OCI, tipically instantclient-sdk-10.2.0.3
15
#db_perlvdb= Provides a virtualization framework for OpenSIPS's database access. | Perl library development files, tipically libperl-dev
15
#db_perlvdb= Provides a virtualization framework for OpenSIPS's database access. | Perl library development files, tipically libperl-dev
16
#db_postgres= Provides Postgres connectivity for OpenSIPS | PostgreSQL library and development library - tipically libpq5 and libpq-dev
16
#db_postgres= Provides Postgres connectivity for OpenSIPS | PostgreSQL library and development library - tipically libpq5 and libpq-dev
17
#db_sqlite= Provides SQLite connectivity for OpenSIPS | SQLite library and development library - tipically libsqlite3 and libsqlite3-dev
17
#db_unixodbc= Allows to use the unixodbc package with OpenSIPS | ODBC library and ODBC development library
18
#db_unixodbc= Allows to use the unixodbc package with OpenSIPS | ODBC library and ODBC development library
18
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, tipically libpcre-dev
19
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, tipically libpcre-dev
19
#emergency= Provides emergency call treatment for OpenSIPS | CURL dev library - tipically libcurl4-openssl-dev
20
#emergency= Provides emergency call treatment for OpenSIPS | CURL dev library - tipically libcurl4-openssl-dev
Lines 31-38 Link Here
31
#osp= Enables OpenSIPS to support secure, multi-lateral peering using the OSP standard | OSP development kit, tipically osptoolkit
32
#osp= Enables OpenSIPS to support secure, multi-lateral peering using the OSP standard | OSP development kit, tipically osptoolkit
32
#perl= Easily implement your own OpenSIPS extensions in Perl | Perl library development files, tipically libperl-dev
33
#perl= Easily implement your own OpenSIPS extensions in Perl | Perl library development files, tipically libperl-dev
33
#pi_http= Provides a simple web database provisioning interface | XML parsing & building library, tipically libxml-dev
34
#pi_http= Provides a simple web database provisioning interface | XML parsing & building library, tipically libxml-dev
34
#proto_sctp= Provides support for SCTP listeners in OpenSIPS | SCTP development library, tipically libsctp-dev 
35
#proto_sctp= Provides support for SCTP listeners in OpenSIPS | SCTP development library, tipically libsctp-dev
35
#proto_tls= Provides support for TLS listeners in OpenSIPS | SSL development library, tipically libssl-dev 
36
#proto_tls= Provides support for TLS listeners in OpenSIPS | SSL development library, tipically libssl-dev
37
#proto_wss= Provides support for Secure WebSocket listeners in OpenSIPS | SSL development library, tipically libssl-dev
36
#presence= Handles PUBLISH and SUBSCRIBE messages and generates NOTIFY messages in a general, event independent way | XML parsing & Building library, tipically libxml-dev
38
#presence= Handles PUBLISH and SUBSCRIBE messages and generates NOTIFY messages in a general, event independent way | XML parsing & Building library, tipically libxml-dev
37
#presence_dialoginfo= Enables the handling of "Event: dialog" (as defined in RFC 4235) |  XML parsing & building library, tipically libxml-dev
39
#presence_dialoginfo= Enables the handling of "Event: dialog" (as defined in RFC 4235) |  XML parsing & building library, tipically libxml-dev
38
#presence_mwi= Does specific handling for notify-subscribe message-summary (message waiting indication) events as specified in RFC 3842 | XML parsing & building library, tipically libxml-dev
40
#presence_mwi= Does specific handling for notify-subscribe message-summary (message waiting indication) events as specified in RFC 3842 | XML parsing & building library, tipically libxml-dev
Lines 47-85 Link Here
47
#rest_client= Simple HTTP client | CURL library - libcurl
49
#rest_client= Simple HTTP client | CURL library - libcurl
48
#rls= Resource List Server implementation following the specification in RFC 4662 and RFC 4826 | parsing/building XML library, tipically libxml-dev
50
#rls= Resource List Server implementation following the specification in RFC 4662 and RFC 4826 | parsing/building XML library, tipically libxml-dev
49
#sngtc= Voice Transcoding using the D-series Sangoma transcoding cards | libsngtc_node
51
#sngtc= Voice Transcoding using the D-series Sangoma transcoding cards | libsngtc_node
50
#snmpstats= Provides an SNMP management interface to OpenSIPS | NetSNMP v5.3 
52
#snmpstats= Provides an SNMP management interface to OpenSIPS | NetSNMP v5.3
53
#tls_mgm= Provides a TLS interface to manage certificates for OpenSIPS | SSL development library, tipically libssl-dev
51
#xcap= XCAP utility functions for OpenSIPS. | libxml-dev
54
#xcap= XCAP utility functions for OpenSIPS. | libxml-dev
52
#xcap_client= XCAP client for OpenSIPS.It fetches XCAP elements, either documents or part of them, by sending HTTP GET requests | libxml-dev and libcurl-dev
55
#xcap_client= XCAP client for OpenSIPS.It fetches XCAP elements, either documents or part of them, by sending HTTP GET requests | libxml-dev and libcurl-dev
53
#xmpp= Gateway between OpenSIPS and a jabber server. It enables the exchange of IMs between SIP clients and XMPP(jabber) clients. | parsing/building XML files, tipically libexpat1-devel
56
#xmpp= Gateway between OpenSIPS and a jabber server. It enables the exchange of IMs between SIP clients and XMPP(jabber) clients. | parsing/building XML files, tipically libexpat1-devel
54
57
55
exclude_modules= aaa_radius b2b_logic cachedb_cassandra cachedb_couchbase cachedb_memcached cachedb_mongodb cachedb_redis carrierroute compression cpl-c db_berkeley db_http db_mysql db_oracle db_perlvdb db_postgres db_unixodbc dialplan emergency event_rabbitmq h350 regex identity jabber json ldap lua httpd mi_xmlrpc_ng mmgeoip osp perl pi_http presence presence_dialoginfo presence_mwi presence_xml proto_sctp proto_tls pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python rest_client rls sngtc snmpstats xcap xcap_client xmpp db_sqlite
58
exclude_modules= aaa_radius b2b_logic cachedb_cassandra cachedb_couchbase cachedb_memcached cachedb_mongodb cachedb_redis carrierroute compression cpl_c db_berkeley db_http db_mysql db_oracle db_perlvdb db_postgres db_sqlite db_unixodbc dialplan emergency event_rabbitmq h350 regex identity jabber json ldap lua httpd mi_xmlrpc_ng mmgeoip osp perl pi_http presence presence_dialoginfo presence_mwi presence_xml proto_sctp proto_tls proto_wss pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python rest_client rls sngtc snmpstats tls_mgm xcap xcap_client xmpp
56
59
57
include_modules= b2b_logic cachedb_redis carrierroute cpl-c dialplan event_rabbitmq regex identity jabber json mi_xmlrpc_ng perl pi_http presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python rest_client rls xcap xcap_client xmpp
60
include_modules= b2b_logic cachedb_redis carrierroute cpl_c dialplan event_rabbitmq regex identity jabber json mi_xmlrpc_ng perl pi_http presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp python rest_client rls xcap xcap_client xmpp
58
61
59
DEFS+= -DPKG_MALLOC #Uses a faster malloc (exclusive w/ USE_SHM_MEM)
62
#DEFS_GROUP_START
63
DEFS+= -DPKG_MALLOC #Uses a faster malloc
64
#DEFS+= -DUSE_SHM_MEM #All PKG allocations are mapped to SHM
65
#DEFS_GROUP_END
60
DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory
66
DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory
61
DEFS+= -DUSE_MCAST #Compile in support for IP Multicast
67
DEFS+= -DUSE_MCAST #Compile in support for IP Multicast
62
DEFS+= -DDISABLE_NAGLE #Disabled the TCP NAgle Algorithm ( lower delay )
68
DEFS+= -DDISABLE_NAGLE #Disabled the TCP NAgle Algorithm ( lower delay )
63
DEFS+= -DSTATISTICS #Enables the statistics manager
69
DEFS+= -DSTATISTICS #Enables the statistics manager
64
DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver parameters
70
DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver parameters
71
#DEFS_GROUP_START
72
##DEFS+= -DVQ_MALLOC #Very quick & wasteful mem allocator (currently disabled)
73
#DEFS+= -DQM_MALLOC #Quality assurance memory allocator with runtime safety checks
74
DEFS+= -DF_MALLOC #Fast memory allocator with minimal runtime overhead
65
#DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking
75
#DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking
66
DEFS+= -DF_MALLOC #An even faster allocator. Not recommended for debugging
76
#DEFS_GROUP_END
67
#DEFS+= -DF_MALLOC_OPTIMIZATIONS #Remove all internal checks in F_MALLOC
77
#DEFS+= -DDBG_MALLOC #Enables debugging for memory allocators
68
#DEFS+= -DDBG_QM_MALLOC #Allocator used for debugging information
78
#DEFS+= -DF_MALLOC_OPTIMIZATIONS #Remove all safety checks in F_MALLOC
69
#DEFS+= -DUSE_SHM_MEM #All PKG allocations are mapped to SHM ( exclusive w/ PKG_MALLOC )
70
#DEFS+= -DDBG_F_MALLOC #TODO ? 
71
#DEFS+= -DNO_DEBUG #Turns off all debug messages
79
#DEFS+= -DNO_DEBUG #Turns off all debug messages
72
#DEFS+= -DNO_LOG #Completely turns off all the logging
80
#DEFS+= -DNO_LOG #Completely turns off all the logging
73
#DEFS+= -DVQ_MALLOC #TODO ?
74
#DEFS+= -DFAST_LOCK #Uses fast architecture specific locking
81
#DEFS+= -DFAST_LOCK #Uses fast architecture specific locking
75
#DEFS+= -DUSE_FUTEX #Uses linux futexs with fast architecture specific locking
82
#DEFS+= -DUSE_FUTEX #Uses linux futexs with fast architecture specific locking
76
#DEFS+= -DUSE_SYSV_SEM #Uses SYSV sems for locking ( slower & limited number of locks
83
#DEFS+= -DUSE_SYSV_SEM #Uses SYSV sems for locking ( slower & limited number of locks
77
#DEFS+= -DUSE_PTHREAD_MUTEX #Uses pthread mutexes
84
#DEFS+= -DUSE_PTHREAD_MUTEX #Uses pthread mutexes for locking
85
#DEFS+= -DUSE_POSIX_SEM #Uses POSIX sems for locking
78
#DEFS+= -DBUSY_WAIT #Uses busy waiting on the lock
86
#DEFS+= -DBUSY_WAIT #Uses busy waiting on the lock
79
#DEFS+= -DDBG_LOCK #TODO ?
87
#DEFS+= -DDBG_LOCK #Attach debug info to all lock structures
80
#DEFS+= -DNOSMP #Do not use SMP sompliant locking. Faster but won't work on SMP machines 
88
#DEFS+= -DNOSMP #Do not use SMP sompliant locking. Faster but won't work on SMP machines
81
#DEFS+= -DEXTRA_DEBUG #Compiles in some extra debugging code
89
#DEFS+= -DEXTRA_DEBUG #Compiles in some extra debugging code
82
#DEFS+= -DORACLE_USRLOC #Uses Oracle compatible queries for USRLOC
90
#DEFS+= -DORACLE_USRLOC #Uses Oracle compatible queries for USRLOC
91
#DEFS+= -DSHM_EXTRA_STATS #Needed when using the mem-group core parameter
83
92
84
PREFIX=_PREFIX_
93
PREFIX=_PREFIX_
85
BASEDIR=_STAGE_DIR_
94
BASEDIR=_STAGE_DIR_
(-)net/opensips/files/opensips.cfg.sample (-59 / +111 lines)
Lines 1-37 Link Here
1
#
1
#
2
# $Id$
3
#
4
# OpenSIPS residential configuration script
2
# OpenSIPS residential configuration script
5
#     by OpenSIPS Solutions <team@opensips-solutions.com>
6
#
3
#
7
# This script was generated via "make menuconfig", from
4
# This script was originally generated via 
8
#   the "Residential" scenario.
5
# 'CC=gcc6 gmake menuconfig', from the "Residential" scenario.
9
# You can enable / disable more features / functionalities by
6
# You can enable / disable more features / functionalities by
10
#   re-generating the scenario with different options.#
7
# re-generating the scenario with different options.
8
#
9
# To generate an opensips script in FreeBSD, run the following commands,
10
# after installing the port / package.
11
# $ cd /usr/ports/net/opensips
12
# $ make patch
13
# $ cd work/opensips-*/
14
# $ CC=gcc6 gmake menuconfig
15
# $ ls tmp/
16
#
17
# As the FreeBSD port maintainer, I have tailored it a little
18
# to resemble the (hopefully) sane set of defaults for a residential
19
# SIP router running on FreeBSD and using PostgreSQL as backend database.
20
# For other supported databases, it should be as simple as changing all
21
# the db_url variables throughout this script.
11
#
22
#
12
# Please refer to the Core CookBook at:
23
# Please refer to the Core CookBook at:
13
#      http://www.opensips.org/Resources/DocsCookbooks
24
# http://www.opensips.org/Resources/DocsCookbooks
14
# for a explanation of possible statements, functions and parameters.
25
# for an explanation of possible statements, functions and parameters.
15
#
26
#
16
27
17
28
18
####### Global Parameters #########
29
####### Global Parameters #########
19
30
20
debug=3
31
log_level=3
21
log_stderror=no
32
log_stderror=no
22
log_facility=LOG_LOCAL0
33
log_facility=LOG_LOCAL0
23
34
24
fork=yes
25
children=4
35
children=4
26
36
27
/* uncomment the following lines to enable debugging */
37
/* uncomment the following lines to enable debugging */
28
#debug=6
38
#debug_mode=yes
29
#fork=no
30
#log_stderror=yes
31
39
32
/* uncomment the next line to enable the auto temporary blacklisting of 
40
/* uncomment the next line to enable the auto temporary blacklisting of 
33
   not available destinations (default disabled) */
41
   not available destinations (default disabled) */
34
disable_dns_blacklist=yes
42
#disable_dns_blacklist=no
35
43
36
/* uncomment the next line to enable IPv6 lookup after IPv4 dns 
44
/* uncomment the next line to enable IPv6 lookup after IPv4 dns 
37
   lookup failures (default disabled) */
45
   lookup failures (default disabled) */
Lines 42-58 Link Here
42
auto_aliases=no
50
auto_aliases=no
43
51
44
52
45
listen=udp:127.0.0.1:5060   # CUSTOMIZE ME
53
listen=udp:192.168.10.12:5060   # CUSTOMIZE ME
46
54
listen=tcp:192.168.10.12:5060   # CUSTOMIZE ME 
47
#listen=tcp:127.0.0.1:5060   # CUSTOMIZE ME 
55
listen=tls:192.168.10.12:5061   # CUSTOMIZE ME 
48
#listen=tls:127.0.0.1:5061   # CUSTOMIZE ME 
56
#advertised_address=12.34.56.78   # CUSTOMIZE ME (for running behind a NAT router)
49
57
#alias=12.34.56.78   # CUSTOMIZE ME
50
#advertised_address=111.222.333.444   # CUSTOMIZE ME
58
alias="domain1.net"   # CUSTOMIZE ME
59
#alias="domain2.com"   # CUSTOMIZE ME
51
60
52
#alias=111.222.333.444   # CUSTOMIZE ME
61
db_default_url="postgres://dbuser:dbpass@dbhostname/dbname"
53
#alias=example.org   # CUSTOMIZE ME
54
55
db_default_url="postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
56
62
57
####### Modules Section ########
63
####### Modules Section ########
58
64
Lines 92-97 Link Here
92
#### URI module
98
#### URI module
93
loadmodule "uri.so"
99
loadmodule "uri.so"
94
modparam("uri", "use_uri_table", 0)
100
modparam("uri", "use_uri_table", 0)
101
  
95
102
96
103
97
104
Lines 101-107 Link Here
101
#### MYSQL module
108
#### MYSQL module
102
#loadmodule "db_mysql.so"
109
#loadmodule "db_mysql.so"
103
110
104
105
#### HTTPD module
111
#### HTTPD module
106
#loadmodule "httpd.so"
112
#loadmodule "httpd.so"
107
#modparam("httpd", "port", 8888)
113
#modparam("httpd", "port", 8888)
Lines 110-124 Link Here
110
loadmodule "usrloc.so"
116
loadmodule "usrloc.so"
111
modparam("usrloc", "nat_bflag", "NAT")
117
modparam("usrloc", "nat_bflag", "NAT")
112
modparam("usrloc", "db_mode",   2)
118
modparam("usrloc", "db_mode",   2)
113
modparam("usrloc", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
119
modparam("usrloc", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
114
modparam("usrloc", "hash_size", 11)
120
#modparam("usrloc", "hash_size", 11)   # increases size of userloc hash table
115
121
116
122
117
#### REGISTRAR module
123
#### REGISTRAR module
118
loadmodule "registrar.so"
124
loadmodule "registrar.so"
119
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
125
modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")
120
modparam("registrar", "received_avp", "$avp(received_nh)")
126
modparam("registrar", "received_avp", "$avp(received_nh)")
121
modparam("registrar", "max_contacts", 10)
127
/* uncomment the next line not to allow more than 10 contacts per AOR */
128
#modparam("registrar", "max_contacts", 10)
122
129
123
#### ACCounting module
130
#### ACCounting module
124
loadmodule "acc.so"
131
loadmodule "acc.so"
Lines 129-139 Link Here
129
   if you enable this parameter, be sure the enable "append_fromtag"
136
   if you enable this parameter, be sure the enable "append_fromtag"
130
   in "rr" module */
137
   in "rr" module */
131
modparam("acc", "detect_direction", 0)
138
modparam("acc", "detect_direction", 0)
132
modparam("acc", "failed_transaction_flag", "ACC_FAILED")
139
modparam("acc", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
133
/* account triggers (flags) */
140
134
modparam("acc", "db_flag", "ACC_DO")
135
modparam("acc", "db_missed_flag", "ACC_MISSED")
136
modparam("acc", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
137
141
138
142
139
#### AUTHentication modules
143
#### AUTHentication modules
Lines 141-171 Link Here
141
loadmodule "auth_db.so"
145
loadmodule "auth_db.so"
142
modparam("auth_db", "calculate_ha1", yes)
146
modparam("auth_db", "calculate_ha1", yes)
143
modparam("auth_db", "password_column", "password")
147
modparam("auth_db", "password_column", "password")
144
modparam("auth_db", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
148
modparam("auth_db", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
145
modparam("auth_db", "load_credentials", "")
149
modparam("auth_db", "load_credentials", "")
146
150
147
151
152
148
#### ALIAS module
153
#### ALIAS module
149
loadmodule "alias_db.so"
154
loadmodule "alias_db.so"
150
modparam("alias_db", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
155
modparam("alias_db", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
156
151
157
152
158
153
#### DOMAIN module
159
#### DOMAIN module
154
loadmodule "domain.so"
160
loadmodule "domain.so"
155
modparam("domain", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
161
modparam("domain", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
156
modparam("domain", "db_mode", 1)   # Use caching
162
modparam("domain", "db_mode", 1)   # Use caching
157
modparam("auth_db|usrloc|uri", "use_domain", 1)
163
modparam("auth_db|usrloc|uri", "use_domain", 1)
158
164
159
165
166
160
#### PRESENCE modules
167
#### PRESENCE modules
161
loadmodule "xcap.so"
168
loadmodule "xcap.so"
162
loadmodule "presence.so"
169
loadmodule "presence.so"
163
loadmodule "presence_xml.so"
170
loadmodule "presence_xml.so"
164
modparam("xcap|presence", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
171
modparam("xcap|presence", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
165
modparam("presence_xml", "force_active", 1)
172
modparam("presence_xml", "force_active", 1)
166
modparam("presence", "server_address", "sip:127.0.0.1:5060") # CUSTOMIZE ME
173
modparam("presence", "server_address", "sip:127.0.0.1:5060") # CUSTOMIZE ME
167
modparam("presence", "subs_htable_size", 11)
174
#modparam("presence", "subs_htable_size", 11)   # increases size of presence subs hash table
168
modparam("presence", "pres_htable_size", 11)
175
#modparam("presence", "pres_htable_size", 11)   # increases size of presence pres hash table
169
#modparam("presence", "max_expires_subscribe", 600)
176
#modparam("presence", "max_expires_subscribe", 600)
170
#modparam("presence", "max_expires_publish", 600)
177
#modparam("presence", "max_expires_publish", 600)
171
178
Lines 175-217 Link Here
175
modparam("dialog", "dlg_match_mode", 1)
182
modparam("dialog", "dlg_match_mode", 1)
176
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
183
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
177
modparam("dialog", "db_mode", 2)
184
modparam("dialog", "db_mode", 2)
178
modparam("dialog", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
185
modparam("dialog", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
186
179
187
180
188
181
####  NAT modules
189
####  NAT modules
182
loadmodule "nathelper.so"
190
loadmodule "nathelper.so"
183
modparam("nathelper", "natping_interval", 10)
191
modparam("nathelper", "natping_interval", 10)
184
modparam("nathelper", "ping_nated_only", 1)
192
modparam("nathelper", "ping_nated_only", 1)
193
modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")
194
modparam("nathelper", "sipping_from", "sip:pinger@127.0.0.1") #CUSTOMIZE ME
185
modparam("nathelper", "received_avp", "$avp(received_nh)")
195
modparam("nathelper", "received_avp", "$avp(received_nh)")
186
196
187
loadmodule "rtpproxy.so"
197
loadmodule "rtpproxy.so"
188
modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:22222") # CUSTOMIZE ME
198
modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221") # CUSTOMIZE ME (make sure rtpproxy port matches server)
189
199
190
200
191
####  DIALPLAN module
201
####  DIALPLAN module
192
loadmodule "dialplan.so"
202
loadmodule "dialplan.so"
193
modparam("dialplan", "db_url", "postgres://opensips:opensipsrw@localhost/opensips") # CUSTOMIZE ME
203
modparam("dialplan", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
204
194
205
195
206
207
####  DYNAMMIC ROUTING module
208
loadmodule "drouting.so"
209
modparam("drouting", "db_url", "postgres://dbuser:dbpass@dbhostname/dbname") # CUSTOMIZE ME
210
196
211
197
212
198
####  MI_HTTP module
213
####  MI_HTTP module
199
#loadmodule "mi_http.so"
214
#loadmodule "mi_http.so"
200
215
201
216
217
#### UDP module
202
loadmodule "proto_udp.so"
218
loadmodule "proto_udp.so"
203
219
204
#loadmodule "proto_tcp.so" 
205
#loadmodule "proto_tls.so"
206
#modparam("proto_tls","verify_cert", "1")
207
#modparam("proto_tls","require_cert", "0")
208
#modparam("proto_tls","tls_method", "TLSv1")
209
#modparam("proto_tls","certificate", "/usr/local/etc/opensips/tls/user/user-cert.pem")
210
#modparam("proto_tls","private_key", "/usr/local/etc/opensips/tls/user/user-privkey.pem")
211
#modparam("proto_tls","ca_list", "/usr/local/etc/opensips/tls/user/user-calist.pem")
212
220
221
#### TCP module
222
loadmodule "proto_tcp.so" 
223
#modparam("proto_tcp", "tcp_send_timeout", 200)
224
#modparam("proto_tcp", "tcp_max_msg_chunks", 8)
225
226
227
#### TLS modules
228
loadmodule "proto_tls.so"
229
loadmodule "tls_mgm.so"
230
modparam("tls_mgm","verify_cert", "1")
231
modparam("tls_mgm","require_cert", "0")
232
modparam("tls_mgm","tls_method", "TLSv1")
233
#modparam("tls_mgm","ca_dir", "/usr/local/etc/opensips/tls/user/")
234
modparam("tls_mgm","certificate", "/usr/local/etc/opensips/tls/user/user-cert.pem")
235
modparam("tls_mgm","private_key", "/usr/local/etc/opensips/tls/user/user-privkey.pem")
236
modparam("tls_mgm","ca_list", "/usr/local/etc/opensips/tls/user/user-calist.pem")
237
#modparam("tls_mgm", "tls_send_timeout", 200)
238
#modparam("tls_mgm", "tls_handshake_timeout", 119)
239
#modparam("proto_tls", "tls_max_msg_chunks", 8)
213
 
240
 
214
241
242
215
####### Routing Logic ########
243
####### Routing Logic ########
216
244
217
# main request routing logic
245
# main request routing logic
Lines 246-253 Link Here
246
			}
274
			}
247
			
275
			
248
			if (is_method("BYE")) {
276
			if (is_method("BYE")) {
249
				setflag(ACC_DO); # do accounting ...
277
				# do accounting even if the transaction fails
250
				setflag(ACC_FAILED); # ... even if the transaction fails
278
				do_accounting("db","failed");
279
				
251
			} else if (is_method("INVITE")) {
280
			} else if (is_method("INVITE")) {
252
				# even if in most of the cases is useless, do RR for
281
				# even if in most of the cases is useless, do RR for
253
				# re-INVITEs alos, as some buggy clients do change route set
282
				# re-INVITEs alos, as some buggy clients do change route set
Lines 294-300 Link Here
294
323
295
	t_check_trans();
324
	t_check_trans();
296
325
297
	if ( !(is_method("REGISTER")  ) ) {
326
	if ( !(is_method("REGISTER")  || is_from_gw() ) ) {
298
		
327
		
299
		if (is_from_local())
328
		if (is_from_local())
300
		{
329
		{
Lines 347-353 Link Here
347
			exit;
376
			exit;
348
		}
377
		}
349
		
378
		
350
		setflag(ACC_DO); # do accounting
379
		do_accounting("db");
380
		
351
	}
381
	}
352
382
353
	
383
	
Lines 372-378 Link Here
372
402
373
	if (is_method("REGISTER"))
403
	if (is_method("REGISTER"))
374
	{
404
	{
375
		
376
		# authenticate the REGISTER requests
405
		# authenticate the REGISTER requests
377
		if (!www_authorize("", "subscriber"))
406
		if (!www_authorize("", "subscriber"))
378
		{
407
		{
Lines 388-393 Link Here
388
417
389
		if ( proto==TCP || proto==TLS || 0 ) setflag(TCP_PERSISTENT);
418
		if ( proto==TCP || proto==TLS || 0 ) setflag(TCP_PERSISTENT);
390
419
420
		if (isflagset(NAT)) {
421
			setbflag(SIP_PING_FLAG);
422
		}
423
391
		if (!save("location"))
424
		if (!save("location"))
392
			sl_reply_error();
425
			sl_reply_error();
393
426
Lines 408-413 Link Here
408
	# apply transformations from dialplan table
441
	# apply transformations from dialplan table
409
	dp_translate("0","$rU/$rU");
442
	dp_translate("0","$rU/$rU");
410
443
444
	
445
	if ($rU=~"^\+[1-9][0-9]+$") {
446
		
447
		if (!do_routing("0")) {
448
			send_reply("500","No PSTN Route found");
449
			exit;
450
		}
451
		
452
		route(relay);
453
		exit;
454
	}
411
	 
455
	 
412
456
413
	# do lookup with method filtering
457
	# do lookup with method filtering
Lines 417-431 Link Here
417
			exit;
461
			exit;
418
		}
462
		}
419
		
463
		
420
		t_newtran();
464
		# redirect to a different VM system
421
		t_reply("404", "Not Found");
465
		$du = "sip:127.0.0.2:5060"; # CUSTOMIZE ME
422
		exit;
466
		route(relay);
467
		
423
	} 
468
	} 
424
469
425
	if (isbflagset(NAT)) setflag(NAT);
470
	if (isbflagset(NAT)) setflag(NAT);
426
471
427
	# when routing via usrloc, log the missed calls also
472
	# when routing via usrloc, log the missed calls also
428
	setflag(ACC_MISSED);
473
	do_accounting("db","missed");
474
	
429
	route(relay);
475
	route(relay);
430
}
476
}
431
477
Lines 504-509 Link Here
504
	##}
550
	##}
505
551
506
	
552
	
553
	# redirect the failed to a different VM system
554
	if (t_check_status("486|408")) {
555
		$du = "sip:127.0.0.2:5060"; # CUSTOMIZE ME
556
		# do not set the missed call flag again
557
		route(relay);
558
	}
507
}
559
}
508
560
509
561
(-)net/opensips/files/opensips.in (-2 / +4 lines)
Lines 23-30 Link Here
23
load_rc_config opensips
23
load_rc_config opensips
24
24
25
opensips_enable=${opensips_enable:-"NO"}
25
opensips_enable=${opensips_enable:-"NO"}
26
opensips_shmem_size=${opensips_shmem_size:-"32"}
26
opensips_shmem_size=${opensips_shmem_size:-"64"}
27
opensips_pkmem_size=${opensips_pkmem_size:-"2"}
27
opensips_pkmem_size=${opensips_pkmem_size:-"4"}
28
opensips_user=${opensips_user:-"opensips"}
29
opensips_group=${opensips_group:-"opensips"}
28
30
29
command="${prefix}/sbin/opensips"
31
command="${prefix}/sbin/opensips"
30
command_args="-m ${opensips_shmem_size} -M ${opensips_pkmem_size}"
32
command_args="-m ${opensips_shmem_size} -M ${opensips_pkmem_size}"
(-)net/opensips/files/patch-modules__proto_tls__proto_tls.c (-10 lines)
Lines 1-10 Link Here
1
--- modules/proto_tls/proto_tls.c.orig	2016-05-30 14:13:27 UTC
2
+++ modules/proto_tls/proto_tls.c
3
@@ -42,6 +42,7 @@
4
 #include <openssl/opensslv.h>
5
 #include <openssl/err.h>
6
 
7
+#include <netinet/in.h>
8
 #include <netinet/in_systm.h>
9
 #include <netinet/tcp.h>
10
 #include <netinet/ip.h>
(-)net/opensips/pkg-message (+18 lines)
Line 0 Link Here
1
###############################################################################
2
3
OpenSIPS was installed
4
5
For further installation and configuration instructions,
6
visit the following web page:
7
8
http://www.opensips.org/Documentation/Manual-2-2
9
10
For migrating from a previous major release, visit the following web page:
11
12
http://www.opensips.org/Documentation/Migration
13
14
15
An rtpproxy server will most likely be needed, running on an accessible host.
16
It may be worth looking at net/rtpproxy.
17
18
##############################################################################
(-)net/opensips/pkg-plist (-6 / +9 lines)
Lines 1-7 Link Here
1
%%RADIUS%%@sample %%ETCDIR%%/dictionary.opensips.sample
2
@sample %%ETCDIR%%/opensips.cfg.sample
3
@sample %%ETCDIR%%/opensipsctlrc.sample
4
@sample %%ETCDIR%%/osipsconsolerc.sample
5
%%TLS%%%%ETCDIR%%/tls/README
1
%%TLS%%%%ETCDIR%%/tls/README
6
%%TLS%%%%ETCDIR%%/tls/ca.conf
2
%%TLS%%%%ETCDIR%%/tls/ca.conf
7
%%TLS%%%%ETCDIR%%/tls/request.conf
3
%%TLS%%%%ETCDIR%%/tls/request.conf
Lines 101-107 Link Here
101
lib/opensips/modules/proto_hep.so
97
lib/opensips/modules/proto_hep.so
102
%%TLS%%lib/opensips/modules/proto_tls.so
98
%%TLS%%lib/opensips/modules/proto_tls.so
103
lib/opensips/modules/proto_ws.so
99
lib/opensips/modules/proto_ws.so
104
lib/opensips/modules/proto_wss.so
100
%%TLS%%lib/opensips/modules/proto_wss.so
105
lib/opensips/modules/pua.so
101
lib/opensips/modules/pua.so
106
lib/opensips/modules/pua_bla.so
102
lib/opensips/modules/pua_bla.so
107
lib/opensips/modules/pua_dialoginfo.so
103
lib/opensips/modules/pua_dialoginfo.so
Lines 132-138 Link Here
132
lib/opensips/modules/statistics.so
128
lib/opensips/modules/statistics.so
133
lib/opensips/modules/stun.so
129
lib/opensips/modules/stun.so
134
lib/opensips/modules/textops.so
130
lib/opensips/modules/textops.so
135
lib/opensips/modules/tls_mgm.so
131
%%TLS%%lib/opensips/modules/tls_mgm.so
136
lib/opensips/modules/tm.so
132
lib/opensips/modules/tm.so
137
lib/opensips/modules/topology_hiding.so
133
lib/opensips/modules/topology_hiding.so
138
lib/opensips/modules/uac.so
134
lib/opensips/modules/uac.so
Lines 680-682 Link Here
680
%%TESTS%%tests/opensips/subscribe_notify.csv
676
%%TESTS%%tests/opensips/subscribe_notify.csv
681
%%TESTS%%tests/opensips/subscribe_notify_scenario.xml
677
%%TESTS%%tests/opensips/subscribe_notify_scenario.xml
682
%%TESTS%%tests/opensips/unregister.sip
678
%%TESTS%%tests/opensips/unregister.sip
679
@mode 600
680
@sample %%ETCDIR%%/opensipsctlrc.sample
681
@sample %%ETCDIR%%/osipsconsolerc.sample
682
%%RADIUS%%@sample %%ETCDIR%%/dictionary.opensips.sample
683
@owner opensips
684
@group opensips
685
@sample %%ETCDIR%%/opensips.cfg.sample

Return to bug 226667