summaryrefslogtreecommitdiff
path: root/package/opensips
diff options
context:
space:
mode:
Diffstat (limited to 'package/opensips')
-rw-r--r--package/opensips/Config.in196
-rw-r--r--package/opensips/Makefile111
-rw-r--r--package/opensips/files/opensips.cfg174
-rw-r--r--package/opensips/files/opensips.init26
-rw-r--r--package/opensips/ipkg/opensips-mod-acc.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-auth-db.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-auth-radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-auth.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-avp-radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-avp_radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-avpops.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-dispatcher.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-diversion.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-flatstore.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-gflags.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-group-radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-group.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-group_radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-lcr.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-mediaproxy.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-msilo.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-mysql.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-nathelper.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-options.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-pdt.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-permissions.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-pike.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-sms.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-speeddial.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uac-redirect.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uac.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uac_redirect.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uri-db.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uri-radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uri.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uri_db.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-uri_radius.control5
-rw-r--r--package/opensips/ipkg/opensips-mod-xlog.control5
-rw-r--r--package/opensips/ipkg/opensips.conffiles1
-rw-r--r--package/opensips/ipkg/opensips.control4
-rw-r--r--package/opensips/ipkg/opensips.postinst3
41 files changed, 685 insertions, 0 deletions
diff --git a/package/opensips/Config.in b/package/opensips/Config.in
new file mode 100644
index 000000000..bc03bd78a
--- /dev/null
+++ b/package/opensips/Config.in
@@ -0,0 +1,196 @@
+#menu "opensips........................... Configurable, free SIP server"
+
+config ADK_PACKAGE_OPENSIPS
+ prompt "opensips........................... Configurable, free SIP server"
+ tristate
+ default n
+ select ADK_PACKAGE_LIBOPENSSL
+ help
+ Open SIP Express Router (OpenSER) is a high-performance,
+ configurable, free SIP server.
+
+config ADK_PACKAGE_OPENSIPS_MOD_ACCOUNTING
+ prompt " opensips-mod-acc............... Accounting support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable accounting support
+
+config ADK_PACKAGE_OPENSIPS_MOD_AUTH
+ prompt " opensips-mod-auth.............. Authentication support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable authentication support
+
+config ADK_PACKAGE_OPENSIPS_MOD_AUTH_DB
+ prompt " opensips-mod-auth-db......... Authentication with database support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS_MOD_AUTH
+ help
+ Enable authentication with database support
+
+config ADK_PACKAGE_OPENSIPS_MOD_AVPOPS
+ prompt " opensips-mod-avpops............ AVP options support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable AVP options support
+
+config ADK_PACKAGE_OPENSIPS_MOD_DISPATCHER
+ prompt " opensips-mod-dispatcher........ dispatcher support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable dispatcher options support
+
+config ADK_PACKAGE_OPENSIPS_MOD_DIVERSION
+ prompt " opensips-mod-diversion......... diversion support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable diversion options support
+
+config ADK_PACKAGE_OPENSIPS_MOD_FLATSTORE
+ prompt " opensips-mod-flatstore......... flatstore support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable flatstore support
+
+config ADK_PACKAGE_OPENSIPS_MOD_GFLAGS
+ prompt " opensips-mod-gflags............ gflags support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable GFlags support
+
+config ADK_PACKAGE_OPENSIPS_MOD_GROUP
+ prompt " opensips-mod-group............. group support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable group support
+
+config ADK_PACKAGE_OPENSIPS_MOD_MEDIAPROXY
+ prompt " opensips-mod-mediaproxy........ Mediaproxy support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable mediaproxy support
+
+config ADK_PACKAGE_OPENSIPS_MOD_MSILO
+ prompt " opensips-mod-msilo............. MSilo support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable msilo support
+
+config ADK_PACKAGE_OPENSIPS_MOD_NATHELPER
+ prompt " opensips-mod-nathelper......... NAT helper support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ NAT helper support
+
+config ADK_PACKAGE_OPENSIPS_MOD_OPTIONS
+ prompt " opensips-mod-options........... options support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable options support
+
+config ADK_PACKAGE_OPENSIPS_MOD_PDT
+ prompt " opensips-mod-pdt............... PDT support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable pdt support
+
+config ADK_PACKAGE_OPENSIPS_MOD_PERMISSIONS
+ prompt " opensips-mod-permissions....... Permissions support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable permissions support
+
+config ADK_PACKAGE_OPENSIPS_MOD_PIKE
+ prompt " opensips-mod-pike.............. PIKE support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable pike support
+
+config ADK_PACKAGE_OPENSIPS_MOD_SMS
+ prompt " opensips-mod-sms............... SMS support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ SMS support
+
+config ADK_PACKAGE_OPENSIPS_MOD_SPEEDDIAL
+ prompt " opensips-mod-speeddial......... Speed Dial support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Speed Dial support
+
+config ADK_PACKAGE_OPENSIPS_MOD_UAC
+ prompt " opensips-mod-uac............... UAC support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable UAC support
+
+config ADK_PACKAGE_OPENSIPS_MOD_UAC_REDIRECT
+ prompt " opensips-mod-uac............... UAC redirect support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable UAC redirect support
+
+config ADK_PACKAGE_OPENSIPS_MOD_URI
+ prompt " opensips-mod-uri............... URI support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable URI support
+
+config ADK_PACKAGE_OPENSIPS_MOD_URI_DB
+ prompt " opensips-mod-uri-db............ URI database support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Enable URI database support
+
+config ADK_PACKAGE_OPENSIPS_MOD_XLOG
+ prompt " opensips-mod-xlog.............. Logging support"
+ tristate
+ default n
+ depends ADK_PACKAGE_OPENSIPS
+ help
+ Logging support
+
+#endmenu
diff --git a/package/opensips/Makefile b/package/opensips/Makefile
new file mode 100644
index 000000000..76d68f420
--- /dev/null
+++ b/package/opensips/Makefile
@@ -0,0 +1,111 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= opensips
+PKG_VERSION:= 1.4.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= d7f0c867d797525635f157b65bb45129
+PKG_VARIANT:= tls
+MASTER_SITES:= http://opensips.org/pub/opensips/$(PKG_VERSION)/src/
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION)-$(PKG_VARIANT)_src.tar.gz
+WRKDIST= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_VARIANT)
+
+include $(TOPDIR)/mk/package.mk
+
+define PKG_mod_template
+
+INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
+
+${2}-install:
+ [ -z "$(2)" ] || install -d -m 0755 $$(IDIR_$(1))/usr/lib/opensips/modules/
+ $(CP) $(WRKBUILD)/modules/$(2)/$(2).so \
+ $$(IDIR_$(1))/usr/lib/opensips/modules/
+
+endef
+
+$(eval $(call PKG_template,OPENSIPS,opensips,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_ACCOUNTING,opensips-mod-acc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_AUTH,opensips-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_AUTH_DB,opensips-mod-auth-db,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_AVPOPS,opensips-mod-avpops,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_DISPATCHER,opensips-mod-dispatcher,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_DIVERSION,opensips-mod-diversion,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_FLATSTORE,opensips-mod-flatstore,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_GFLAGS,opensips-mod-gflags,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_GROUP,opensips-mod-group,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_MEDIAPROXY,opensips-mod-mediaproxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_MSILO,opensips-mod-msilo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_NATHELPER,opensips-mod-nathelper,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_OPTIONS,opensips-mod-options,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_PDT,opensips-mod-pdt,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_PERMISSIONS,opensips-mod-permissions,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_PIKE,opensips-mod-pike,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_SMS,opensips-mod-sms,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_UAC,opensips-mod-uac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_UAC_REDIRECT,opensips-mod-uac-redirect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_URI,opensips-mod-uri,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_URI_DB,opensips-mod-uri-db,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OPENSIPS_MOD_XLOG,opensips-mod-xlog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_ACCOUNTING,acc))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH,auth))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_AUTH_DB,auth_db))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_AVPOPS,avpops))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_DISPATCHER,dispatcher))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_DIVERSION,diversion))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_FLATSTORE,db_flatstore))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_GFLAGS,gflags))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_GROUP,group))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_MEDIAPROXY,mediaproxy))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_MSILO,msilo))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_NATHELPER,nathelper))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_OPTIONS,options))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_PDT,pdt))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_PERMISSIONS,permissions))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_PIKE,pike))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_SMS,sms))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_SPEEDIAL,speeddial))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC,uac))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_UAC_REDIRECT,uac_redirect))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_URI,uri))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_URI_DB,uri_db))
+$(eval $(call PKG_mod_template,OPENSIPS_MOD_XLOG,xlog))
+
+# Select here the modules for the ipk package
+OPENSIPS_MODULES:= sl tm rr maxfwd usrloc registrar db_text textops exec mi_fifo
+
+OPENSIPS_MODULE_FILES:= $(foreach module,$(OPENSIPS_MODULES),modules/$(module)/$(module).so)
+OPENSIPS_MODULES:= $(patsubst %,modules/%,$(OPENSIPS_MODULES))
+
+post-extract:
+ @rm -f ${WRKDIST}/modules/dialog/dlg_handlers.c.rej
+
+do-build:
+ $(MAKE) -C $(WRKBUILD) \
+ prefix=/ \
+ extra_defs="-DUSE_PTHREAD_MUTEX" \
+ TLS=1 \
+ NO_EPOLL=1 \
+ CC="$(TARGET_CC)" \
+ ARCH="$(ARCH)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LOCALBASE="$(STAGING_DIR)/usr" \
+ all modules
+
+do-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
+ ${INSTALL_DIR} $(IDIR_OPENSIPS)/etc/init.d
+ ${INSTALL_DIR} $(IDIR_OPENSIPS)/etc/opensips
+ ${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/sbin
+ ${INSTALL_DIR} $(IDIR_OPENSIPS)/usr/lib/opensips/modules
+ $(CP) $(WRKBUILD)/$(PKG_NAME) $(IDIR_OPENSIPS)/usr/sbin/
+ (cd $(WRKBUILD);\
+ $(CP) $(OPENSIPS_MODULE_FILES) $(IDIR_OPENSIPS)/usr/lib/opensips/modules/; \
+ )
+ $(CP) ./files/opensips.cfg $(IDIR_OPENSIPS)/etc/opensips/
+ ${INSTALL_DATA} ./files/opensips.init $(IDIR_OPENSIPS)/etc/init.d/opensips
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/opensips/files/opensips.cfg b/package/opensips/files/opensips.cfg
new file mode 100644
index 000000000..3b5d4d42e
--- /dev/null
+++ b/package/opensips/files/opensips.cfg
@@ -0,0 +1,174 @@
+#
+# $Id: openser.cfg 1827 2007-03-12 15:22:53Z bogdan_iancu $
+#
+# simple quick-start config script
+# Please refer to the Core CookBook at http://www.openser.org/dokuwiki/doku.php
+# for a explanation of possible statements, functions and parameters.
+#
+
+# ----------- global configuration parameters ------------------------
+
+debug=3 # debug level (cmd line: -dddddddddd)
+fork=yes
+log_stderror=no # (cmd line: -E)
+children=4
+
+# Uncomment these lines to enter debugging mode
+#fork=no
+#log_stderror=yes
+#
+
+port=5060
+
+# uncomment the following lines for TLS support
+#disable_tls = 0
+#listen = tls:your_IP:5061
+#tls_verify_server = 1
+#tls_verify_client = 1
+#tls_require_client_certificate = 0
+#tls_method = TLSv1
+#tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
+#tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
+#tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"
+
+# ------------------ module loading ----------------------------------
+
+#set module path
+mpath="/usr/lib/openser/modules/"
+
+# Uncomment this if you want to use SQL database
+#loadmodule "mysql.so"
+
+loadmodule "sl.so"
+loadmodule "tm.so"
+loadmodule "rr.so"
+loadmodule "maxfwd.so"
+loadmodule "usrloc.so"
+loadmodule "registrar.so"
+loadmodule "textops.so"
+loadmodule "mi_fifo.so"
+
+# Uncomment this if you want digest authentication
+# mysql.so must be loaded !
+#loadmodule "auth.so"
+#loadmodule "auth_db.so"
+
+# ----------------- setting module-specific parameters ---------------
+
+# -- mi_fifo params --
+
+modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
+
+# -- usrloc params --
+
+modparam("usrloc", "db_mode", 0)
+
+# Uncomment this if you want to use SQL database
+# for persistent storage and comment the previous line
+#modparam("usrloc", "db_mode", 2)
+
+# -- auth params --
+# Uncomment if you are using auth module
+#
+#modparam("auth_db", "calculate_ha1", yes)
+#
+# If you set "calculate_ha1" parameter to yes (which true in this config),
+# uncomment also the following parameter)
+#
+#modparam("auth_db", "password_column", "password")
+
+# -- rr params --
+# add value to ;lr param to make some broken UAs happy
+modparam("rr", "enable_full_lr", 1)
+
+# ------------------------- request routing logic -------------------
+
+# main routing logic
+
+route{
+
+ # initial sanity checks -- messages with
+ # max_forwards==0, or excessively long requests
+ if (!mf_process_maxfwd_header("10")) {
+ sl_send_reply("483","Too Many Hops");
+ exit;
+ };
+
+ if (msg:len >= 2048 ) {
+ sl_send_reply("513", "Message too big");
+ exit;
+ };
+
+ # we record-route all messages -- to make sure that
+ # subsequent messages will go through our proxy; that's
+ # particularly good if upstream and downstream entities
+ # use different transport protocol
+ if (!method=="REGISTER")
+ record_route();
+
+ # subsequent messages withing a dialog should take the
+ # path determined by record-routing
+ if (loose_route()) {
+ # mark routing logic in request
+ append_hf("P-hint: rr-enforced\r\n");
+ route(1);
+ };
+
+ if (!uri==myself) {
+ # mark routing logic in request
+ append_hf("P-hint: outbound\r\n");
+ # if you have some interdomain connections via TLS
+ #if(uri=~"@tls_domain1.net") {
+ # t_relay("tls:domain1.net");
+ # exit;
+ #} else if(uri=~"@tls_domain2.net") {
+ # t_relay("tls:domain2.net");
+ # exit;
+ #}
+ route(1);
+ };
+
+ # if the request is for other domain use UsrLoc
+ # (in case, it does not work, use the following command
+ # with proper names and addresses in it)
+ if (uri==myself) {
+
+ if (method=="REGISTER") {
+
+ # Uncomment this if you want to use digest authentication
+ #if (!www_authorize("openser.org", "subscriber")) {
+ # www_challenge("openser.org", "0");
+ # exit;
+ #};
+
+ save("location");
+ exit;
+ };
+
+ lookup("aliases");
+ if (!uri==myself) {
+ append_hf("P-hint: outbound alias\r\n");
+ route(1);
+ };
+
+ # native SIP destinations are handled using our USRLOC DB
+ if (!lookup("location")) {
+ sl_send_reply("404", "Not Found");
+ exit;
+ };
+ append_hf("P-hint: usrloc applied\r\n");
+ };
+
+ route(1);
+}
+
+
+route[1] {
+ # send it out now; use stateful forwarding as it works reliably
+ # even for UDP2TCP
+ if (!t_relay()) {
+ sl_reply_error();
+ };
+ exit;
+}
+
diff --git a/package/opensips/files/opensips.init b/package/opensips/files/opensips.init
new file mode 100644
index 000000000..8f231a14a
--- /dev/null
+++ b/package/opensips/files/opensips.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${opensips:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/sbin/opensips
+ ;;
+stop)
+ killall opensips
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/opensips/ipkg/opensips-mod-acc.control b/package/opensips/ipkg/opensips-mod-acc.control
new file mode 100644
index 000000000..81aa0e6c3
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-acc.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-acc
+Depends: opensips, libradiusclient-ng
+Section: net
+Priority: optional
+Description: accounting support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-auth-db.control b/package/opensips/ipkg/opensips-mod-auth-db.control
new file mode 100644
index 000000000..459d6cb14
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-auth-db.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-auth-db
+Depends: opensips, libmysqlclient
+Section: net
+Priority: optional
+Description: authentication support against database for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-auth-radius.control b/package/opensips/ipkg/opensips-mod-auth-radius.control
new file mode 100644
index 000000000..82efb9627
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-auth-radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-auth-radius
+Depends: opensips, libradiusclient-ng
+Section: net
+Priority: optional
+Description: authentication support against RADIUS for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-auth.control b/package/opensips/ipkg/opensips-mod-auth.control
new file mode 100644
index 000000000..9b5ccbd84
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-auth.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-auth
+Depends: opensips
+Section: net
+Priority: optional
+Description: authentication support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-avp-radius.control b/package/opensips/ipkg/opensips-mod-avp-radius.control
new file mode 100644
index 000000000..b317c2ae6
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-avp-radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-avp-radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: avp_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-avp_radius.control b/package/opensips/ipkg/opensips-mod-avp_radius.control
new file mode 100644
index 000000000..9fb519d9a
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-avp_radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-avp_radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: avp_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-avpops.control b/package/opensips/ipkg/opensips-mod-avpops.control
new file mode 100644
index 000000000..b653002de
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-avpops.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-avpops
+Depends: opensips
+Section: net
+Priority: optional
+Description: AVPOPS support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-dispatcher.control b/package/opensips/ipkg/opensips-mod-dispatcher.control
new file mode 100644
index 000000000..40565d0f7
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-dispatcher.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-dispatcher
+Depends: opensips
+Section: net
+Priority: optional
+Description: dispatcher support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-diversion.control b/package/opensips/ipkg/opensips-mod-diversion.control
new file mode 100644
index 000000000..36ceefa43
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-diversion.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-diversion
+Depends: opensips
+Section: net
+Priority: optional
+Description: diversion support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-flatstore.control b/package/opensips/ipkg/opensips-mod-flatstore.control
new file mode 100644
index 000000000..db28651dd
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-flatstore.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-flatstore
+Depends: opensips
+Section: net
+Priority: optional
+Description: flatstore support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-gflags.control b/package/opensips/ipkg/opensips-mod-gflags.control
new file mode 100644
index 000000000..22c76a61d
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-gflags.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-gflags
+Depends: opensips
+Section: net
+Priority: optional
+Description: gflags support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-group-radius.control b/package/opensips/ipkg/opensips-mod-group-radius.control
new file mode 100644
index 000000000..f301a4df1
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-group-radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-group-radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: group_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-group.control b/package/opensips/ipkg/opensips-mod-group.control
new file mode 100644
index 000000000..c8ed63a9b
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-group.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-group
+Depends: opensips
+Section: net
+Priority: optional
+Description: group support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-group_radius.control b/package/opensips/ipkg/opensips-mod-group_radius.control
new file mode 100644
index 000000000..a0a7f0368
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-group_radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-group_radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: group_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-lcr.control b/package/opensips/ipkg/opensips-mod-lcr.control
new file mode 100644
index 000000000..a0ede8d1b
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-lcr.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-lcr
+Depends: opensips
+Section: net
+Priority: optional
+Description: Least Cost Routing support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-mediaproxy.control b/package/opensips/ipkg/opensips-mod-mediaproxy.control
new file mode 100644
index 000000000..b6e7937f2
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-mediaproxy.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-mediaproxy
+Depends: opensips
+Section: net
+Priority: optional
+Description: mediaproxy support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-msilo.control b/package/opensips/ipkg/opensips-mod-msilo.control
new file mode 100644
index 000000000..b85d05755
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-msilo.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-msilo
+Depends: opensips
+Section: net
+Priority: optional
+Description: msilo support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-mysql.control b/package/opensips/ipkg/opensips-mod-mysql.control
new file mode 100644
index 000000000..71ee8f213
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-mysql.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-mysql
+Depends: opensips, libmysqlclient
+Section: net
+Priority: optional
+Description: MySQL support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-nathelper.control b/package/opensips/ipkg/opensips-mod-nathelper.control
new file mode 100644
index 000000000..1f133854b
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-nathelper.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-nathelper
+Depends: opensips
+Section: net
+Priority: optional
+Description: NAT helper support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-options.control b/package/opensips/ipkg/opensips-mod-options.control
new file mode 100644
index 000000000..5594a6a5f
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-options.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-options
+Depends: opensips
+Section: net
+Priority: optional
+Description: options support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-pdt.control b/package/opensips/ipkg/opensips-mod-pdt.control
new file mode 100644
index 000000000..f40bb6271
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-pdt.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-pdt
+Depends: opensips
+Section: net
+Priority: optional
+Description: pdt support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-permissions.control b/package/opensips/ipkg/opensips-mod-permissions.control
new file mode 100644
index 000000000..1283d8e76
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-permissions.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-permissions
+Depends: opensips
+Section: net
+Priority: optional
+Description: permissions support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-pike.control b/package/opensips/ipkg/opensips-mod-pike.control
new file mode 100644
index 000000000..734b406e1
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-pike.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-pike
+Depends: opensips
+Section: net
+Priority: optional
+Description: pike support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-sms.control b/package/opensips/ipkg/opensips-mod-sms.control
new file mode 100644
index 000000000..9641642df
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-sms.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-sms
+Depends: opensips
+Section: net
+Priority: optional
+Description: SMS support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-speeddial.control b/package/opensips/ipkg/opensips-mod-speeddial.control
new file mode 100644
index 000000000..668e2f8fb
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-speeddial.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-speeddial
+Depends: opensips
+Section: net
+Priority: optional
+Description: Speed-dial support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uac-redirect.control b/package/opensips/ipkg/opensips-mod-uac-redirect.control
new file mode 100644
index 000000000..f3e571455
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uac-redirect.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uac-redirect
+Depends: opensips
+Section: net
+Priority: optional
+Description: uac_redirect support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uac.control b/package/opensips/ipkg/opensips-mod-uac.control
new file mode 100644
index 000000000..872a3a368
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uac.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uac
+Depends: opensips
+Section: net
+Priority: optional
+Description: uac support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uac_redirect.control b/package/opensips/ipkg/opensips-mod-uac_redirect.control
new file mode 100644
index 000000000..fdd6ae541
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uac_redirect.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uac_redirect
+Depends: opensips
+Section: net
+Priority: optional
+Description: uac_redirect support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uri-db.control b/package/opensips/ipkg/opensips-mod-uri-db.control
new file mode 100644
index 000000000..3e90123eb
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uri-db.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uri-db
+Depends: opensips
+Section: net
+Priority: optional
+Description: uri_db support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uri-radius.control b/package/opensips/ipkg/opensips-mod-uri-radius.control
new file mode 100644
index 000000000..429d972de
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uri-radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uri-radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: uri_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uri.control b/package/opensips/ipkg/opensips-mod-uri.control
new file mode 100644
index 000000000..9ce41607d
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uri.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uri
+Depends: opensips
+Section: net
+Priority: optional
+Description: uri support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uri_db.control b/package/opensips/ipkg/opensips-mod-uri_db.control
new file mode 100644
index 000000000..7dfe161df
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uri_db.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uri_db
+Depends: opensips
+Section: net
+Priority: optional
+Description: uri_db support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-uri_radius.control b/package/opensips/ipkg/opensips-mod-uri_radius.control
new file mode 100644
index 000000000..0521ba5df
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-uri_radius.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-uri_radius
+Depends: opensips
+Section: net
+Priority: optional
+Description: uri_radius support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips-mod-xlog.control b/package/opensips/ipkg/opensips-mod-xlog.control
new file mode 100644
index 000000000..6759951bf
--- /dev/null
+++ b/package/opensips/ipkg/opensips-mod-xlog.control
@@ -0,0 +1,5 @@
+Package: opensips-mod-xlog
+Depends: opensips
+Section: net
+Priority: optional
+Description: Xlog targets support for OpenSIPS
diff --git a/package/opensips/ipkg/opensips.conffiles b/package/opensips/ipkg/opensips.conffiles
new file mode 100644
index 000000000..19c9e4ce7
--- /dev/null
+++ b/package/opensips/ipkg/opensips.conffiles
@@ -0,0 +1 @@
+/etc/opensips/opensips.cfg
diff --git a/package/opensips/ipkg/opensips.control b/package/opensips/ipkg/opensips.control
new file mode 100644
index 000000000..40475bac9
--- /dev/null
+++ b/package/opensips/ipkg/opensips.control
@@ -0,0 +1,4 @@
+Package: opensips
+Section: net
+Priority: optional
+Description: OpenSIPS is a high-performance, configurable, free SIP server.
diff --git a/package/opensips/ipkg/opensips.postinst b/package/opensips/ipkg/opensips.postinst
new file mode 100644
index 000000000..369f66dd7
--- /dev/null
+++ b/package/opensips/ipkg/opensips.postinst
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf opensips